Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

6.8. ACL

配置访问控制列表

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