您的位置:首页 > 其它

PingingLab传世经典系列《CCNA完全配置宝典》-5.2 编号拓展ACL

2013-08-10 12:11 525 查看
5.2 编号拓展ACL实验目的:
1、掌握编号拓展ACL的基本编写。
2、理解编号拓展ACL的基本特性。

实验拓扑:



实验步骤:1、依据图中拓扑,配置各个路由器的IP地址,并部署静态路由保证全网连通,配置如下:R1上R1(config)#ip route 23.1.1.0 255.255.255.0 12.1.1.2R1(config)#ip route 3.3.3.3 255.255.255.255 12.1.1.2R1(config)#ip route 8.8.8.8 255.255.255.255 12.1.1.2R2上R2(config)#ip route 192.168.1.0 255.255.255.0 12.1.1.1R2(config)#ip route 192.168.2.0 255.255.255.0 12.1.1.1R2(config)#ip route 3.3.3.3 255.255.255.255 23.1.1.3R2(config)#ip route 8.8.8.8 255.255.255.255 23.1.1.3R3上R3(config)#ip route 12.1.1.0 255.255.255.0 23.1.1.2R3(config)#ip route 192.168.1.0 255.255.255.0 23.1.1.2R3(config)#ip route 192.168.2.0 255.255.255.0 23.1.1.2 测试连通性,如下:R1#ping 3.3.3.3 source 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:Packet sent with a source address of 192.168.1.1!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 40/40/40 msR1#ping 8.8.8.8 source 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:Packet sent with a source address of 192.168.2.1!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/43/56 ms 可以看到,内网与外网通信没有问题。2、在R2上部署编号拓展ACL,使得内网网段192.168.1.0/24不能访问外网主机3.3.3.3的23号端口,192.168.2.0/24 网段不能Ping 通8.8.8.8,配置如下:R2上R2(config)#access-list 100 deny tcp 192.168.1.0 0.0.0.255 host 3.3.3.3 eq 23R2(config)#access-list 100 deny icmp 192.168.2.0 0.0.0.255 host 8.8.8.8R2(config)#access-list 100 permit ip any anyR2(config)#int f0/0R2(config-if)#ip access-group 100 inR3上R3(config)#line vty 0 15R3(config-line)#no loginR3(config-line)#exit3、测试编号拓展ACL,如下:R1#telnet 3.3.3.3 /source-interface lo1Trying 3.3.3.3 ...% Destination unreachable; gateway or host downR1#telnet 3.3.3.3Trying 3.3.3.3 ... OpenR3>exit 可以看到,R1本地环回地址192.168.1.1无法远程访问3.3.3.3,其他地址则可以。R1#ping 8.8.8.8Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/40/44 msR1#ping 8.8.8.8 source loopback 2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:Packet sent with a source address of 192.168.2.1UUUUUSuccess rate is 0 percent (0/5) 从上面可以看出,192.168.2.0网段无法Ping通8.8.8.8,但是其他网段可以。 从上面的实验可以看出,编号拓展ACL可以匹配源目IP、端口和协议,相比标准ACL来说,对流量的控制更加细腻,能满足更加复杂的网络环境。但是只要是基于编号的ACL,不管是编号标准还是编号拓展,都不易于管理,例如无法删除ACL中单独的某条语句等,而基于命名的ACL可以解决这些问题,接下来有详细介绍。此实验完成。==========================================PingingLab·高品质IT教育提供商CCIE 实验室·IT项目实战·高端人才定制深圳拼客信息科技有限公司·广州大学城外环西路站新浪微博:@拼客科技PingingLab @PingingLab-陈鑫杰PingingLab微信公众号:pinginglab PingingLab技术交流群:240920680

本文出自 “陈鑫杰讲网络” 博客,请务必保留此出处http://chenxinjie.blog.51cto.com/7749507/1274480
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐