4.实验配置及监测结果
首先配置各路由器,并且通过路由选择协议的配置实现了整个拓扑的IP连通性,在此基础上进行IP访问控制列表的配置和监测。
在R1上设置enable口令为cisco,VTY口令为ciscol,用于Telnet测试。
以上配置在以前章节中已进行过实验,在本实验中不再给出配置清单。
我们主要在R2路由器上配置访问控制列表,R1和R3用于测试目的。
第1部分:配置和引用标准IP访问控制列表
配置清单10-1列出了在R2路由器上配置和引用标准IP访问控制列表的操作。
配置清单10-1 配置和引用标准IP访问控制列表
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#access-list 1 deny 30.1.1.0 0.0.0.255
R2(config)#access-Ust 1 permit any
R2(config)#int s0
R2(config-if)#ip access-group 1 in
R2(config-if)#^Z
R2#sh
14:34:20: %SYS-5-CONFIG_1: Configured from console by console
R2#sh ip access-list 1
Standard IP access list 1
deny 30.1.1.0,wukdcard buts 0.0.0.255 check=2
permit any(2 matches)
R2#sh ip int s0
Serial0 is up, line protocol is up
Internet address is 20.1.1.2/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Multicast reserved groups joined: 224.0.0.9
Outgoing access list is not set
Inbound access list is 1
Proxy ARP is enabled
Security level is default
... (输出省略)
R2#clear access-list counters
R2#sh ip access-1 1
Standard IP access list 1
deny 30.1 .IA wildcard bits 0.0.0.255
permit any
R2#
Term_Server#3
[Resuming connection 3 to R3 ... ]
R3#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echosto 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5). round-tri/min/avg/max=:32/37/48 ms
R3#ping
Protocol [ip]:
Target IP address: 10.1.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 30.1.1.3
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 10.1.1.1,timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R3#^Z
Term_Server#2
[Resuming connection 3 to R2 ... ]
R2#sh ip access-1 1
Standard IP access list 1
deny 30.1.1.0, wildcard bits 0.0.0.255 (5 matches) checks 15
permit any (5 matches)
责任编辑:小草