日志文章

2008年03月17日 09:39:00

用分布控制列表控制路由更新

用分布控制列表控制路由更新
实验目的:
RIP的被动接口特性
分布控制列表的配置
通过使用分布控制列表,实现R01路由器只发送回环接口的第3位为偶数的路由条目发送给R02路由器,整个网络只使用RIPv2。



1.配置路由器R01
配网络地址省略~~~~
R01#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R01(config)#access-list 1 permit 1.1.0.0 0.0.254.0
R01(config)#router rip
R01(config-router)#version 2
R01(config-router)#no auto-summary
R01(config-router)#network 1.0.0.0
R01(config-router)#network 192.168.12.0
R01(config-router)#passive-interface default 设置默认为被动接口
R01(config-router)#no passive-interface s0/0 s0/0接口关闭被动接口
R01(config-router)#distribute-list 1 out s0/0   出方向配置分布控制列表
R01(config-router)#^Z
distribute-list命令可以在全局模式下控制出与入的路由更新,也可以在接口下使用,为每个接口的出和入设置路由过滤
2.配合路由器R02
配网络地址省略~~~~
R02#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R02(config)#router rip
R02(config-router)#version 2
R02(config-router)#no auto-summary
R02(config-router)#network 2.0.0.0
R02(config-router)#network 192.168.12.0
R02(config-router)#^Z
3.实验验证
R02#show ip route
Codes: C - connected, S - static, 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
  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  ia - IS-IS inter area, * - candidate default, U - per-user static route
  o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C   192.168.12.0/24 is directly connected, Serial0/0
1.0.0.0/24 is subnetted, 4 subnets
R   1.1.0.0 [120/1] via 192.168.12.1, 00:00:11, Serial0/0
R   1.1.2.0 [120/1] via 192.168.12.1, 00:00:11, Serial0/0
R   1.1.4.0 [120/1] via 192.168.12.1, 00:00:11, Serial0/0
R   1.1.6.0 [120/1] via 192.168.12.1, 00:00:11, Serial0/0
2.0.0.0/24 is subnetted, 1 subnets
C   2.2.2.0 is directly connected, Loopback0
表明R02路由器只收到路由器R01发给它的第3位为偶数的路由条目
R01#show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Serial0/0 filtered by 1, default is 1

Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 25 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface       Send Recv Triggered RIP Key-chain
Serial0/0       2   2                
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
192.168.12.0
Passive Interface(s):
Serial0/1
Serial0/2
Serial0/3
Loopback0
Loopback1
Loopback2
Loopback3
Passive Interface(s):
Loopback4
Loopback5
Loopback6
Loopback7
VoIP-Null0
Routing Information Sources:
Gateway     Distance   Last Update
192.168.12.2     120   00:00:02
Distance: (default is 120)
加粗输出信息表明全局下没有作用分布控制列表,在s0/0接口下作用了分布控制列表
试试做一个奇数的分布控制列表

Tags: RIPv2   控制列表   路由更新  

类别: 路由&交换 |  评论(0) |  浏览(1055) |  收藏
发表评论