- 积分
- 888
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
   
|
发表于 2014-9-12 11:38:52
|
显示全部楼层
RIP属于动态路由协议、内部网关协议的一种,同时也是一种距离矢量(DV)协议,使用跳数描述。
目前RIP有三个版本,其中IPV4使用RIPv1、RIPv2,IPV6使用RIPng。
使用两种数据包传输更新:
Request Message(请求信息):用来向邻居请求发送update(完整路由表)
Response Message(应答信息):传输请求的update(完整路由表)
默认情况下,每隔30秒利用UDP的520端口向与它直连的网络邻居广播(RIPv1)或组播(RIPv2,组播地址224.0.0.9)进行更新。为防止路由器路由表更新同步,RIP实际发送更新的时间为25.5.到30秒。
RIP协议分RIPv1和RIPv2,具有的共同特征为:
1、都为DV(距离矢量)路由协议
2、使用metric(基于跳数的),metric为16代表不可达
3、默认的路由更新周期为30s
4、管理距离(AD)为120
5、支持触发更新
6、最大支持跳数为15跳
7、支持的负载均衡(等价路径)默认为4条,可在协议中使用maximum-paths number-paths修改,最大为6条
8、使用UDP的520端口进行路由更新
区别在于:
示例拓扑:
R1上的配置:- R1(config)#int f0/0
- R1(config-if)#ip add 192.168.12.1 255.255.255.0
- R1(config-if)#no sh
- R1(config)#router rip #启用RIP协议
- R1(config-router)#version 2 #配置RIP版本
- R1(config-router)#net 192.168.12.0 #通告网段
- R1(config-router)#no au
复制代码 R2上的配置:- R2(config)#int f0/0
- R2(config-if)#ip add 192.168.12.2 255.255.255.0
- R2(config-if)#no sh
- R2(config)#int f0/1
- R2(config-if)#ip add 192.168.23.2 255.255.255.0
- R2(config-if)#no sh
- R2(config)#router rip #启用RIP协议
- R2(config-router)#no au #关闭自动汇总
- R2(config-router)#version 2 #配置RIP协议版本
- R2(config-router)#net 192.168.12.0 #通告网段
- R2(config-router)#net 192.168.23.0
复制代码 R3上的配置:- R3(config)#int f0/1
- R3(config-if)#ip add 192.168.23.3 255.255.255.0
- R3(config-if)#no sh
- R3(config)#router rip #启用RIP协议
- R3(config-router)#no au #关闭自动汇总
- R3(config-router)#version 2 #配置RIP协议版本
- R3(config-router)#net 192.168.23.0 #通告网段
复制代码 R3上查看IP路由表:
R3#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
- R 192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:01, FastEthernet0/1 #此为收到的192.168.12.0网段的路由
- C 192.168.23.0/24 is directly connected, FastEthernet0/1 #直连路由
复制代码 在R3上尝试ping R1的f0/0:- R3#ping 192.168.12.1
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
- !!!!!
- Success rate is 100 percent (5/5), round-trip min/avg/max = 44/76/148 ms
复制代码 |
沙发
2014-9-12 11:38:52
回复(0)
收起回复
|