! ! ポリサーによるQoS処理で特定の通信が使用できる帯域を制限する ! ! ! 本社 スイッチ ! SWX3220 / SWX3200 / SWX3100 / SWX2322P / SWX2320 / SWX2310P / SWX2310 Configのサンプル ! ! enable password admin ! username admin privilege on password (初期管理ユーザーパスワード) ! qos enable ! dns-client enable lldp run lldp auto-setting enable spanning-tree shutdown ! access-list 1 10 permit udp 192.168.120.0 0.0.0.255 eq 5004 192.168.110.0 0.0.0.255 eq 5004 access-list 2 10 permit udp 192.168.130.0 0.0.0.255 eq 5004 192.168.110.0 0.0.0.255 eq 5004 access-list 3 10 permit any 192.168.120.0 0.0.0.255 192.168.110.0 0.0.0.255 access-list 4 10 permit any 192.168.130.0 0.0.0.255 192.168.110.0 0.0.0.255 access-list 5 10 permit any 192.168.10.0 0.0.0.255 192.168.10.0 0.0.0.255 ! class-map class-confidential match access-list 5 ! class-map class-limit1 match access-list 3 ! class-map class-limit2 match access-list 4 ! class-map class-phone1 match access-list 1 ! class-map class-phone2 match access-list 2 ! policy-map pmap1 class class-phone1 set ip-dscp 40 class class-phone2 set ip-dscp 40 class class-limit1 police single-rate 20000 10240 10240 yellow-action drop red-action drop class class-limit2 police single-rate 20000 10240 10240 yellow-action drop red-action drop class class-confidential police single-rate 20000 10240 10240 yellow-action drop red-action drop ! vlan database vlan 2 name VLAN0002 vlan 10 name VLAN0010 vlan 110 name VLAN0110 ! interface port1.1 switchport switchport mode trunk switchport trunk allowed vlan add 10 switchport trunk native vlan 2 service-policy input pmap1 no shutdown lldp-agent set lldp enable txrx exit ! interface port1.2 switchport switchport mode access switchport access vlan 110 no shutdown lldp-agent set lldp enable txrx exit ! interface port1.3 switchport switchport mode access switchport access vlan 10 no shutdown lldp-agent set lldp enable txrx exit ! interface port1.4 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.5 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.6 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.7 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.8 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.9 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.10 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.11 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.12 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.13 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.14 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.15 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface port1.16 switchport switchport mode access no shutdown lldp-agent set lldp enable txrx exit ! interface vlan1 no switchport auto-ip enable ip address 192.168.100.240/24 no shutdown ! interface vlan2 no switchport ip address 192.168.2.1/24 no shutdown ! interface vlan10 no switchport no shutdown ! interface vlan110 no switchport ip address 192.168.110.1/24 no shutdown ! ip route 192.168.120.0/24 192.168.2.2 ip route 192.168.130.0/24 192.168.2.3 ! ! clock timezone JST ! http-server enable http-proxy enable ! telnet-server enable ! line con 0 line vty 0 7 ! end