扩展IP访问控制列表

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 
1、允许屏通路由器,但是拒绝TELNET到路由器
router(config)#access-list 101 permit icmp any any 
// 允许ICMP协议

router(config)#access-list 101 deny tcp any any eq 23 
// 拒绝TELNET,端口号为:23

router(config)#interface ethernet 0                     
// 进入到接口配置模式

router(config-if)#ip access-group <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />101 in               
// 将表号为101ACL应用到接口中

router(config)#no access-list 101 deny tcp any any eq 23
// 允许TELNET,端口号为:23
 

 
2、 只拒绝一台主机PING通路由器,其它协议均允许

 
router(config)#no access-list 101
// 删除前面定义的ACL

router(config-if)#no ip access-group 101 
// 删除前面应用的表号为101ACL

router#conf t                     
// 进入到全局配置模式

router(config)#access-list 101 deny icmp any any 
// 拒绝ICMP协议

router(config)#access-list 101 permit ip any any  
// 允许所有IP协议

router(config)#interface ethernet 0                 
// 进入端口配置

router(config-if)# ip access-group 101 in          
// 将表号为101ACL应用到此接口中