解释rip在发送路由更新时的规则图
R1配置
interface Loopback0
ip address 131.108.10.1 255.255.255.0
!
interface Loopback1
ip address 138.108.10.1 255.255.255.0
!
interface Serial0/0/0
ip address 131.108.5.1 255.255.255.0
clock rate 64000
!
router rip
version 1
network 131.108.0.0
network 138.108.0.0
!
R2配置
interface Loopback0
ip address 131.108.15.1 255.255.255.0
!
interface Serial0/0/0
ip address 131.108.5.2 255.255.255.0
!
router rip
version 1
network 131.108.0.0
!
R1路由表
r1#show ip route
131.108.0.0/24 is subnetted, 3 subnets
C 131.108.5.0 is directly connected, Serial0/0/0
C 131.108.10.0 is directly connected, Loopback0
R 131.108.15.0 [120/1] via 131.108.5.2, 00:00:10, Serial0/0/0
138.108.0.0/24 is subnetted, 1 subnets
C 138.108.10.0 is directly connected, Loopback1
R2路由表
r2#show ip route
131.108.0.0/24 is subnetted, 3 subnets
C 131.108.5.0 is directly connected, Serial0/0/0
R 131.108.10.0 [120/1] via 131.108.5.1, 00:00:09, Serial0/0/0
C 131.108.15.0 is directly connected, Loopback0
R 138.108.0.0/16 [120/1] via 131.108.5.1, 00:00:09, Serial0/0/0
以上是本实验的配置信息和路由表信息,下面我们将研究的是在rip发送路由的规则
以上更新图来源《ip路由协议疑难解析》
我们研究的时在R1向R2发送路由更新,为了实验的清晰化再次将路由器R2的S0/0/和L0口设置为被动接口
r2(config-router)#passive-interface l0
r2(config-router)#passive-interface serial 0/0/0
此时我们在路由R1上面
r1#debug ip rip events
r1#RIP: sending v1 update to 255.255.255.255 via Serial0/0/0(131.108.5.1)
RIP: build update entries
network 131.108.10.0 metric 1
network 138.108.0.0 metric 1
现在我们的工作是研究R1的S0/0/0口在发送路由更新时的规则
1、R1会向将发送的的子网131.108.10.0/24和子网138.108.10.1/24与R1源S0/0/0口进行比较时候在同一主网络,得知131.108.10.0/24与源S0/0/0口的131.108.5.1/24他们同处于131.108.0.0/16的主网络,并且子网131.108.10.0/24与源S0/0/0:131.108.5.0/24在同一个子网,所以将发送更新子网131.108.10.0/24这个网络。
2、因为138.108.10.0/24这个子网不和源S0/0/0:131.138.5.0/24在同一主网络,即将138.108.10.0/24这个网络在边界进行主网络汇总,汇总后为138.108.0.0/16并广播该子网。
所以在R1的S0/0/0口发送的路由更新为
network 131.108.10.0 metric 1
network 138.108.0.0 metric 1
以上为路由器R1发送更新规则的流程。
因为博客等级有限不能将rip接收更新的流程规则一起写上来,下次在写吧~~
有写的不好的地方还望大家指出来,技术这个东西就是慢慢交流出来的。
转载于:https://blog.51cto.com/framelab/527804