rip 版本1不连续子网的处理

本文通过路由器配置展示了RIP版本1中处理不连续子网的方法,包括路由表的变化和ping测试,揭示了secondary地址在解决这个问题中的作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

之前:show ip route
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, 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

C    192.168.10.0/24 is directly connected, Serial1/0
C    192.168.20.0/24 is directly connected, Serial1/1
R    10.0.0.0/8 [120/1] via 192.168.10.1, 00:00:10, Serial1/0
                [120/1] via 192.168.20.1, 00:00:11, Serial1/1 
R4#ping 10.1.1.1

产生这样结果的原因是自动汇总(不可关闭)


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!U!.!
Success rate is 60 percent (3/5), round-trip min/avg/max = 36/46/64 ms
R4#ping 10.2.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.1, timeout is 2 seconds:
!U!.!
Success rate is 60 percent (3/5), round-trip min/avg/max = 24/40/68 ms

show ip rip database
10.0.0.0/8    auto-summary
10.0.0.0/8
    [1] via 192.168.20.1, 00:00:06, Serial1/1
    [1] via 192.168.10.1, 00:00:05, Serial1/0

192.168.10.0/24    auto-summary
192.168.10.0/24    directly connected, Serial1/0
192.168.20.0/24    auto-summary
192.168.20.0/24    directly connected, Serial1/1

配secondary地址之后:show ip route
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, 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

C    192.168.10.0/24 is directly connected, Serial1/0
C    192.168.20.0/24 is directly connected, Serial1/1
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
R       10.2.2.0/24 [120/1] via 10.4.4.1, 00:00:01, Serial1/1
C       10.4.4.0/24 is directly connected, Serial1/1
R       10.1.1.0/24 [120/1] via 10.3.3.1, 00:00:28, Serial1/0
R       10.0.0.0/24 [120/1] via 192.168.10.1, 00:00:28, Serial1/0
                    [120/1] via 192.168.20.1, 00:00:01, Serial1/1
C       10.3.3.0/24 is directly connected, Serial1/0
R       10.0.0.0/8 [120/1] via 192.168.10.1, 00:01:23, Serial1/0
                   [120/1] via 192.168.20.1, 00:01:24, Serial1/1
R4#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/84/156 ms
R4#ping 10.2.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/88/116 ms

show ip rip database
10.0.0.0/8    auto-summary
10.0.0.0/24
    [1] via 192.168.20.1, 00:00:13, Serial1/1
    [1] via 192.168.10.1, 00:00:03, Serial1/0
10.1.1.0/24
    [1] via 10.3.3.1, 00:00:03, Serial1/0
10.2.2.0/24
    [1] via 10.4.4.1, 00:00:13, Serial1/1
192.168.10.0/24    auto-summary
192.168.10.0/24    directly connected, Serial1/0
192.168.20.0/24    auto-summary
192.168.20.0/24    directly connected, Serial1/1

另一个实验:


 R2#show ip route
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, 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

     23.0.0.0/24 is subnetted, 1 subnets
C       23.1.1.0 is directly connected, Serial1/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial1/0
R    192.168.1.0/24 [120/1] via 12.1.1.1, 00:00:24, Serial1/0
R    192.168.2.0/24 [120/1] via 23.1.1.3, 00:00:16, Serial1/1

R2#show ip rip da
R2#show ip rip database
12.0.0.0/8    auto-summary
12.1.1.0/24    directly connected, Serial1/0
23.0.0.0/8    auto-summary
23.1.1.0/24    directly connected, Serial1/1
192.168.1.0/24    auto-summary
192.168.1.0/24
    [1] via 12.1.1.1, 00:00:06, Serial1/0
192.168.2.0/24    auto-summary
192.168.2.0/24
    [1] via 23.1.1.3, 00:00:25, Serial1/1

R2#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/44/80 ms
R2#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/48/64 ms

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值