配置访问控制列表
Switch(Config)access-list 103 permit ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255 Switch(Config)access-list 103 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255 Switch(Config)access-list 103 permit udp any any eq bootpc Switch(Config)access-list 103 permit udp any any eq tftp Switch(Config)access-list 103 permit udp any eq bootpc any Switch(Config)access-list 103 permit udp any eq tftp any Switch(Config)access-list 104 permit ip 192.168.2.0 0.0.0.255 192.168.4.0 0.0.0.255 Switch(Config)access-list 104 permit ip 192.168.4.0 0.0.0.255 192.168.2.0 0.0.0.255 Switch(Config)access-list 104 permit udp any eq tftp any Switch(Config)access-list 104 permit udp any eq bootpc any Switch(Config)access-list 104 permit udp any eq bootpc any Switch(Config)access-list 104 permit udp any eq tftp any
应用访问控制列表
Switch(Config)int Vlan 3 Switch(Config-vlan)ip access-group 103 out Switch(Config-vlan)int Vlan 4 Switch(Config-vlan)ip access-group 104 out
结束并保存配置
Switch(Config-vlan)End Switch#write memory