预配置 第一步:R1预配置

R1(config)#int s1/2 R1(config-if)#ip ad 192.168.0.1 255.255.255.0 R1(config-if)#no shu R1(config-if)#int lo0 R1(config-if)#ip ad 172.16.0.1 255.255.255.0 R1(config-if)# 第二步:R2预配置 R2(config)#int s2/1 R2(config-if)#ip ad 192.168.0.2 255.255.255.0 R2(config-if)#no sh R2(config-if)#int lo0 R2(config-if)#ip ad 172.16.1.2 255.255.255.0 实验过程: 第一步:在R1和R2上配置RIP R1(config-if)# R1(config-if)# R1(config-if)#router rip R1(config-router)#version 2 (开启v2) R1(config-router)#network 172.16.0.1 R1(config-router)#network 192.168.1.0 R1(config-router)#^Z R1#

R2(config)#router rip R2(config-router)#network 172.16.0.1
R2(config-router)#network 192.168.1.0 R2(config-router)#^Z R2#

第二步:检查RIP的运行情况 R1#sh ip pro Routing Protocol is "rip" Sending updates every 30 seconds, next due in 22 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 2, receive version 2 Interface Send Recv Key-chain Serial1/2 2 2
Loopback0 2 2 (查看到RIP接收和发送的版本都是2)
Routing for Networks: 172.16.0.0 192.168.0.0 Routing Information Sources: Gateway Distance Last Update Distance: (default is 120)

R1#deb ip rip (开启v2的调试) RIP protocol debugging is on R1#clear ip route * R1# 00:09:09: RIP: sending general request on Serial1/2 to 224.0.0.9 (v2使用组播地址发来更新) 00:09:09: RIP: sending general request on Loopback0 to 224.0.0.9 00:09:09: RIP: ignored v2 packet from 172.16.0.1 (sourced from one of our addresses) R1# 00:09:23: RIP: sending v2 update to 224.0.0.9 via Serial1/2 (192.168.0.1) 00:09:23: 172.16.0.0/16 -> 0.0.0.0, metric 1, tag 0 00:09:23: RIP: sending v2 update to 224.0.0.9 via Loopback0 (172.16.0.1) 00:09:23: 192.168.0.0/24 -> 0.0.0.0, metric 1, tag 0 00:09:23: RIP: ignored v2 packet from 172.16.0.1 (sourced from one of our addresses) (查看到V2发送来的的路由更新)

R1#sh ip rou 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 T - traffic engineered route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 1 subnets C 172.16.0.0 is directly connected, Loopback0 C 192.168.0.0/24 is directly connected, Serial1/2 (这里没有路由,这是为什么呢----因为R2使用的V1版本) R1# 第三步:来到R2上进行调试 R2#sh ip pro Routing Protocol is "rip" Sending updates every 30 seconds, next due in 24 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain Serial2/1 1 1 2
Loopback0 1 1 2 (这里发的是V1版本)
Routing for Networks: 172.16.0.0 192.168.0.0 Routing Information Sources: Gateway Distance Last Update 192.168.0.1 120 00:00:25 Distance: (default is 120)

R2#sh ip rou 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 T - traffic engineered route

Gateway of last resort is not set

  1. 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks R 172.16.0.0/16 [120/1] via 192.168.0.1, 00:00:23, Serial2/1 (这里为什么有) C 172.16.1.0/24 is directly connected, Loopback0 C 192.168.0.0/24 is directly connected, Serial2/1 R2#

第四步:解决方法 R2(config)#int s2/1 R2(config-if)#ip rip send ver 2 R2(config-if)#ip rip receive ver 2 R2(config-if)#

第五步:来到R1上看看 R1#sh ip rou 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 T - traffic engineered route

Gateway of last resort is not set

173.172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks R 172.16.0.0/16 [120/1] via 192.168.0.2, 00:00:15, Serial1/2 (学习到了) C 172.16.0.0/24 is directly connected, Loopback0 C 192.168.0.0/24 is directly connected, Serial1/2

V1 V2 路由更新中不带子网信息 带子网信息 不提供认证 提供认证 不支持vlsm和cidp 支持 广播更新 组播(224.0.0.9)更新 有类别路由 无类别路由