1、Packet Tracer 50建构CCNA实验攻略ACL简单的配置Packet Tracer 5.0建构CCNA实验攻略(15)ACL简单的配置2008-10-08 22:43Packet Tracer 5.0是一款非常不错的Cisco(思科)网络设备模拟器,对于想考思科初级认证(如CCNA)的朋友们来说,Packet Tracer 5.0是非常不错的选择。通常我们周围并没有那么多思科的设备供我们学习调试,参加培训费用很贵,上机实践的机会还是有限的,利用Packet Tracer 5.0练习思科IOS操作命令很不错的。近日,在网上下载了思科CCNA640-802指导用书,打算根据此教程与诸位
2、网友共同分享Packet Tracer 5.0的使用方法与技巧,也借此抛砖引玉。ACL(Access Control List,访问控制列表),简单说就是包过滤,根据数据包的报头中的ip地址、协议端口号等信息进行过滤。利用ACL可以实现安全控制。编号:1-99 or 1300-1999(standard IP),100-199 or 2000-2699(Extended IP)。ACL并不复杂,但在实际应用中的,要想恰当地应用ACL,必需要制定合理的策略。 一、实验配置拓扑图图一图二网络中的DNS服务器:192.168.1.2图三网络中的WWW服务器:192.168.1.3二、三个路由器的基本
3、配置LuoShan#sh startup-configUsing 699 bytes!version 12.4no service password-encryption!hostname LuoShan!enable password cisco!username senya password 0 cisco!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed autoshutdown!interface FastEthernet0/1ip address 192
4、.168.3.1 255.255.255.0duplex autospeed auto!interface Serial0/3/0ip address 172.17.1.1 255.255.255.0clock rate 56000!interface Serial0/3/1ip address 172.18.1.2 255.255.255.0!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.3.0network 172.17.0.0network 172.18.0.0auto-summary!ip cl
5、assless!line con 0line vty 0 4password ciscologin!endHuangChuang#sh startup-configUsing 669 bytes!version 12.4no service password-encryption!hostname HuangChuang!enable password cisco!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed autoshutdown!interface Fa
6、stEthernet0/1ip address 192.168.2.1 255.255.255.0duplex autospeed auto!interface Serial0/3/0ip address 172.17.1.2 255.255.255.0!interface Serial0/3/1ip address 172.16.1.1 255.255.255.0clock rate 56000!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.2.0network 172.17.0.0network 1
7、72.16.0.0auto-summary!ip classless!line con 0line vty 0 4password ciscologin!endxixian#sh startup-configUsing 679 bytes!version 12.4service password-encryption!hostname xixian!enable password 7 0822455D0A16!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed au
8、toshutdown!interface FastEthernet0/1ip address 192.168.1.1 255.255.255.0duplex autospeed auto!interface Serial0/3/0ip address 172.18.1.1 255.255.255.0clock rate 56000!interface Serial0/3/1ip address 172.16.1.2 255.255.255.0!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.1.0netw
9、ork 172.18.0.0network 172.16.0.0auto-summary!ip classless!line con 0line vty 0 4password 7 0822455D0A16login!end三、配置简单的ACL、配置ACL限制远程登录到路由器的主机HuangChuang#conf tEnter configuration commands, one per line. End with CNTL/Z.HuangChuang(config)#access-list 1 permit host 192.168.2.2路由器HuangChuang只允许192.168
10、.2.2远程登录(telnet)HuangChuang(config)#line vty 0 4HuangChuang(config-line)#access-class 1 inHuangChuang(config-line)#其它两个路由器配置相似。、配置ACL禁止192.168.3.0/24网段的icmp协议数据包通向与192.168.1.0/24网段xixian(config)#access-list 101 deny icmp 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255xixian(config)#access-list 101 permi
11、t ip any anyxixian(config)#int fa0/1xixian(config-if)#ip access-group 101 outxixian(config-if)#、配置ACL禁止特点的协议端口通讯HuangChuang#conf tEnter configuration commands, one per line. End with CNTL/Z.HuangChuang(config)#ip access-list extended ACL1创建基于名称的扩展ACLHuangChuang(config-ext-nacl)#deny tcp host 192.168
12、.2.2 192.168.1.0 0.0.0.255 eq 80HuangChuang(config-ext-nacl)#deny udp host 192.168.2.3 192.168.1.0 0.0.0.255 eq 53HuangChuang(config-ext-nacl)#permit ip any anyHuangChuang(config-ext-nacl)#exitHuangChuang(config)#int fa0/1HuangChuang(config-if)#ip access-group ACL1 inHuangChuang(config-if)#图四验证ACL。检
13、验、查看ACLHuangChuang#sh access-listStandard IP access list 1 permit host 192.168.2.2 (4 match(es)Extended IP access list ACL1 deny udp host 192.168.2.3 192.168.1.0 0.0.0.255 eq domain deny tcp host 192.168.2.2 192.168.1.0 0.0.0.255 eq www permit ip any anyHuangChuang#show access-listStandard IP access
14、 list 1 permit host 192.168.2.2 (4 match(es)Extended IP access list ACL1 deny udp host 192.168.2.3 192.168.1.0 0.0.0.255 eq domain (15 match(es) deny tcp host 192.168.2.2 192.168.1.0 0.0.0.255 eq www (60 match(es) permit ip any any (34 match(es)HuangChuang#show access-list ACL1Extended IP access lis
15、t ACL1 deny udp host 192.168.2.3 192.168.1.0 0.0.0.255 eq domain (15 match(es) deny tcp host 192.168.2.2 192.168.1.0 0.0.0.255 eq www (60 match(es) permit ip any any (34 match(es)HuangChuang#show access-list 1Standard IP access list 1 permit host 192.168.2.2 (4 match(es)四、配置ACL的路由器配置内容HuangChuang#sh
16、 startup-configUsing 914 bytes!version 12.4no service password-encryption!hostname HuangChuang!enable password cisco!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed autoshutdown!interface FastEthernet0/1ip address 192.168.2.1 255.255.255.0ip access-group AC
17、L1 induplex autospeed auto!interface Serial0/3/0ip address 172.17.1.2 255.255.255.0!interface Serial0/3/1ip address 172.16.1.1 255.255.255.0clock rate 56000!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.2.0network 172.17.0.0network 172.16.0.0auto-summary!ip classless!access-li
18、st 1 permit host 192.168.2.2ip access-list extended ACL1deny udp host 192.168.2.3 192.168.1.0 0.0.0.255 eq domaindeny tcp host 192.168.2.2 192.168.1.0 0.0.0.255 eq wwwpermit ip any any!line con 0line vty 0 4access-class 1 inpassword ciscologin!endLuoShan#sh startup-configUsing 756 bytes!version 12.4
19、no service password-encryption!hostname LuoShan!enable password cisco!username senya password 0 cisco!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed autoshutdown!interface FastEthernet0/1ip address 192.168.3.1 255.255.255.0duplex autospeed auto!interface S
20、erial0/3/0ip address 172.17.1.1 255.255.255.0clock rate 56000!interface Serial0/3/1ip address 172.18.1.2 255.255.255.0!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.3.0network 172.17.0.0network 172.18.0.0auto-summary!ip classless!access-list 2 permit host 192.168.3.2!line con
21、0line vty 0 4access-class 2 inpassword ciscologin!endxixian#show startup-configUsing 808 bytes!version 12.4service password-encryption!hostname xixian!enable password 7 0822455D0A16!ip ssh version 1no ip domain-lookup!interface FastEthernet0/0no ip addressduplex autospeed autoshutdown!interface Fast
22、Ethernet0/1ip address 192.168.1.1 255.255.255.0ip access-group 101 outduplex autospeed auto!interface Serial0/3/0ip address 172.18.1.1 255.255.255.0clock rate 56000!interface Serial0/3/1ip address 172.16.1.2 255.255.255.0!interface Vlan1no ip addressshutdown!router eigrp 100network 192.168.1.0network 172.18.0.0network 172.16.0.0auto-summary!ip classless!access-list 101 deny icmp 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255access-list 101 permit ip any any!line con 0line vty 0 4password 7 0822455D0A16login!end
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1