2.2 RIPV2配置详解

6.度量值

度量值是到达目的网络的代价。度量值的大小会影响路由器到达目的网段的路由选择。RIP 以跳数作为路由的度量值,跳数就是到达目的网络需要经过的路由器个数,跳数越少,路由越优。

图片[1]-2.2 RIPV2配置详解-大赛人网
图2-16 RIPV2 度量值网络拓扑

1)基本配置

[R1-rip-1]
[R1-rip-1]version 2
[R1-rip-1]network 12.0.0.0
[R1-rip-1]network 13.0.0.0

[R2-rip-1]
[R2-rip-1]version 2
[R2-rip-1]network 12.0.0.0
[R2-rip-1]network 25.0.0.0
[R3-rip-1]
[R3-rip-1]version 2
[R3-rip-1]network 13.0.0.0
[R3-rip-1]network 34.0.0.0

[R4-rip-1]
[R4-rip-1]version 2
[R4-rip-1]network 34.0.0.0
[R4-rip-1]network 45.0.0.0

[R5-rip-1]
[R5-rip-1]version 2
[R5-rip-1]network 45.0.0.0
[R5-rip-1]network 25.0.0.0
[R5-rip-1]network 192.168.5.0

2)查看R1路由,通过R2通告192.168.5.0/24网络

[R1]display ip routing-table protocol rip 
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
25.0.0.0/8   RIP     100  1           D   12.1.1.2        Ethernet0/0/0
34.0.0.0/8   RIP     100  1           D   13.1.1.3        GigabitEthernet0/0/0
45.0.0.0/8   RIP     100  2           D   13.1.1.3        GigabitEthernet0/0/0
                    RIP     100  2           D   12.1.1.2        Ethernet0/0/0
192.168.5.0/24  RIP     100  2           D   12.1.1.2        Ethernet0/0/0

3)通过修改R1、R2度量值,使用带宽高德R3通告192.168.5.0/24网络

[R1-Ethernet0/0/0]rip metricin 2 
[R1-Ethernet0/0/0]display ip routing-table protocol rip
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
 192.168.5.0/24  RIP     100  4           D   12.1.1.2        Ethernet0/0/0
[R2-Ethernet0/0/1]rip metricout 3
[R5]display ip routing-table protocol rip
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
12.0.0.0/8   RIP     100  3           D   25.1.1.2        Ethernet0/0/1
                    RIP     100  3           D   45.1.1.4        GigabitEthernet0/0/2
13.0.0.0/8   RIP     100  2           D   45.1.1.4        GigabitEthernet0/0/2
34.0.0.0/8   RIP     100  1           D   45.1.1.4        GigabitEthernet0/0/2
192.168.1.0/24  RIP     100  3           D   45.1.1.4        GigabitEthernet0/0/2

4)PC1、PC2测试路由

图片[2]-2.2 RIPV2配置详解-大赛人网
图2-17 RIPV2 度量值网络拓扑
图片[3]-2.2 RIPV2配置详解-大赛人网
图2-18 RIPV2 度量值网络拓扑

7.默认动态路由

默认路由动态路由能动态学习到默认路由,match default关键字只当R4路由表中存在其他路由协议或者其他RIP路由产生默认路由时,R4才会向RIP发布默认路由,否则不会。

图片[4]-2.2 RIPV2配置详解-大赛人网
图2-19 RIPV2 默认动态路由网络拓扑

基本配置和RIP配置省略

[R4]ip route-static 0.0.0.0 0.0.0.0 45.1.1.5
[R4-rip-1]default-route originate match default cost 1
<R1>display ip routing-table protocol rip 
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
0.0.0.0/0   RIP     100  2           D   14.1.1.4        GigabitEthernet0/0/1

1 2 3 4 5 6

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容