CCNA知識小結(jié):動態(tài)路由RIP
RIP (Routing Information Protocol)——路由信息協(xié)議
RIP 分兩個版本(RIPv1和RIPv2)
CCNA知識——動態(tài)路由RIP的概述
Hop(跳數(shù)) 計算(***15跳)
路由器每隔30秒更新
最多支持相同hop數(shù)的6條路徑
RIP是以跳數(shù)為度量值的距離矢量路由協(xié)議:
30秒更新一次(更新計時器)
180秒失效(失效計時器)
240秒路由從路由表中刪除 (刷新計時器)
CCNA知識——動態(tài)路由RIP的缺陷
以跳數(shù)為依據(jù)過于簡單,經(jīng)常獲得非***路徑
度量值以15為限,不能適合大的網(wǎng)絡(luò)
安全性差,接收來自任何路由設(shè)備的路由更新
收斂緩慢。經(jīng)常大于5分鐘
RIPv1利用廣播更新路由信息,消耗帶寬大
RIPv1和RIPv2的區(qū)別:
RIPv1 RIPv2
有類路由協(xié)議 無類路由協(xié)議
不支持VLSM(可變長子網(wǎng)掩碼) 支持VLSM
不支持不連續(xù)網(wǎng)絡(luò) 支持不連續(xù)網(wǎng)絡(luò)
以廣播方式通告信息 以組播方式通告信息
CCNA知識——動態(tài)路由RIP的配置
啟用RIP
Router(config)#router rip
Router (config-router)#network 本地網(wǎng)段
啟用RIPv2
Router (config-router)#version 2
為抑制RIP傳播
Router (config-router)#passive-interface fa0/0
試驗環(huán)境:
R1的ip地址是172.16.1.1/24(S0/0)
R2的ip地址是172.16.1.2/24 (S0/0) 172.32.1.1/24(S0/1)
R3的ip地址是172.32.1.2/24(S0/0)
先用RIPv1來做配置
R1的基本配置:
Router> en
Router# conf t
Router(config)# host R1
r1 (config)#int s0/0
r1(config-if)#ip address 172.16.1.1 255.255.255.0
r1(config-if)#no shut
r1 (config)#router rip
r1(config-router)# network 172.16.1.0
R2的基本配置:
Router> en
Router#conf t
Router(config)#host r2
r2(config)#int s0/0
r2 (config-if)#ip address 172.16.1.1 255.255.255.0
r2 (config-if)#no shut
r2(config)#int s0/1
r2(config-if)#ip add 172.32.1.1 255.255.255.0
r2(config-if)#no shut
r2(config)#router rip
r2(config-router)# network 172.16.1.0
r2(config-router)# network 172.32.1.0
R3的基本配置:
Router>en
Router#conf t
Router(config)#host r3
r3(config)#int s0/0
r3(config-if)#ip add 172.32.1.2 255.255.255.0
r3(config-if)#no shut
r3(config)#router rip
r3(config-router)# network 172.32.1.0
查看:
R1
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, 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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0/0
R 172.32.0.0/16 [120/1] via 172.16.1.2, 00:00:16,Serial0/0
R2
r2#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, 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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Serial0/0
172.32.0.0/24 is subnetted, 1 subnets
C 172.32.1.0 is directly connected, Serial0/1
R3
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, 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
R 172.16.0.0/16 [120/1] via 172.32.1.1, 00:00:15, Serial0/0
172.32.0.0/24 is subnetted, 1 subnets
C 172.32.1.0 is directly connected, Serial0/0
測試:
r1#ping 172.16.1.2
r1#ping 172.32.1.1
r1#ping 172.32.1.2
再用RIPv2來做配置
R1的基本配置:
Router> en
Router# conf t
Router(config)# host R1
r1 (config)#int s0/0
r1(config-if)#ip address 172.16.1.1 255.255.255.0
r1(config-if)#no shut
r1 (config)#router rip
r1(config-router)#version 2
r1(config-router)# network 172.16.1.0
R2的基本配置:
Router> en
Router#conf t
Router(config)#host r2
r2(config)#int s0/0
r2 (config-if)#ip address 172.16.1.1 255.255.255.0
r2 (config-if)#no shut
r2(config)#int s0/1
r2(config-if)#ip add 172.32.1.1 255.255.255.0
r2(config-if)#no shut
r2(config)#router rip
r2(config-router)#version 2
r2(config-router)# network 172.16.1.0
r2(config-router)# network 172.32.1.0
R3的基本配置:
Router>en
Router#conf t
Router(config)#host r3
r3(config)#int s0/0
r3(config-if)#ip add 172.32.1.2 255.255.255.0
r3(config-if)#no shut
r3(config)#router rip
r3(config-router)#version 2
r3(config-router)# network 172.32.1.0
查看
r1#sh run
r1#sh ip protocols
r2#sh run
r2#sh ip protocols
r3#sh run
r3#sh ip protocols
r1#ping 172.32.1.2
這樣,動態(tài)路由RIP的配置就完成了。
【編輯推薦】