管理番号:YMHSW-4167
本設定例の対応機種は、SWX2310P-28GT、SWX2310P-18G、SWX2310P-10G、SWX2300-24G(Rev.2.00.05以降)、SWX2300-16G(Rev.2.00.05以降)、SWX2300-8G(Rev.2.00.05以降)です。
インテリジェントL2スイッチのQoS機能を使用して、転送するパケットの優先度を制御する設定例です。
サーバーを接続したスイッチ ポート5の優先度を最高にすることで、本社サーバーと拠点間の通信を優先的に行います。
本設定例では、ポート5に以下の内容を設定しています。
※ネットワーク機器を安全にお使いいただくために、管理パスワードの変更(ルーター)を奨励します。
LANインターフェースの設定 (LAN1ポートを使用) |
ip lan1 address 192.168.100.1/24 |
---|---|
送出帯域の設定 | speed lan2 10m |
Queueの設定 | queue lan2 type priority |
WANインターフェースの設定 (LAN2ポートを使用) |
ip route default gateway pp 1 pp select 1 pp always-on on queue pp class filter list 1 2 3 pppoe use lan2 pp auth accept pap chap pp auth myname (接続するID) (パスワード) ppp lcp mru on 1454 ppp ipcp msext on ip pp address (グローバルアドレス1) ip pp mtu 1454 ip pp secure filter in 1020 1030 1040 1041 2000 ip pp secure filter out 1010 1011 1012 1013 1014 1015 3000 dynamic 100 101 102 103 104 105 106 ip pp nat descriptor 1 pp enable 1 |
トンネルインターフェースの設定 | ip route 192.168.101.0/24 gateway tunnel 1 tunnel select 1 ipsec tunnel 101 ipsec sa policy 101 1 esp aes-cbc sha-hmac anti-replay-check=off ipsec ike keepalive use 1 on ipsec ike local address 1 192.168.100.1 ipsec ike pre-shared-key 1 text (パスワード) ipsec ike remote address 1 (グローバルアドレス2) queue tunnel class filter list 4 tunnel enable 1 |
フィルターの設定 | ip filter source-route on ip filter directed-broadcast on ip filter 1010 reject * * udp,tcp 135 * ip filter 1011 reject * * udp,tcp * 135 ip filter 1012 reject * * udp,tcp netbios_ns-netbios_ssn * ip filter 1013 reject * * udp,tcp * netbios_ns-netbios_ssn ip filter 1014 reject * * udp,tcp 445 * ip filter 1015 reject * * udp,tcp * 445 ip filter 1020 reject 192.168.100.0/24 * ip filter 1030 pass * 192.168.100.0/24 icmp ip filter 1040 pass (グローバルアドレス2) * udp * 500 # 注釈1 ip filter 1041 pass (グローバルアドレス2) * esp # 注釈1 ip filter 2000 reject * * ip filter 3000 pass * * ip filter dynamic 100 * * ftp ip filter dynamic 101 * * www ip filter dynamic 102 * * domain ip filter dynamic 103 * * smtp ip filter dynamic 104 * * pop3 ip filter dynamic 105 * * tcp ip filter dynamic 106 * * udp |
NATの設定 | nat descriptor type 1 masquerade nat descriptor address outer 1 (グローバルアドレス1) nat descriptor masquerade static 1 1 192.168.100.1 udp 500 # 注釈1 nat descriptor masquerade static 1 2 192.168.100.1 esp # 注釈1 |
VPN(IPsec)の設定 | ipsec auto refresh on |
Queueの設定(優先パケットのフィルター定義) | queue class filter 1 4 ip * * udp * 500 queue class filter 2 3 ip * * esp queue class filter 3 2 ip * * queue class filter 4 dscp ip * * |
DNSの設定 | dns server (DNSサーバーのIPアドレス) dns private address spoof on |
LANインターフェースの設定 (LAN1ポートを使用) |
ip lan1 address 192.168.101.1/24 |
---|---|
送出帯域の設定 | speed lan2 10m |
Queueの設定 | queue lan2 type priority |
WANインターフェースの設定 (LAN2ポートを使用) |
ip route default gateway pp 1 pp select 1 pp always-on on queue pp class filter list 1 2 3 pppoe use lan2 pp auth accept pap chap pp auth myname (接続するID) (パスワード) ppp lcp mru on 1454 ppp ipcp msext on ip pp address (グローバルアドレス2) ip pp mtu 1454 ip pp secure filter in 1020 1030 1040 1041 2000 ip pp secure filter out 1010 1011 1012 1013 1014 1015 3000 dynamic 100 101 102 103 104 105 106 ip pp nat descriptor 1 pp enable 1 |
トンネルインターフェースの設定 | ip route 192.168.100.0/24 gateway tunnel 1 tunnel select 1 ipsec tunnel 101 ipsec sa policy 101 1 esp aes-cbc sha-hmac anti-replay-check=off ipsec ike keepalive use 1 on ipsec ike local address 1 192.168.101.1 ipsec ike pre-shared-key 1 text (パスワード) ipsec ike remote address 1 (グローバルアドレス1) queue tunnel class filter list 4 5 tunnel enable 1 |
フィルターの設定 | ip filter source-route on ip filter directed-broadcast on ip filter 1010 reject * * udp,tcp 135 * ip filter 1011 reject * * udp,tcp * 135 ip filter 1012 reject * * udp,tcp netbios_ns-netbios_ssn * ip filter 1013 reject * * udp,tcp * netbios_ns-netbios_ssn ip filter 1014 reject * * udp,tcp 445 * ip filter 1015 reject * * udp,tcp * 445 ip filter 1020 reject 192.168.101.0/24 * ip filter 1030 pass * 192.168.101.0/24 icmp ip filter 1040 pass (グローバルアドレス1) * udp * 500 # 注釈1 ip filter 1041 pass (グローバルアドレス1) * esp # 注釈1 ip filter 2000 reject * * ip filter 3000 pass * * ip filter dynamic 100 * * ftp ip filter dynamic 101 * * www ip filter dynamic 102 * * domain ip filter dynamic 103 * * smtp ip filter dynamic 104 * * pop3 ip filter dynamic 105 * * tcp ip filter dynamic 106 * * udp |
NATの設定 | nat descriptor type 1 masquerade nat descriptor address outer 1 (グローバルアドレス2) nat descriptor masquerade static 1 1 192.168.101.1 udp 500 # 注釈1 nat descriptor masquerade static 1 2 192.168.101.1 esp # 注釈1 |
VPN(IPsec)の設定 | ipsec auto refresh on |
Queueの設定(優先パケットのフィルター定義) | queue class filter 1 4 ip * * udp * 500 queue class filter 2 3 ip * * esp queue class filter 3 2 ip * * queue class filter 4 4 ip * (本社サーバーのIPアドレス) queue class filter 5 2 ip * * |
DNSの設定 | dns server (DNSサーバーのIPアドレス) dns private address spoof on |
注釈1:
VPN(IPsec)に関係するパケットを通過させる設定です。
※ネットワーク機器を安全にお使いいただくために、管理パスワードの変更(スイッチ)を奨励します。
下記の設定(Config)を取り出すことができます。
[コンソール]
SWX2310P>enable SWX2310P# |
[コンソール]
SWX2310P#configure terminal Enter configuration commands, one per line. End with CNTL/Z. SWX2310P(config)# |
[コンソール]
SWX2310P(config)#qos enable SWX2310P(config)# |
[コンソール]
SWX2310P(config)#interface port1.5 SWX2310P(config-if)#qos trust dscp SWX2310P(config-if)#exit SWX2310P(config)# |
[コンソール]
SWX2310P(config)#qos dscp-queue 56 7 SWX2310P(config)#qos dscp-queue 46 5 SWX2310P(config)#qos dscp-queue 8 0 SWX2310P(config)#qos dscp-queue 0 2 SWX2310P(config)# |
[補足] デフォルト値のため、特に設定の必要はありませんが、明示的に記載しています。 |
[コンソール]
SWX2310P(config)#access-list 1 permit any 192.168.100.0/24 any SWX2310P(config)#class-map class1 SWX2310P(config-cmap)#match access-list 1 SWX2310P(config-cmap)#exit SWX2310P(config)# |
[コンソール]
SWX2310P(config)#policy-map policy1 SWX2310P(config-pmap)#class class1 SWX2310P(config-pmap-c)#set ip-dscp 56 SWX2310P(config-pmap-c)#exit SWX2310P(config-pmap)#exit SWX2310P(config)# |
[コンソール]
SWX2310P(config)#interface port1.5 SWX2310P(config-if)#service-policy input policy1 SWX2310P(config-if)#exit SWX2310P(config)# |
QoSの設定 |
qos enable interface port1.5 qos trust dscp exit qos dscp-queue 56 7 qos dscp-queue 46 5 qos dscp-queue 8 0 qos dscp-queue 0 2 access-list 1 permit 192.168.100.0 0.0.0.255 class-map class1 match access-list 1 exit policy-map policy1 class class1 set ip-dscp 56 exit exit interface port1.5 service-policy input policy1 exit |
---|
「show qos interface」コマンドで設定を確認します。
[コンソール]
SWX2310P#show qos interface port1.5 Port Trust Mode: DSCP Input Policy-Map Name: policy1 Class-Map Name: class1 Match Access-List: 1 Set IP DSCP: 56 Egress Traffic Shaping: Not Configured Egress Traffic Queue Shaping: Not Configured Queue Scheduling: Queue0 : SP Queue1 : SP Queue2 : SP Queue3 : SP Queue4 : SP Queue5 : SP Queue6 : SP Queue7 : SP DSCP (Queue): 0(2), 1(2), 2(2), 3(2), 4(2), 5(2), 6(2), 7(2) 8(0), 9(0), 10(0), 11(0), 12(0), 13(0), 14(0), 15(0) 16(1), 17(1), 18(1), 19(1), 20(1), 21(1), 22(1), 23(1) 24(3), 25(3), 26(3), 27(3), 28(3), 29(3), 30(3), 31(3) 32(4), 33(4), 34(4), 35(4), 36(4), 37(4), 38(4), 39(4) 40(5), 41(5), 42(5), 43(5), 44(5), 45(5), 46(5), 47(5) 48(6), 49(6), 50(6), 51(6), 52(6), 53(6), 54(6), 55(6) 56(7), 57(7), 58(7), 59(7), 60(7), 61(7), 62(7), 63(7) Special Queue Assignment: Sent From CPU: Queue7 |
[解説] ポート5のQoS設定を確認します。 ポートのトラストモードは DSCPで、policy1 という名前のポリシーマップが適用されています。コマンドの詳細は、LAN/SFPポートのQoS情報の表示をご覧ください。 |
下記の設定(Config)を取り出すことができます。
[コンソール]
SWX2300>enable SWX2300# |
[コンソール]
SWX2300#configure terminal Enter configuration commands, one per line. End with CNTL/Z. SWX2300(config)# |
[コンソール]
SWX2300(config)#mls qos enable SWX2300(config)# |
[コンソール]
SWX2300(config)#interface ge5 SWX2300(config-if)#mls qos trust dscp SWX2300(config-if)#exit SWX2300(config)# |
[コンソール]
SWX2300(config)#mls qos dscp-queue 56 7 SWX2300(config)#mls qos dscp-queue 46 5 SWX2300(config)#mls qos dscp-queue 8 0 SWX2300(config)#mls qos dscp-queue 0 2 SWX2300(config)# |
[補足] デフォルト値のため、特に設定の必要はありませんが、明示的に記載しています。 |
[コンソール]
SWX2300(config)#ip-access-list 1 permit 192.168.100.0 0.0.0.255 SWX2300(config)#class-map class1 SWX2300(config-cmap)#match access-group 1 SWX2300(config-cmap)#exit SWX2300(config)# |
[コンソール]
SWX2300(config)#policy-map policy1 SWX2300(config-pmap)#class class1 SWX2300(config-pmap-c)#set ip-dscp 56 SWX2300(config-pmap-c)#exit SWX2300(config-pmap)#exit SWX2300(config)# |
[コンソール]
SWX2300(config)#interface ge5 SWX2300(config-if)#service-policy input policy1 SWX2300(config-if)#exit SWX2300(config)# |
QoSの設定 |
mls qos enable interface ge5 mls qos trust dscp exit mls qos dscp-queue 56 7 mls qos dscp-queue 46 5 mls qos dscp-queue 8 0 mls qos dscp-queue 0 2 ip-access-list 1 permit 192.168.100.0 0.0.0.255 class-map class1 match access-group 1 exit policy-map policy1 class class1 set ip-dscp 56 exit exit interface ge5 service-policy input policy1 exit |
---|
「show mls qos interface」コマンドで設定を確認します。
[コンソール]
SWX2300#show mls qos interface ge5 Port Trust Mode: DSCP Input Policy-Map Name: policy1 Class-Map Name: class1 QoS-Access-List Name: 1 Set IP DSCP: 56 Egress Traffic Shaping: Not Configured Egress Traffic Queue Shaping: Not Configured Queue Scheduling: Queue0 : SP Queue1 : SP Queue2 : SP Queue3 : SP Queue4 : SP Queue5 : SP Queue6 : SP Queue7 : SP DSCP (Queue): 0(2), 1(2), 2(2), 3(2), 4(2), 5(2), 6(2), 7(2) 8(0), 9(0), 10(0), 11(0), 12(0), 13(0), 14(0), 15(0) 16(1), 17(1), 18(1), 19(1), 20(1), 21(1), 22(1), 23(1) 24(3), 25(3), 26(3), 27(3), 28(3), 29(3), 30(3), 31(3) 32(4), 33(4), 34(4), 35(4), 36(4), 37(4), 38(4), 39(4) 40(5), 41(5), 42(5), 43(5), 44(5), 45(5), 46(5), 47(5) 48(6), 49(6), 50(6), 51(6), 52(6), 53(6), 54(6), 55(6) 56(7), 57(7), 58(7), 59(7), 60(7), 61(7), 62(7), 63(7) Special Queue Assignment: Sent From CPU: Queue7 |
[解説] ポート5のQoS設定を確認します。 ポートのトラストモードは DSCPで、policy1 という名前のポリシーマップが適用されています。コマンドの詳細は、LAN/SFPポートのQoS情報の表示をご覧ください。 |
ご相談・お問い合わせ