对rip 中undo summary 的理解

 

【需求和组网】
RIP2的报文中携带有掩码信息,支持路由聚合 ,支持CIDR,一直对这条命令对更新报文中掩码的作用机制没有怎么弄明白,今天打开模拟器认真看了看,欢迎大家留言发表高见。
 
通过分析加这条命令和不加这条命令时的诊断信息来看这个命令的作用
 
组网情况
 
R1----S0/6/0--------------------------s0/6/0---R2
 
在R1上开启t d    t m  debugging rip 1 packet 查看诊断信息
 
在R2上network 172.16.1.0   R1的s0/6/1的地址是172.16.1.1 物理接口和协议都是up的。
 
【配置如下】
<R1>dis ip int br
*down: administratively down
(s): spoofing
Interface                                Physical   Protocol   IP Address      
LoopBack0                                  up         up(s)    1.1.1.1         
Serial0/6/0                                up         up       2.2.2.1         
  
[R1-rip-1]
[R1-rip-1]
[R1-rip-1]
[R1-rip-1]
[R1-rip-1]dis th
#
rip 1
 undo summary
 version 2
 network 2.0.0.0
 network 1.0.0.0
 
 
R2:
 
[R2]dis ip int br
*down: administratively down
(s): spoofing
Interface                                Physical   Protocol   IP Address      
LoopBack0                                  up         up(s)    3.3.3.3         
Serial0/6/0                                up         up       2.2.2.2         
Serial0/6/1                                up         up       172.16.1.1      
Serial0/6/2                                down       down     unassigned      
Serial0/6/3                                down       down     unassigned      
[R2]rip 
[R2-rip-1]dis th
#
rip 1
 undo summary
 version 2
 network 2.0.0.0
 network 3.0.0.0
 network 172.16.0.0
 
【查看诊断信息】
 
当没有配置undo summary时,路由表中是自动聚合的
<R1>
*Mar 13 22:38:12:735 2013 R1 RM/6/RMDEBUG: RIP 1 : Receiving v2 response on Serial0/6/0 from 2.2.2.2
*Mar 13 22:38:12:735 2013 R1 RM/6/RMDEBUG: RIP 1 : Receive response from 2.2.2.2 on Serial0/6/0
*Mar 13 22:38:12:735 2013 R1 RM/6/RMDEBUG:   Packet : vers 2, cmd response, length 44
*Mar 13 22:38:12:735 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 3.0.0.0/255.0.0.0, nexthop 0.0.0.0, cost 1, tag 0
*Mar 13 22:38:12:735 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 172.16.0.0/255.255.0.0, nexthop 0.0.0.0, cost 1, tag 0  172网段的路由自动是16位的掩码
*Mar 13 22:38:17:860 2013 R1 RM/6/RMDEBUG: RIP 1 : Sending v2 response on Serial0/6/0 from 2.2.2.1
*Mar 13 22:38:17:860 2013 R1 RM/6/RMDEBUG: RIP 1 : Sending response on interface Serial0/6/0 from 2.2.2.1 to 224.0.0.9
*Mar 13 22:38:17:860 2013 R1 RM/6/RMDEBUG:   Packet : vers 2, cmd response, length 24
*Mar 13 22:38:17:860 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 1.1.1.1/255.255.255.255, nexthop 0.0.0.0, cost 1, tag 0
<R1>
<R1>
<R1>
<R1>
<R1>在R2上加了summary时,
<R1>
*Mar 13 22:38:37:875 2013 R1 RM/6/RMDEBUG: RIP 1 : Receiving v2 response on Serial0/6/0 from 2.2.2.2
*Mar 13 22:38:37:875 2013 R1 RM/6/RMDEBUG: RIP 1 : Receive response from 2.2.2.2 on Serial0/6/0
*Mar 13 22:38:37:875 2013 R1 RM/6/RMDEBUG:   Packet : vers 2, cmd response, length 44
*Mar 13 22:38:37:875 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 3.3.3.3/255.255.255.255, nexthop 0.0.0.0, cost 1, tag 0
*Mar 13 22:38:37:875 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 172.16.1.0/255.255.255.0, nexthop 0.0.0.0, cost 1, tag 0  因为接口配置是24位的掩码,路由变成了16位的掩 码,但是在rip视图下dis th 查看仍旧是16位的掩码 如上配置
*Mar 13 22:38:42:110 2013 R1 RM/6/RMDEBUG: RIP 1 : Sending v2 response on Serial0/6/0 from 2.2.2.1
*Mar 13 22:38:42:110 2013 R1 RM/6/RMDEBUG: RIP 1 : Sending response on interface Serial0/6/0 from 2.2.2.1 to 224.0.0.9
*Mar 13 22:38:42:110 2013 R1 RM/6/RMDEBUG:   Packet : vers 2, cmd response, length 24
*Mar 13 22:38:42:110 2013 R1 RM/6/RMDEBUG:     AFI 2, dest 1.1.1.1/255.255.255.255, nexthop 0.0.0.0, cost 1, tag 0

你可能感兴趣的:(h3c,rip)