1. RIP:路由选择信息协议:(Routing Information Protocol)
1) Metric:跳数 (RIP只适合小网络,最大跳数16跳:第16跳不可达)
2) 管理距离值:(AD):0-255,每个路由协议都一个AD值
C:直连路由 AD:0
S:静态路由 AD:1
R:RIP AD:120
当路由器通过不同路由协议学到同一条路由(网络号、掩码一致),比较路由协议的AD值,AD小的防盗路由表中
3) 收敛时间:从网络拓扑发生变化到网络中所有路由器都知道这个变化的时间就叫收
敛时间
2. 实验1:拓扑图如下:
CCNA笔记之第十四节:RIP协议(1)_RIP
1) 两台PC配置IP、掩码、网关;各路由器各端口配置IP、掩码并激活:
R1(config)#int f0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int f0/1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#int f0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int f0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no shutdown
R3(config)#int f0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int f0/1
R3(config-if)#ip add 192.168.2.1 255.255.255.0
R3(config-if)#no shutdown
2) 每个路由器配RIP,network配直连主网:
R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 12.0.0.0
R2(config)#router rip
R2(config-router)#network 12.0.0.0
R2(config-router)#network 23.0.0.0
R3(config)#router rip
R3(config-router)#network 23.0.0.0.
R3(config-router)#network 192.168.2.0
R1#show ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
R 23.0.0.0/8 [120/1] via 12.12.12.2, 00:00:00, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1
R 192.168.2.0/24 [120/2] via 12.12.12.2, 00:00:00, FastEthernet0/0
PC>ping 192.168.2.2
Request timed out.
Reply from 192.168.2.2: bytes=32 time=16ms TTL=125
Reply from 192.168.2.2: bytes=32 time=8ms TTL=125
Reply from 192.168.2.2: bytes=32 time=21ms TTL=125
R1#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/1 1 2 1
FastEthernet0/0 1 2 1
Maximum path: 4
Distance: (default is 120)
3. 实验2:上个实验1中路由表更新时间30s,有效时间180s,刷新时间240s
1) 把R3上的接口f0/1 shutdown:
R3(config)#int f0/1
R3(config-if)#shutdown
2) 在R2上查看路由信息:经过180s后R2 上从R3学到的192.168.2.0网段的路由状态变化为:is possibly down:
R2#sh ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, FastEthernet0/1
R 192.168.1.0/24 [120/1] via 12.12.12.1, 00:00:11, FastEthernet0/0
R 192.168.2.0/24 is possibly down, routing via 23.23.23.3,
FastEthernet0/1
3) 经过240s后再在R2上查看路由表中学到的R3的192.168.2.0网段的路由被删除:
R2#sh ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, FastEthernet0/1
R 192.168.1.0/24 [120/1] via 12.12.12.1, 00:00:25, FastEthernet0/0
 
 
 
----本文档由 联科教育 (http://www.iLync.cn)原创提供,有任何问题可以咨询我们专家团队,谢谢!