验证:
R3(config-if)#do ping 12.1.1.1 #允许R3访问R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/34/64 ms
------------------------------------------------------------------------------------------------
R4(config-if)#do ping 24.1.1.1 #禁止R4访问R1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 24.1.1.1, timeout is 2 seconds:
UUUUU
------------------------------------------------------------------------------------------------
R2#show ip access-lists
Standard IP access list 1
10 deny 24.1.1.4 (10 matches) #有match的匹配值,证明acl有数据包匹配。
20 permit any (5 matches)
需求二解法:
命令配置:
R2
ip access-list extended ccna
deny icmp host 23.1.1.3 host 12.1.1.1
deny tcp host 24.1.1.4 host 12.1.1.1 eq telnet
permit ip any any
!
interface Serial1/0
ip access-group ccna out
验证:
R3#ping 12.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:
UUUUU
Success rate is 0 percent (0/5)
!
R3#telnet 12.1.1.1
Trying 12.1.1.1 ... Open
User Access Verification
Password:
------------------------------------------------------------------------------------
R4#ping 12.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/35/56 ms
!
R4#telnet 12.1.1.1
Trying 12.1.1.1 ...
% Destination unreachable; gateway or host down
优质内容筛选与推荐>>
1、Silverlight客户端实现图片的截取和压缩----之上传头像2、OpenStack(3)-placement服务部署3、Java数据结构和算法 - 二叉树4、MAC下Android的Eclipse开发环境的搭建[转]5、python学习资料链接
长按二维码向我转账
受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。
阅读
好看
已推荐到看一看
你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
取消
分享想法到看一看
确定
最多200字,当前共字
微信扫一扫
关注该公众号