免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1008 | 回复: 0
打印 上一主题 下一主题

ACL访问控制列表 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-16 22:09 |只看该作者 |倒序浏览

R1配置:
Router>en
Router#conf t
Router(config)#host R1
R1(config)#int loopback0
R1(config-if)#ip add 1.1.1.1  255.255.255.0
R1(config-if)#no shut
R1(config-if)#int s1/2
R1(config-if)#ip add 12.0.0.1 255.255.255.0
Bad mask /24 for address 12.0.0.1
R1(config-if)#ip subnet-zero
R1(config)#int s1/2
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#^Z
R1#
R1#confi t
R1(config)#metric weight 5 4 3 2 1
R1(config)#router rip
R1(config-router)#net 1.0.0.0
R1(config-router)#net 12.0.0.0
R1(config-router)#^Z
R1#ping 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 204/445/896 ms
R1#ping 23.0.0.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 296/704/1260 ms

R1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route, o - ODR

Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
R    3.0.0.0/8 [120/2] via 12.0.0.2, 00:00:22, Serial1/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial1/2
R    23.0.0.0/8 [120/1] via 12.0.0.2, 00:00:22, Serial1/2

R2配置:
Router>en
R2(config)#int s2/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config)#int s2/3
R2(config-if)#ip add 23.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#^Z
R2#conf t
R2(config)#access-list 3 permit 1.0.0.0

R2(config)#router rip
R2(config-router)#net 12.0.0.0
R2(config-router)#net 23.0.0.0
R2(config-router)#offset 3 out 8 s2/3
R2(config-router)#exit
R2(config)#acc
R2(config)#access-list 3 permit 1.1.1.1
R2(config)#^Z

R3配:
Router>en
Router#conf t
Router(config)#host R3
R3(config)#int s3/2
R3(config-if)#ip add 23.0.0.3 255.255.255.0
Bad mask /24 for address 23.0.0.3
R3(config-if)#ip subnet-zero
R3(config)#int s3/2
R3(config-if)#ip add 23.0.0.3 255.255.255.0
R3(config-if)#int loopback1
R3(config-if)#ip add  3.3.3.3  255.255.255.0
R3(config)#router rip
R3(config-router)#net  3.0.0.0
R3(config-router)#net  23.0.0.0
R3(config-router)#^Z
R3#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 188/372/720 ms
R3#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route, o - ODR

Gateway of last resort is not set
R    1.0.0.0/8 [120/5] via 23.0.0.2, 00:00:21, Serial3/2
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback1
R    12.0.0.0/8 [120/4] via 23.0.0.2, 00:00:21, Serial3/2
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial3/2









本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38497/showart_302914.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP