R1基本配置
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line console 0
Router(config-line)#logging synchronous
Router(config-line)#no exec-timeout
Router(config-line)#login
Router(config)#int lo 0
Router(config-if)#ip ad 1.1.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#int s1/2
Router(config-if)#ip add 12.0.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#router rip          启用ripv1协议
Router(config-router)#network 1.1.1.1  宣告网络1.1.1.1
Router(config-router)#network 12.0.0.0   同上
Router#show ip route                //v1版的路由表
 
Gateway of last resort is not set
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
R    2.0.0.0/8 [120/1] via 12.0.0.2, 00:00:08, Serial1/2
R    23.0.0.0/8 [120/1] via 12.0.0.2, 00:00:08, Serial1/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial1/2
Router(config)#router rip 
Router(config-router)#version 2   //启用V2版本
 
Router#show ip route
 
Gateway of last resort is not set       //V2版本的路由表
 
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 [120/1] via 12.0.0.2, 00:00:25, Serial1/2
     3.0.0.0/24 is subnetted, 1 subnets
R       3.3.3.0 [120/2] via 12.0.0.2, 00:00:25, Serial1/2
     23.0.0.0/24 is subnetted, 1 subnets
R       23.0.0.0 [120/1] via 12.0.0.2, 00:00:25, Serial1/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial1/2
 
 
R2的基本配置
 
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#logging synchronous
Router(config-line)#no exec-timeout
 
Router(config)#int s2/1
Router(config-if)#ip ad 12.0.0.2 255.255.255.0
Router(config-if)#no shutdown
Router(config)#int s2/3
Router(config-if)#ip ad 23.0.0.2 255.255.255.0
Router(config-if)#no shutdown 
 
Router(config)#int lo 0
Router(config-if)#ip ad 2.2.2.2 255.255.255.0
Router(config-if)#no shutdown
Router(config)#router rip
Router(config-router)#network  2.2.2.2
 
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#net 23.0.0.0
Router(config-router)#net 12.0.0.0
Router(config-router)#net 2.2.2.2
 
Router#show ip route
Gateway of last resort is not set
 
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/1] via 12.0.0.1, 00:00:24, Serial2/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
R       3.3.3.0 [120/1] via 23.0.0.3, 00:00:12, Serial2/3
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial2/3
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial2/1
 
R3基本配置
 
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#logging syn
Router(config-line)#logging synchronous
Router(config-line)#no exec-timeout
 
Router(config)#int lo 0
Router(config-if)#ip ad 3.3.3.3 255.255.255.0
Router(config-if)#no shutdown
 
Router(config)#int s3/2
Router(config-if)#ip ad 23.0.0.3 255.255.255.0
Router(config-if)#no shutdown
 
Router(config)#router rip
Router(config-router)#no auto-summary
Router(config-router)#version v2
Router(config)#router rip
Router(config-router)#network 3.3.3.3
Router(config-router)#network 23.0.0.0
 
Router#show ip route
 
Gateway of last resort is not set
 
R    1.0.0.0/8 [120/2] via 23.0.0.2, 00:00:31, Serial3/2
R    2.0.0.0/8 [120/1] via 23.0.0.2, 00:00:31, Serial3/2
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.0.0.0 is directly connected, Serial3/2
R    12.0.0.0/8 [120/1] via 23.0.0.2, 00:00:31, Serial3/2