R1配置: <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

R1#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

     192.168.1.0/28 is subnetted, 2 subnets

C       192.168.1.32 is directly connected, Serial1/0

R       192.168.1.16 [120/1] via 192.168.1.34, 00:00:24, Serial1/0

R2配置:

  R2#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

     192.168.1.0/28 is subnetted, 2 subnets

C       192.168.1.32 is directly connected, Serial2/0

C       192.168.1.16 is directly connected, Serial1/0

R3配置:

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

     192.168.1.0/28 is subnetted, 2 subnets

R       192.168.1.32 [120/1] via 192.168.1.17, 00:00:18, Serial1/0

C       192.168.1.16 is directly connected, Serial1/0

 
R1配置:

R1#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

     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C       192.168.1.32/27 is directly connected, Serial1/0

R       192.168.1.16/32 [120/1] via 192.168.1.34, 00:00:06, Serial1/0

R1#

R1#debug ip rip database 

RIP database events debugging is on

R1#

*Mar  1 00:39:58.263: RIP-DB: network_update with 192.168.1.16/24 succeeds

*Mar  1 00:39:58.263: RIP-DB: adding 192.168.1.16/0 (metric 1) via 192.168.1.34 on Serial1/0 to RIP database

 
 
RIP

(1) 如果接口的IP地址是在相同的主类网络子网中,子网掩码不一致,会导致路由信息发布失败。

(2) 如果接口的IP地址是在不同的主类网络子网中,子网掩码不一致,路由通告正常,且正常汇总。

 

A、如果在同一主网的子网通告,采用接收接口的掩码更新安装进路由表,如果收到子网通告主机位不为零,则以/32主机路由方式安装进路由表,并通告给下一跳路由器。

B、如果在不同主网的子网通告,如果在路由表里已经存在对应子网,则忽略改更新。如果在路由表里不存在,则以主类网络号安装进路由表,或者以/32主机路有的方式安装进路由表(当接收接口为unnumbered link 时)。出现/32为主机路由一共是以上2种可能。