这个实验是看了人家博客而模仿做的,旨在自己体会其中的过程
R1  RIPv1    
R2  RIPv2


R1
interface Loopback1
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 2.2.2.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
 network 0.0.0.0          //宣布R1上的所有接口进rip进程
no auto-summary
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end


R2

!
interface Loopback1
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0
ip address 2.2.2.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 0.0.0.0
no auto-summary
!



在R1上debug可以看到
*Mar 1 00:16:12.699: RIP: sending v1 update to 255.255.255.255 via Loopback1 (192.168.1.1)
*Mar 1 00:16:12.699: RIP: build update entries
*Mar 1 00:16:12.699: network 2.0.0.0 metric 1
*Mar 1 00:16:12.703: network 192.168.2.0 metric 1

RIPv1 是通过广播地址255.255.255.255发送更新的
下面看看R1的接受更新
*Mar 1 00:16:19.651: RIP: received v2 update from 2.2.2.2 on FastEthernet0/0
*Mar 1 00:16:19.651: 192.168.2.0/24 via 0.0.0.0 in 1 hops

RIPv1默认接口是可以接受RIPv2的更新的

在R2上debug可以看到
*Mar 1 00:11:42.259: RIP: sending v2 update to 224.0.0.9 via Loopback1 (192.168.2.1)
*Mar 1 00:11:42.259: RIP: build update entries
*Mar 1 00:11:42.259: 2.2.2.0/30 via 0.0.0.0, metric 1, tag 0
*Mar 1 00:11:42.263: 192.168.1.0/24 via 0.0.0.0, metric 2, tag 0

在这里可以看到RIPv2是以组播地址224.0.0.9发送更新的
下面是R2接受RIPV1的更新数据包的动作
*Mar 1 00:11:57.515: RIP: ignored v1 packet from 2.2.2.1 (illegal version)
这里我们可以看到RIPV2忽略RIPV1的更新(默认)

在R1和R2看看接口接受更新版本情况
R1
ripv1#show ip protocol
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 29 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
  FastEthernet0/0       1        1 2   //这里是发送v1的更新接受v1和v2的更新
  Loopback1            1           1 2  
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
0.0.0.0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 120 00:00:22
Distance: (default is 120)

R2
ripv2#
*Mar 1 00:28:10.927: %SYS-5-CONFIG_I: Configured from console by console
ripv2#show ip protocol
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 15 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
  FastEthernet0/0   2     2       //这里是发送v2的更新接受v2的更新
  Loopback1           2     2  
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
0.0.0.0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.1 120 00:29:19
Distance: (default is 120)



这里我们可以再接口上修改属性来让接口可以接受v1和v2 的更新
ripv2(config-if)#ip rip receive version 1 2
ripv2(config-if)#end
ripv2#show ip
*Mar 1 00:43:18.191: %SYS-5-CONFIG_I: Configured from console by console
ripv2#show ip protocol
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 26 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
FastEthernet0/0 2 1 2
Loopback1 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
0.0.0.0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.1 120 00:33:19
Distance: (default is 120)
ripv2#

这样R2就可以RIPV1的更新了
ripv2#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

2.0.0.0/30 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 2.2.2.1, 00:00:03, FastEthernet0/0
 //可以学习到更新
C 192.168.2.0/24 is directly connected, Loopback1
ripv2#



参考blog:http://spccie.blog.51cto.com/1088987/269144