构建上图所示的网络拓扑
目的:1.拒绝PC2访问PC4
2.只允许PC1 ping PC3,同时拒绝PC1所在网段其他的设备或协议访问PC3
3.拒绝AR1远程telnet登录AR2
准备
为AR1与AR2配置动态路由使PC之间能够互相联通
为AR2配置telnet
1
因为在AR2的g0/0/2端口只有PC4一个设备,故可使用基本ACL进行设置
[AR2]acl 2000 创建基本acl
[AR2-acl-basic-2000]rule deny source 192.168.20.20 0 建立acl规则
[AR2]int g0/0/2 进入需要配置的端口
[AR2-GigabitEthernet0/0/2]traffic-filter outbound acl 2000 为端口的出方向调用acl
2
[AR2]acl 3000 创建高级acl
[AR2-acl-adv-3000]rule permit icmp source 192.168.10.10 0 destination 192.168.30.30 0
[AR2-acl-adv-3000]rule deny ip source 192.168.10.0 0.0.0.255 destination 192.168.30.30 0
建立acl规则
[AR2]int g0/0/1 进入需要配置的端口
[AR2-GigabitEthernet0/0/1]traffic-filter outbound acl 3000 为端口的出方向调用acl
3
[AR2]acl 2001 创建基本acl
[AR2-acl-basic-2001]rule deny source 11.1.1.1 0 建立acl规则
[AR2]user-interface vty 0 4 进入vty配置端口
[AR2-ui-vty0-4]acl 2001 inbound 为端口的入方向调用acl