[CCNA]试验46 标准访问控制列表



R1配置
r1(config)#int s1/2
r1(config-if)#ip add 10.1.1.1 255.255.255.0
r1(config-if)#no sh
r1(config)#int lo0
r1(config-if)#ip add 1.1.1.1 255.255.255.0
r1(config)#router ospf 1
r1(config-router)#net 0.0.0.0 0.0.0.0 area 0

R2配置

r2(config)#int s2/1
r2(config-if)#ip add 10.1.1.2 255.255.255.0
r2(config-if)#no sh
r2(config)#int lo0
r2(config-if)#ip add 2.2.2.2 255.255.255.0
r2(config)#router ospf 1
r2(config-router)#net 0.0.0.0 0.0.0.0 area 0

测试

r1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/28/36 ms
r1(config)#access-list 50 deny 2.2.2.0 0.0.255.255
r1(config)#access-list 50 permit any
r1(config)#int s1/2
r1(config-if)#ip access-group 50 in
r1(config-if)#^Z

在R2上测试ping R1

r2#p
Protocol [ip]:
Target IP address: 1.1.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: 2.2.2.2
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)

试验结束

你可能感兴趣的:(列表,访问,标准,控制,休闲)