RIP配置详解

                          RIP配置详解

 

 

一.RIP协议概述

1.RIP是Routing Information Protocol(路由信息协议)的简称;

2.RIP是一种基于距离矢量(Distance-Vector)算法的路由协议;

3.RIP协议适用与中小型网络,分为RIPv1和RIPv2;

4.RIP支持水平分割,毒性逆转和出发更新等工作机制,防止路由环路;

5.RIP协议基于UDP传输,端口号是520.

二.RIP工作原理

1.RIP路由表的初始化

 

2.RIP路由表的更新

3.路由表的维护

RIP路由信息维护是由定时器完成的:

update定时器:定义了发送路由更新的时间间隔 30s

timeout定时器:定义了路由老化时间,如果在老化时间内没有收到关于某条路由的更新报文,则该条路由的度量值会被设置的无穷大(16),并且从IP路由表中撤销,定时器默认值是180s.

Garbage-Collect定时器:定义了一条路由从度量值变为16开始,直到它从路由表里面被彻底删除所经过的时间,如果Garbage-Collect超时,该路由仍没有得到更新,则该路由将被车垫删除,默认值是120s.

总结:RIP路由如果没有更新,300s后会被彻底删除,180s内如果没有更新,丢到回收站,180-300内还没有更新,彻底删除。

4.拓扑变化在网络中的扩散

三.RIP的防环路机制

1.路由毒化

  所谓网络毒化(route poisoning)就是路由器主动把路由表中发生故障的路由项以度量值无穷大(16)的形式通告给RIP邻居,以使邻居能够及时得知网络发生故障。

  比如:当与RTC相连接的路由器10.4.0.0网络发生故障,他就会告诉他最近的路由器说这这个网段不好使了,并将其设置为毒性路由,RTB也会告知他与它相近的路由器RTA,最终大家都知道后会将10.4.0.0网段的标记为“inf”,最终将删除这条路由。

 

2.水平分割

  路由器从某个接口学到的路由不会将来路由发送给发给他的路由器,比如说RTB开始仅仅只有10.2.0.0和10.3.0.0网段,通过RIP协议从S0/0口学习到了10.1.0.0的路由,他就把送S0/0口学到的10.1.0.0的路由发送给RTA,同理,它也可以通过s1/0口学习到10.4.0.0网段的路由,学到后,将路由保存到自己的路由表中,不会讲10.4.0.0通过s1/0告知给RTC,但是他会通过s1/0告诉到他学习到的路由和自身的路由,也就是刚刚学习到的10.1.0.0和自身的路由10.2.0.0与10.3.0.0通过s1/0口告知给RTC.

  总结起来就一句话:路由器中某接口发送出去的路由,不会再从该接口接收。

 

3.毒性逆转

  还是就着上面的例子,RTB开始的路由是10.2.0.0和10.3.0.0,RTB会通过RIP协议学习到相邻路由中不同网段的路由信息,当RTB学习到RTC的路由信息10.4.0.0网段的时候,当RTB要发送他自己的路由信息时,会自动将之前在s1/0口学习到的10.4.0.0的度量值为16,这就意味着RTB是不可能到达RTC的(RIP最大跳数是16)

  注意:毒性逆转可以超越水平分割,不受水平分割的影响。

 

4.定义最大跳数:

  默认15跳,16跳不可达,RIP机制本身定义的。

 

5.抑制时间

  1>.抑制时间和路由毒化结合使用,能够在一定程度上避免路由环路产生。

    2>.抑制时间规定,当一条路由的度量值变为无穷大(16)时,该路由进入抑制状态。在被抑制状态,只有来自同一邻居且度量值小鱼无穷大(16)的路由更新才会被路由器接受,取代不可达路由。

timeout:180s

回收站清空时间:120s

   如下图:当RTC路由器10.4.0.0网段发生故障的时候,他就会告知RTB说网络不可达,这个时候RTB就会把RTC发来关于10.4.0.0网段的路由器的度量值变为“inf”,与此同时会产生一个抑制时间,在这个抑制时间内,如果接受到了其他路由(RTA)关于10.4.0.0网段的路由信息,RTB不会去理会他,他会自动忽略RTA关于10.4.0.0网段的路由信息,因为在这个抑制时间内他只会等待RTC的路由更新,如果在这个抑制时间内,接受到关于10.4.0.0的路由的度量值小鱼16,那么RTB久会恢复RTB到RTC的路由,将不可达(inf)的cost值【度量值】更新,如果在这个时间内,RTC始终没有发送10.4.0.0的路由给RTB,那么过来抑制时间就会自动接受其他的路由关于10.4.0.0的路由信息,也就是说,过了抑制时间的话RTA发送路由信息10.4.0.0给RTB时,RTB会接受该信息哟~并更新自己的路由表。

 

6.触发更新

  触发更新是指,当路由表中路由信息差生变化是,路由器不必等到更新周期到来,而立即发送路由更新给相邻路由器。路由更新中包含网络不可达信息迅速传播全网。让全网知道该路由信息时不可达的。

 

 

多路径网络环路避免操作示例

四.RIPv1与RIPv2的介绍

RIPv1的缺点

RIPv2的改进

 

 

五.配置RIP实验

实验要求:

  需要配置北京的客户端能够访问菲律宾的服务器,通过RIP协议使其互通。拓扑图如下:

 

配置过程如下:

  注意:由于我用的是ENSP模拟器,这是一款华为的模拟器,所以命令和H3C在配置上是有点区别的,但是在配置RIP中的区别并不大,主要是在宣告自己路由的时候回有点差异,我在配置完毕后会有关于配置H3C设备是应该注意的地方。

“北京核心交换机”配置如下:

1 “北京核心交换机”配置如下:
2 
3 [Huawei]sysname core
4 [core]interface Ethernet 0/0/10
5 [core-Ethernet0/0/10]port link-type trunk 
6 [core-Ethernet0/0/10]quit 

“北京网关地址”配置如下:

 1 “北京网关地址”配置如下:
 2 [Huawei]sysname beijing
 3 [beijing]interface Ethernet 0/0/0    
 4 [beijing-Ethernet0/0/0]ip address 172.30.1.254 24
 5 [beijing-Ethernet0/0/0]quit
 6 [beijing]interface GigabitEthernet 0/0/0
 7 [beijing-GigabitEthernet0/0/0]ip address 36.110.101.138 24
 8 [beijing-GigabitEthernet0/0/0]undo shutdown 
 9 [beijing-GigabitEthernet0/0/0]quit 
10 [beijing]display ip routing-table 
11 Route Flags: R - relay, D - download to fib
12 -------------------------------------------------------------
13 
14 -----------------
15 Routing Tables: Public
16          Destinations : 6        Routes : 6        
17 
18 Destination/Mask    Proto   Pre  Cost      Flags NextHop      
19 
20    Interface
21 
22    36.110.101.0/24  Direct  0    0           D   
23 
24 36.110.101.138  GigabitEthernet0/0/0
25  36.110.101.138/32  Direct  0    0           D   127.0.0.1    
26 
27    GigabitEthernet0/0/0
28       127.0.0.0/8   Direct  0    0           D   127.0.0.1    
29 
30    InLoopBack0
31       127.0.0.1/32  Direct  0    0           D   127.0.0.1    
32 
33    InLoopBack0
34      172.30.1.0/24  Direct  0    0           D   172.30.1.254 
35 
36    Ethernet0/0/0
37    172.30.1.254/32  Direct  0    0           D   127.0.0.1    
38 
39    Ethernet0/0/0
40 [beijing]
41 [beijing]display ip interface brief 
42 *down: administratively down
43 !down: FIB overload down
44 ^down: standby
45 (l): loopback
46 (s): spoofing
47 (d): Dampening Suppressed
48 The number of interface that is UP in Physical is 3
49 The number of interface that is DOWN in Physical is 8
50 The number of interface that is UP in Protocol is 3
51 The number of interface that is DOWN in Protocol is 8
52 
53 Interface                         IP Address/Mask      
54 
55 Physical   Protocol  
56 Ethernet0/0/0                     172.30.1.254/24      up     
57 
58     up        
59 Ethernet0/0/1                     unassigned           down   
60 
61     down      
62 GigabitEthernet0/0/0              36.110.101.138/24    up     
63 
64     up        
65 GigabitEthernet0/0/1              unassigned           down   
66 
67     down      
68 GigabitEthernet0/0/2              unassigned           down   
69 
70     down      
71 GigabitEthernet0/0/3              unassigned           down   
72 
73     down      
74 NULL0                             unassigned           up     
75 
76     up(s)     
77 Serial0/0/0                       unassigned           down   
78 
79     down      
80 Serial0/0/1                       unassigned           down   
81 
82     down      
83 Serial0/0/2                       unassigned           down   
84 
85     down      
86 Serial0/0/3                       unassigned           down   
87 
88     down      
89 [beijing]
90 [beijing]rip    #启动RIP功能
91 [beijing-rip-1]version 2   #指定RIP版本
92 [beijing-rip-1]undo summary  #关闭自动汇总,如果开启的话,他会默认把一些子网汇聚成一个共同的网络。
93 [beijing-rip-1]network 172.30.0.0 #宣告所拥有的路由
94 [beijing-rip-1]network 36.0.0.0


“上海骨干网”配置如下:

 1 “上海骨干网”配置如下:
 2 [Huawei]sysname shanghai
 3 [shanghai]interface GigabitEthernet 0/0/0
 4 [shanghai-GigabitEthernet0/0/0]ip address 36.110.101.139 24
 5 [shanghai-GigabitEthernet0/0/0]undo shutdown 
 6 [shanghai-GigabitEthernet0/0/0]quit 
 7 [shanghai]interface GigabitEthernet 0/0/1
 8 [shanghai-GigabitEthernet0/0/1]ip address 180.168.255.118 24
 9 [shanghai-GigabitEthernet0/0/1]undo shutdown 
10 [shanghai-GigabitEthernet0/0/1]quit 
11 [shanghai]rip 
12 [shanghai-rip-1]version 2
13 [shanghai-rip-1]undo summary 
14 [shanghai-rip-1]network 36.0.0.0
15 [shanghai-rip-1]network 180.168.0.0
16 [shanghai-rip-1]quit 

 


“香港骨干网”配置如下:

 1 [Huawei]sysname hongkong
 2 [hongkong]interface GigabitEthernet 0/0/1
 3 [hongkong-GigabitEthernet0/0/1]ip address 180.168.255.119 24
 4 [hongkong-GigabitEthernet0/0/1]undo shutdown 
 5 [hongkong-GigabitEthernet0/0/1]quit
 6 [hongkong]interface GigabitEthernet 0/0/0
 7 [hongkong-GigabitEthernet0/0/0]ip address 202.14.67.4 24
 8 [hongkong-GigabitEthernet0/0/0]undo shutdown
 9 [hongkong-GigabitEthernet0/0/0]quit 
10 [hongkong]rip 
11 [hongkong-rip-1]version 2
12 [hongkong-rip-1]undo summary 
13 [hongkong-rip-1]network 180.168.0.0
14 [hongkong-rip-1]network 202.14.67.0
15 [hongkong-rip-1]quit 

 


“海南岛骨干网”配置如下:

 1 [huawei]sysname hainan
 2 [hainan]interface GigabitEthernet 0/0/0
 3 [hainan-GigabitEthernet0/0/0]ip address 202.14.67.5 24
 4 [hainan-GigabitEthernet0/0/0]undo shutdown 
 5 [hainan-GigabitEthernet0/0/0]quit 
 6 [hainan]interface GigabitEthernet 0/0/1
 7 [hainan-GigabitEthernet0/0/1]ip address 221.11.132.21 24
 8 [hainan-GigabitEthernet0/0/1]undo shutdown 
 9 [hainan-GigabitEthernet0/0/1]quit 
10 [hainan]rip 
11 [hainan-rip-1]version 2
12 [hainan-rip-1]undo summary 
13 [hainan-rip-1]network 202.14.67.0
14 [hainan-rip-1]network 221.11.132.0
15 [hainan-rip-1]quit 

 

“菲律宾路由器”配置如下:

 1 [Huawei]sysname feilvbin
 2 [feilvbin]interface GigabitEthernet0/0/1
 3 [feilvbin-GigabitEthernet0/0/1]ip address 221.11.132.22 24
 4 [feilvbin-GigabitEthernet0/0/1]undo shutdown 
 5 [feilvbin-GigabitEthernet0/0/1]quit 
 6 [feilvbin]interface Ethernet 0/0/0
 7 [feilvbin-Ethernet0/0/0]ip address 192.168.1.254 24
 8 [feilvbin-Ethernet0/0/0]undo shutdown 
 9 [feilvbin-Ethernet0/0/0]quit 
10 [feilvbin]rip 
11 [feilvbin-rip-1]version 2
12 [feilvbin-rip-1]undo summary 
13 [feilvbin-rip-1]network 221.11.132.0
14 [feilvbin-rip-1]network 192.168.1.0
15 [feilvbin-rip-1]quit 
“菲律宾核心交换机”配置如下:
[Huawei]sysname core
[core]interface Ethernet 0/0/10
[core-Ethernet0/0/10]port link-type trunk 
[core-Ethernet0/0/10]quit 
 
注意,在配置RIP的时候华为交换机在宣告自己的地址的时候是宣告该接口的所属类的地址, 换句话说,也就是华为在宣告的时候,宣告的是以其所属IP类别进行宣告的,比如:
172.30.1.1宣告为172.30.0.0;
192.168.1.1(默认是C类IP)宣告为192.168.1.0;
10.10.10.1(默认是A类IP)宣告为10.0.0.0
但是H3C则不是,H3C直接需要你将每个接口的IP 直接宣告给邻居路由,比如:
172.30.1.1宣告为:172.30.1.1
192.168.1.1宣告为:192.168.1.1 
所以我们配置各个厂商类别的时候要注意哟~
 
 
配置好上面的服务之后,我们需要进行测试:
查看北京路由获取的路由表信息:
 1 <beijing>display ip routing-table
 2 Route Flags: R - relay, D - download to fib
 3 ------------------------------------------------------------------------------
 4 Routing Tables: Public
 5          Destinations : 10       Routes : 10       
 6 
 7 Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
 8 
 9    36.110.101.0/24  Direct  0    0           D   36.110.101.138  GigabitEthernet0
10 /0/0
11  36.110.101.138/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0
12 /0/0
13       127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
14       127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
15      172.30.1.0/24  Direct  0    0           D   172.30.1.254    Ethernet0/0/0
16    172.30.1.254/32  Direct  0    0           D   127.0.0.1       Ethernet0/0/0
17   180.168.255.0/24  RIP     100  1           D   36.110.101.139  GigabitEthernet0/0/0
18     192.168.1.0/24  RIP     100  4           D   36.110.101.139  GigabitEthernet0/0/0
19     202.14.67.0/24  RIP     100  2           D   36.110.101.139  GigabitEthernet0/0/0
20    221.11.132.0/24  RIP     100  3           D   36.110.101.139  GigabitEthernet0/0/0
21 <beijing>

“北京客户端”测试结果如下:

 1 PC>ipconfig
 2 
 3 Link local IPv6 address...........: fe80::5689:98ff:fe4c:1e69
 4 IPv6 address......................: :: / 128
 5 IPv6 gateway......................: ::
 6 IPv4 address......................: 172.30.1.1
 7 Subnet mask.......................: 255.255.255.0
 8 Gateway...........................: 172.30.1.254
 9 Physical address..................: 54-89-98-4C-1E-69
10 DNS server........................:
11 
12 PC>ping 192.168.1.254
13 
14 Ping 192.168.1.254: 32 data bytes, Press Ctrl_C to break
15 From 192.168.1.254: bytes=32 seq=1 ttl=251 time=125 ms
16 From 192.168.1.254: bytes=32 seq=2 ttl=251 time=110 ms
17 From 192.168.1.254: bytes=32 seq=3 ttl=251 time=140 ms
18 From 192.168.1.254: bytes=32 seq=4 ttl=251 time=141 ms
19 From 192.168.1.254: bytes=32 seq=5 ttl=251 time=109 ms
20 
21 --- 192.168.1.254 ping statistics ---
22   5 packet(s) transmitted
23   5 packet(s) received
24   0.00% packet loss
25   round-trip min/avg/max = 109/125/141 ms
26 
27 PC>ping 192.168.1.1
28 
29 Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
30 From 192.168.1.1: bytes=32 seq=1 ttl=123 time=156 ms
31 From 192.168.1.1: bytes=32 seq=2 ttl=123 time=156 ms
32 From 192.168.1.1: bytes=32 seq=3 ttl=123 time=156 ms
33 From 192.168.1.1: bytes=32 seq=4 ttl=123 time=125 ms
34 From 192.168.1.1: bytes=32 seq=5 ttl=123 time=141 ms
35 
36 --- 192.168.1.1 ping statistics ---
37   5 packet(s) transmitted
38   5 packet(s) received
39   0.00% packet loss
40   round-trip min/avg/max = 125/146/156 ms
41 
42 PC>

 

六.RIP防环实战演示

1.开启水平分割

接口默认是开启水平分割的,我们直接查看即可:

<beijing>terminal debugging  #开启调试模式

<beijing>debugging rip 1 packet  #观察RIP更新的详细信息

需要等待几秒张就会有包的接受和发送的信息:

  1 <beijing>
  2 Apr 14 2017 12:53:38.260.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
  3 onse from 36.110.101.139 on GigabitEthernet0/0/0
  4 Apr 14 2017 12:53:38.260.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
  5 Cmd response, Length 84
  6 Apr 14 2017 12:53:38.260.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
  7 24, Nexthop 0.0.0.0, Cost 1, Tag 0
  8 Apr 14 2017 12:53:38.260.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
  9 , Nexthop 0.0.0.0, Cost 4, Tag 0
 10 Apr 14 2017 12:53:38.260.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 11 , Nexthop 0.0.0.0, Cost 2, Tag 0
 12 Apr 14 2017 12:53:38.260.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 13 4, Nexthop 0.0.0.0, Cost 3, Tag 0
 14 Apr 14 2017 12:53:40.320.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 15 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 16 Apr 14 2017 12:53:40.320.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 17 Cmd response, Length 124
 18 Apr 14 2017 12:53:40.320.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 19 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 20 Apr 14 2017 12:53:40.320.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 21  Nexthop 0.0.0.0, Cost 1, Tag 0
 22 Apr 14 2017 12:53:40.320.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 23 24, Nexthop 0.0.0.0, Cost 2, Tag 0
 24 Apr 14 2017 12:53:40.320.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 25 , Nexthop 0.0.0.0, Cost 5, Tag 0
 26 Apr 14 2017 12:53:40.320.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 27 , Nexthop 0.0.0.0, Cost 3, Tag 0
 28 Apr 14 2017 12:53:40.320.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 29 4, Nexthop 0.0.0.0, Cost 4, Tag 0
 30 Apr 14 2017 12:53:42.280.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 31 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
 32 Apr 14 2017 12:53:42.280.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 33 Cmd response, Length 24
 34 Apr 14 2017 12:53:42.280.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 35  Nexthop 0.0.0.0, Cost 1, Tag 0
 36 Apr 14 2017 12:54:09.450.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
 37 onse from 36.110.101.139 on GigabitEthernet0/0/0
 38 Apr 14 2017 12:54:09.450.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 39 Cmd response, Length 84
 40 Apr 14 2017 12:54:09.450.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 41 24, Nexthop 0.0.0.0, Cost 1, Tag 0
 42 Apr 14 2017 12:54:09.450.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 43 , Nexthop 0.0.0.0, Cost 4, Tag 0
 44 Apr 14 2017 12:54:09.450.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 45 , Nexthop 0.0.0.0, Cost 2, Tag 0
 46 Apr 14 2017 12:54:09.450.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 47 4, Nexthop 0.0.0.0, Cost 3, Tag 0
 48 Apr 14 2017 12:54:10.400.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 49 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 50 Apr 14 2017 12:54:10.400.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 51 Cmd response, Length 124
 52 Apr 14 2017 12:54:10.400.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 53 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 54 Apr 14 2017 12:54:10.400.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 55  Nexthop 0.0.0.0, Cost 1, Tag 0
 56 Apr 14 2017 12:54:10.400.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 57 24, Nexthop 0.0.0.0, Cost 2, Tag 0
 58 Apr 14 2017 12:54:10.400.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 59 , Nexthop 0.0.0.0, Cost 5, Tag 0
 60 Apr 14 2017 12:54:10.400.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 61 , Nexthop 0.0.0.0, Cost 3, Tag 0
 62 Apr 14 2017 12:54:10.400.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 63 4, Nexthop 0.0.0.0, Cost 4, Tag 0
 64 Apr 14 2017 12:54:16.400.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 65 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
 66 Apr 14 2017 12:54:16.400.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 67 Cmd response, Length 24
 68 Apr 14 2017 12:54:16.400.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 69  Nexthop 0.0.0.0, Cost 1, Tag 0
 70 Apr 14 2017 12:54:38.560.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
 71 onse from 36.110.101.139 on GigabitEthernet0/0/0
 72 Apr 14 2017 12:54:38.560.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 73 Cmd response, Length 84
 74 Apr 14 2017 12:54:38.560.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 75 24, Nexthop 0.0.0.0, Cost 1, Tag 0
 76 Apr 14 2017 12:54:38.560.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 77 , Nexthop 0.0.0.0, Cost 4, Tag 0
 78 Apr 14 2017 12:54:38.560.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 79 , Nexthop 0.0.0.0, Cost 2, Tag 0
 80 Apr 14 2017 12:54:38.560.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 81 4, Nexthop 0.0.0.0, Cost 3, Tag 0
 82 Apr 14 2017 12:54:43.540.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 83 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
 84 Apr 14 2017 12:54:43.540.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 85 Cmd response, Length 24
 86 Apr 14 2017 12:54:43.540.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 87  Nexthop 0.0.0.0, Cost 1, Tag 0
 88 Apr 14 2017 12:54:45.510.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 89 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 90 Apr 14 2017 12:54:45.510.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 91 Cmd response, Length 124
 92 Apr 14 2017 12:54:45.510.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 93 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 94 Apr 14 2017 12:54:45.510.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 95  Nexthop 0.0.0.0, Cost 1, Tag 0
 96 Apr 14 2017 12:54:45.510.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 97 24, Nexthop 0.0.0.0, Cost 2, Tag 0
 98 Apr 14 2017 12:54:45.510.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 99 , Nexthop 0.0.0.0, Cost 5, Tag 0
100 Apr 14 2017 12:54:45.510.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
101 , Nexthop 0.0.0.0, Cost 3, Tag 0
102 Apr 14 2017 12:54:45.510.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
输出的调试信息

如果你要关闭水平分割的话:

[beijing]interface GigabitEthernet 0/0/0

[beijing-GigabitEthernet0/0/0]undo rip split-horizon 

 1 <beijing>terminal debugging 
 2 Info: Current terminal debugging is on.
 3 <beijing>debugging rip 1 packet 
 4 <beijing>
 5 Apr 14 2017 13:00:08.570.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 6 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 7 Apr 14 2017 13:00:08.570.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 8 Cmd response, Length 124
 9 Apr 14 2017 13:00:08.570.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
10 4, Nexthop 0.0.0.0, Cost 1, Tag 0
11 Apr 14 2017 13:00:08.570.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
12  Nexthop 0.0.0.0, Cost 1, Tag 0
13 Apr 14 2017 13:00:08.570.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
14 24, Nexthop 0.0.0.0, Cost 2, Tag 0
15 Apr 14 2017 13:00:08.570.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
16 , Nexthop 0.0.0.0, Cost 5, Tag 0
17 Apr 14 2017 13:00:08.570.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
18 , Nexthop 0.0.0.0, Cost 3, Tag 0
19 Apr 14 2017 13:00:08.570.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
20 4, Nexthop 0.0.0.0, Cost 4, Tag 0
21 Apr 14 2017 13:00:12.810.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
22 onse from 36.110.101.139 on GigabitEthernet0/0/0
23 Apr 14 2017 13:00:12.810.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
24 Cmd response, Length 84
25 Apr 14 2017 13:00:12.810.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
26 24, Nexthop 0.0.0.0, Cost 1, Tag 0
27 Apr 14 2017 13:00:12.810.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
28 , Nexthop 0.0.0.0, Cost 4, Tag 0
29 Apr 14 2017 13:00:12.810.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
30 , Nexthop 0.0.0.0, Cost 2, Tag 0
31 Apr 14 2017 13:00:12.810.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
32 4, Nexthop 0.0.0.0, Cost 3, Tag 0
33 Apr 14 2017 13:00:29.650.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
34 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
35 Apr 14 2017 13:00:29.650.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
36 Cmd response, Length 124
37 Apr 14 2017 13:00:29.650.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
38 4, Nexthop 0.0.0.0, Cost 1, Tag 0
39 Apr 14 2017 13:00:29.650.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
40  Nexthop 0.0.0.0, Cost 1, Tag 0
41 Apr 14 2017 13:00:29.650.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
42 24, Nexthop 36.110.101.139, Cost 2, Tag 0
43 Apr 14 2017 13:00:29.650.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
44 , Nexthop 36.110.101.139, Cost 5, Tag 0
45 Apr 14 2017 13:00:29.650.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
46 , Nexthop 36.110.101.139, Cost 3, Tag 0
47 Apr 14 2017 13:00:29.650.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
48 4, Nexthop 36.110.101.139, Cost 4, Tag 0
49 Apr 14 2017 13:00:40.700.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
50 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
51 Apr 14 2017 13:00:40.700.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
52 Cmd response, Length 124
53 Apr 14 2017 13:00:40.700.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
54 4, Nexthop 0.0.0.0, Cost 1, Tag 0
55 Apr 14 2017 13:00:40.700.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
56  Nexthop 0.0.0.0, Cost 1, Tag 0
57 Apr 14 2017 13:00:40.700.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
58 24, Nexthop 0.0.0.0, Cost 2, Tag 0
59 Apr 14 2017 13:00:40.700.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
60 , Nexthop 0.0.0.0, Cost 5, Tag 0
61 Apr 14 2017 13:00:40.700.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
62 , Nexthop 0.0.0.0, Cost 3, Tag 0
63 Apr 14 2017 13:00:40.700.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
64 4, Nexthop 0.0.0.0, Cost 4, Tag 0
65 Apr 14 2017 13:00:43.850.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
66 onse from 36.110.101.139 on GigabitEthernet0/0/0
67 Apr 14 2017 13:00:43.850.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
68 Cmd response, Length 84
69 Apr 14 2017 13:00:43.850.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
70 24, Nexthop 0.0.0.0, Cost 1, Tag 0
71 Apr 14 2017 13:00:43.850.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
72 , Nexthop 0.0.0.0, Cost 4, Tag 0
73 Apr 14 2017 13:00:43.850.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
74 , Nexthop 0.0.0.0, Cost 2, Tag 0
75 Apr 14 2017 13:00:43.850.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
76 4, Nexthop 0.0.0.0, Cost 3, Tag 0
关闭后的水平分割

  对比2个日志,我们发现开启的水平分割很少不会经常往外放松信息,但是关闭了水平分割就会一直往外发送自己活得的路由信息,这里我们就要结合水平分割的原理来理解了。

 

2.接口上开启毒性逆转

 [beijing]interface GigabitEthernet 0/0/0

[beijing-GigabitEthernet0/0/0]rip poison-reverse 

[beijing]quit

<beijing>terminal debugging 

<beijing>debugging rip 1 packet 

  1 <beijing>
  2 Apr 14 2017 13:42:05.350.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
  3 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
  4 Apr 14 2017 13:42:05.350.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
  5 Cmd response, Length 124
  6 Apr 14 2017 13:42:05.350.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
  7 4, Nexthop 0.0.0.0, Cost 16, Tag 0
  8 Apr 14 2017 13:42:05.350.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
  9  Nexthop 0.0.0.0, Cost 1, Tag 0
 10 Apr 14 2017 13:42:05.350.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 11 24, Nexthop 36.110.101.139, Cost 16, Tag 0
 12 Apr 14 2017 13:42:05.350.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 13 , Nexthop 36.110.101.139, Cost 16, Tag 0
 14 Apr 14 2017 13:42:05.350.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 15 , Nexthop 36.110.101.139, Cost 16, Tag 0
 16 Apr 14 2017 13:42:05.350.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 17 4, Nexthop 36.110.101.139, Cost 16, Tag 0
 18 Apr 14 2017 13:42:13.70.2-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive respo
 19 nse from 36.110.101.139 on GigabitEthernet0/0/0
 20 Apr 14 2017 13:42:13.70.3-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, C
 21 md response, Length 84
 22 Apr 14 2017 13:42:13.70.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/2
 23 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 24 Apr 14 2017 13:42:13.70.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24,
 25  Nexthop 0.0.0.0, Cost 4, Tag 0
 26 Apr 14 2017 13:42:13.70.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24,
 27  Nexthop 0.0.0.0, Cost 2, Tag 0
 28 Apr 14 2017 13:42:13.70.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/24
 29 , Nexthop 0.0.0.0, Cost 3, Tag 0
 30 Apr 14 2017 13:42:27.450.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 31 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 32 Apr 14 2017 13:42:27.450.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 33 Cmd response, Length 124
 34 Apr 14 2017 13:42:27.450.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 35 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 36 Apr 14 2017 13:42:27.450.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 37  Nexthop 0.0.0.0, Cost 1, Tag 0
 38 Apr 14 2017 13:42:27.450.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 39 24, Nexthop 0.0.0.0, Cost 2, Tag 0
 40 Apr 14 2017 13:42:27.450.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 41 , Nexthop 0.0.0.0, Cost 5, Tag 0
 42 Apr 14 2017 13:42:27.450.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 43 , Nexthop 0.0.0.0, Cost 3, Tag 0
 44 Apr 14 2017 13:42:27.450.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 45 4, Nexthop 0.0.0.0, Cost 4, Tag 0
 46 Apr 14 2017 13:42:34.490.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 47 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
 48 Apr 14 2017 13:42:34.490.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 49 Cmd response, Length 124
 50 Apr 14 2017 13:42:34.490.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 51 4, Nexthop 0.0.0.0, Cost 16, Tag 0
 52 Apr 14 2017 13:42:34.490.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 53  Nexthop 0.0.0.0, Cost 1, Tag 0
 54 Apr 14 2017 13:42:34.490.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 55 24, Nexthop 36.110.101.139, Cost 16, Tag 0
 56 Apr 14 2017 13:42:34.490.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 57 , Nexthop 36.110.101.139, Cost 16, Tag 0
 58 Apr 14 2017 13:42:34.490.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 59 , Nexthop 36.110.101.139, Cost 16, Tag 0
 60 Apr 14 2017 13:42:34.490.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 61 4, Nexthop 36.110.101.139, Cost 16, Tag 0
 62 Apr 14 2017 13:42:45.150.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
 63 onse from 36.110.101.139 on GigabitEthernet0/0/0
 64 Apr 14 2017 13:42:45.150.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 65 Cmd response, Length 84
 66 Apr 14 2017 13:42:45.150.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 67 24, Nexthop 0.0.0.0, Cost 1, Tag 0
 68 Apr 14 2017 13:42:45.150.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 69 , Nexthop 0.0.0.0, Cost 4, Tag 0
 70 Apr 14 2017 13:42:45.150.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 71 , Nexthop 0.0.0.0, Cost 2, Tag 0
 72 Apr 14 2017 13:42:45.150.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 73 4, Nexthop 0.0.0.0, Cost 3, Tag 0
 74 Apr 14 2017 13:42:58.620.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 75 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
 76 Apr 14 2017 13:42:58.620.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 77 Cmd response, Length 124
 78 Apr 14 2017 13:42:58.620.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 79 4, Nexthop 0.0.0.0, Cost 1, Tag 0
 80 Apr 14 2017 13:42:58.620.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 81  Nexthop 0.0.0.0, Cost 1, Tag 0
 82 Apr 14 2017 13:42:58.620.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 83 24, Nexthop 0.0.0.0, Cost 2, Tag 0
 84 Apr 14 2017 13:42:58.620.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
 85 , Nexthop 0.0.0.0, Cost 5, Tag 0
 86 Apr 14 2017 13:42:58.620.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
 87 , Nexthop 0.0.0.0, Cost 3, Tag 0
 88 Apr 14 2017 13:42:58.620.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
 89 4, Nexthop 0.0.0.0, Cost 4, Tag 0
 90 Apr 14 2017 13:43:02.620.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
 91 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
 92 Apr 14 2017 13:43:02.620.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
 93 Cmd response, Length 124
 94 Apr 14 2017 13:43:02.620.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
 95 4, Nexthop 0.0.0.0, Cost 16, Tag 0
 96 Apr 14 2017 13:43:02.620.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
 97  Nexthop 0.0.0.0, Cost 1, Tag 0
 98 Apr 14 2017 13:43:02.620.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
 99 24, Nexthop 36.110.101.139, Cost 16, Tag 0
100 Apr 14 2017 13:43:02.620.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
101 , Nexthop 36.110.101.139, Cost 16, Tag 0
102 Apr 14 2017 13:43:02.620.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
103 , Nexthop 36.110.101.139, Cost 16, Tag 0
104 Apr 14 2017 13:43:02.620.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
105 4, Nexthop 36.110.101.139, Cost 16, Tag 0
106 Apr 14 2017 13:43:10.260.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
107 onse from 36.110.101.139 on GigabitEthernet0/0/0
108 Apr 14 2017 13:43:10.260.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
109 Cmd response, Length 84
110 Apr 14 2017 13:43:10.260.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
111 24, Nexthop 0.0.0.0, Cost 1, Tag 0
112 Apr 14 2017 13:43:10.260.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
113 , Nexthop 0.0.0.0, Cost 4, Tag 0
114 Apr 14 2017 13:43:10.260.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
115 , Nexthop 0.0.0.0, Cost 2, Tag 0
116 Apr 14 2017 13:43:10.260.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
117 4, Nexthop 0.0.0.0, Cost 3, Tag 0
118 Apr 14 2017 13:43:23.780.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
119 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
120 Apr 14 2017 13:43:23.780.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
121 Cmd response, Length 124
122 Apr 14 2017 13:43:23.780.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
123 4, Nexthop 0.0.0.0, Cost 1, Tag 0
124 Apr 14 2017 13:43:23.780.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
125  Nexthop 0.0.0.0, Cost 1, Tag 0
126 Apr 14 2017 13:43:23.780.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
127 24, Nexthop 0.0.0.0, Cost 2, Tag 0
128 Apr 14 2017 13:43:23.780.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
129 , Nexthop 0.0.0.0, Cost 5, Tag 0
130 Apr 14 2017 13:43:23.780.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
131 , Nexthop 0.0.0.0, Cost 3, Tag 0
132 Apr 14 2017 13:43:23.780.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
133 4, Nexthop 0.0.0.0, Cost 4, Tag 0
134 Apr 14 2017 13:43:32.820.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
135 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
136 Apr 14 2017 13:43:32.820.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
137 Cmd response, Length 104
138 Apr 14 2017 13:43:32.820.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
139  Nexthop 0.0.0.0, Cost 1, Tag 0
140 Apr 14 2017 13:43:32.820.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
141 24, Nexthop 36.110.101.139, Cost 16, Tag 0
142 Apr 14 2017 13:43:32.820.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
143 , Nexthop 36.110.101.139, Cost 16, Tag 0
144 Apr 14 2017 13:43:32.820.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
145 , Nexthop 36.110.101.139, Cost 16, Tag 0
146 Apr 14 2017 13:43:32.820.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
147 4, Nexthop 36.110.101.139, Cost 16, Tag 0
148 Apr 14 2017 13:43:36.400.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
149 onse from 36.110.101.139 on GigabitEthernet0/0/0
150 Apr 14 2017 13:43:36.400.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
151 Cmd response, Length 84
152 Apr 14 2017 13:43:36.400.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
153 24, Nexthop 0.0.0.0, Cost 1, Tag 0
154 Apr 14 2017 13:43:36.400.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
155 , Nexthop 0.0.0.0, Cost 4, Tag 0
156 Apr 14 2017 13:43:36.400.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
157 , Nexthop 0.0.0.0, Cost 2, Tag 0
158 Apr 14 2017 13:43:36.400.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
159 4, Nexthop 0.0.0.0, Cost 3, Tag 0
160 Apr 14 2017 13:43:49.870.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
161 onse on interface Ethernet0/0/0 from 172.30.1.254 to 224.0.0.9
162 Apr 14 2017 13:43:49.870.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
163 Cmd response, Length 124
164 Apr 14 2017 13:43:49.870.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 36.110.101.0/2
165 4, Nexthop 0.0.0.0, Cost 1, Tag 0
166 Apr 14 2017 13:43:49.870.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
167  Nexthop 0.0.0.0, Cost 1, Tag 0
168 Apr 14 2017 13:43:49.870.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
169 24, Nexthop 0.0.0.0, Cost 2, Tag 0
170 Apr 14 2017 13:43:49.870.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
171 , Nexthop 0.0.0.0, Cost 5, Tag 0
172 Apr 14 2017 13:43:49.870.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
173 , Nexthop 0.0.0.0, Cost 3, Tag 0
174 Apr 14 2017 13:43:49.870.8-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
175 4, Nexthop 0.0.0.0, Cost 4, Tag 0
176 Apr 14 2017 13:43:59.930.1-08:00 beijing RIP/7/DBG: 6: 12227: RIP 1: Sending resp
177 onse on interface GigabitEthernet0/0/0 from 36.110.101.138 to 224.0.0.9
178 Apr 14 2017 13:43:59.930.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
179 Cmd response, Length 104
180 Apr 14 2017 13:43:59.930.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24,
181  Nexthop 0.0.0.0, Cost 1, Tag 0
182 Apr 14 2017 13:43:59.930.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
183 24, Nexthop 36.110.101.139, Cost 16, Tag 0
184 Apr 14 2017 13:43:59.930.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
185 , Nexthop 36.110.101.139, Cost 16, Tag 0
186 Apr 14 2017 13:43:59.930.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
187 , Nexthop 36.110.101.139, Cost 16, Tag 0
188 Apr 14 2017 13:43:59.930.7-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
189 4, Nexthop 36.110.101.139, Cost 16, Tag 0
190 Apr 14 2017 13:44:06.460.1-08:00 beijing RIP/7/DBG: 6: 12236: RIP 1: Receive resp
191 onse from 36.110.101.139 on GigabitEthernet0/0/0
192 Apr 14 2017 13:44:06.460.2-08:00 beijing RIP/7/DBG: 6: 12247: Packet: Version 2, 
193 Cmd response, Length 84
194 Apr 14 2017 13:44:06.460.3-08:00 beijing RIP/7/DBG: 6: 12315: Dest 180.168.255.0/
195 24, Nexthop 0.0.0.0, Cost 1, Tag 0
196 Apr 14 2017 13:44:06.460.4-08:00 beijing RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
197 , Nexthop 0.0.0.0, Cost 4, Tag 0
198 Apr 14 2017 13:44:06.460.5-08:00 beijing RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
199 , Nexthop 0.0.0.0, Cost 2, Tag 0
200 Apr 14 2017 13:44:06.460.6-08:00 beijing RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
201 4, Nexthop 0.0.0.0, Cost 3, Tag 0
开启毒性逆转输出信息

我们可以发现日志中出现了很多的cost为16的日志信息。

 

3.接口上配置silent-interface (即被动接口)

  被动接口,如果一个允许了RIP的接口被设置为被动接口,那么该接口只能接收路由更新,但是不发送路由更新。

[shanghai]rip 

[shanghai-rip-1]version 2

[shanghai-rip-1]undo summary 

[shanghai-rip-1]silent-interface GigabitEthernet 0/0/0  #将这个端口设置为被动端口
[shanghai-rip-1]quit 
[shanghai]quit 
<shanghai>terminal debugging 
<shanghai>debugging rip 1 packet  
<shanghai>debugging rip 1 event 
 
 1 <shanghai>
 2 Apr 14 2017 18:41:54.90.1-08:00 shanghai RIP/7/DBG: 25: 4379: RIP 1: Periodic tim
 3 er expired for interface GigabitEthernet0/0/1 (180.168.255.118) and its added to 
 4 periodic update queue
 5 Apr 14 2017 18:41:54.90.2-08:00 shanghai RIP/7/DBG: 25: 4707: RIP 1: Interface Gi
 6 gabitEthernet0/0/1 (180.168.255.118) is deleted from the periodic update queue
 7 Apr 14 2017 18:41:54.750.1-08:00 shanghai RIP/7/DBG: 6: 12236: RIP 1: Receive res
 8 ponse from 36.110.101.138 on GigabitEthernet0/0/0
 9 Apr 14 2017 18:41:54.750.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2,
10  Cmd response, Length 24
11 Apr 14 2017 18:41:54.750.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24
12 , Nexthop 0.0.0.0, Cost 1, Tag 0
13 Apr 14 2017 18:41:55.270.1-08:00 shanghai RIP/7/DBG: 6: 12227: RIP 1: Sending res
14 ponse on interface GigabitEthernet0/0/1 from 180.168.255.118 to 224.0.0.9
15 Apr 14 2017 18:41:55.270.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2,
16  Cmd response, Length 44
17 Apr 14 2017 18:41:55.270.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 36.110.101.0/
18 24, Nexthop 0.0.0.0, Cost 1, Tag 0
19 Apr 14 2017 18:41:55.270.4-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24
20 , Nexthop 0.0.0.0, Cost 2, Tag 0
21 Apr 14 2017 18:41:56.60.1-08:00 shanghai RIP/7/DBG: 6: 12236: RIP 1: Receive resp
22 onse from 180.168.255.119 on GigabitEthernet0/0/1
23 Apr 14 2017 18:41:56.60.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2, 
24 Cmd response, Length 64
25 Apr 14 2017 18:41:56.60.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24
26 , Nexthop 0.0.0.0, Cost 3, Tag 0
27 Apr 14 2017 18:41:56.60.4-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24
28 , Nexthop 0.0.0.0, Cost 1, Tag 0
29 Apr 14 2017 18:41:56.60.5-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 221.11.132.0/2
30 4, Nexthop 0.0.0.0, Cost 2, Tag 0
31 Apr 14 2017 18:42:23.200.1-08:00 shanghai RIP/7/DBG: 25: 4379: RIP 1: Periodic ti
32 mer expired for interface GigabitEthernet0/0/1 (180.168.255.118) and its added to
33  periodic update queue
34 Apr 14 2017 18:42:23.200.2-08:00 shanghai RIP/7/DBG: 25: 4707: RIP 1: Interface G
35 igabitEthernet0/0/1 (180.168.255.118) is deleted from the periodic update queue
36 Apr 14 2017 18:42:23.920.1-08:00 shanghai RIP/7/DBG: 6: 12236: RIP 1: Receive res
37 ponse from 36.110.101.138 on GigabitEthernet0/0/0
38 Apr 14 2017 18:42:23.920.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2,
39  Cmd response, Length 24
40 Apr 14 2017 18:42:23.920.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24
41 , Nexthop 0.0.0.0, Cost 1, Tag 0
42 Apr 14 2017 18:42:24.140.1-08:00 shanghai RIP/7/DBG: 6: 12236: RIP 1: Receive res
43 ponse from 180.168.255.119 on GigabitEthernet0/0/1
44 Apr 14 2017 18:42:24.140.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2,
45  Cmd response, Length 64
46 Apr 14 2017 18:42:24.140.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 192.168.1.0/2
47 4, Nexthop 0.0.0.0, Cost 3, Tag 0
48 Apr 14 2017 18:42:24.140.4-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 202.14.67.0/2
49 4, Nexthop 0.0.0.0, Cost 1, Tag 0
50 Apr 14 2017 18:42:24.140.5-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 221.11.132.0/
51 24, Nexthop 0.0.0.0, Cost 2, Tag 0
52 Apr 14 2017 18:42:24.380.1-08:00 shanghai RIP/7/DBG: 6: 12227: RIP 1: Sending res
53 ponse on interface GigabitEthernet0/0/1 from 180.168.255.118 to 224.0.0.9
54 Apr 14 2017 18:42:24.380.2-08:00 shanghai RIP/7/DBG: 6: 12247: Packet: Version 2,
55  Cmd response, Length 44
56 Apr 14 2017 18:42:24.380.3-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 36.110.101.0/
57 24, Nexthop 0.0.0.0, Cost 1, Tag 0
58 Apr 14 2017 18:42:24.380.4-08:00 shanghai RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24
59 , Nexthop 0.0.0.0, Cost 2, Tag 0
调试为被动端口后的输出的信息

我们可以从这个日志中看出只有接收路由没有发送路由!

 
 
 六.RIP认证
配置香港的路由和海南的路由进行RIP认证模式。
 
香港 配置如下:

[hongkong]interface GigabitEthernet 0/0/0
[hongkong-GigabitEthernet0/0/0]rip authentication-mode md5 usual yinzhengjie123

海南配置如下:

[hainan]interface GigabitEthernet 0/0/0

[hainan-GigabitEthernet0/0/0]rip authentication-mode md5 usual yinzhengjie123

注意:H3C配置也是这样的格式配置,知识加密的方式变化了而已,注意配置认证的密码“yinzhengjie123”在2个即可要配置成一直才可以哟,不然会报错 
 1 <hainan>
 2 Apr 14 2017 18:52:10.250.1-08:00 hainan RIP/7/DBG: 6: 12227: RIP 1: Sending respo
 3 nse on interface GigabitEthernet0/0/0 from 202.14.67.5 to 224.0.0.9
 4 Apr 14 2017 18:52:10.250.2-08:00 hainan RIP/7/DBG: 6: 12247: Packet: Version 2, C
 5 md response, Length 68
 6 Apr 14 2017 18:52:10.250.3-08:00 hainan RIP/7/DBG: 6: 12407: Authentication-mode 
 7 - MD5 Digest: e7c72b0b.7f7b45b0.93e21a3f.eaee65e1 
 8 Apr 14 2017 18:52:10.250.4-08:00 hainan RIP/7/DBG: 6: 12439: Sequence: 00000430 
 9 Apr 14 2017 18:52:10.250.5-08:00 hainan RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24, N
10 exthop 0.0.0.0, Cost 2, Tag 0
11 Apr 14 2017 18:52:10.250.6-08:00 hainan RIP/7/DBG: 6: 12315: Dest 221.11.132.0/24, 
12 Nexthop 0.0.0.0, Cost 1, Tag 0
13 Apr 14 2017 18:52:17.490.1-08:00 hainan RIP/7/DBG: 6: 12236: RIP 1: Receive respo
14 nse from 202.14.67.4 on GigabitEthernet0/0/0
15 Apr 14 2017 18:52:17.490.2-08:00 hainan RIP/7/DBG: 6: 12247: Packet: Version 2, C
16 md response, Length 88
17 Apr 14 2017 18:52:17.490.3-08:00 hainan RIP/7/DBG: 6: 12407: Authentication-mode 
18 - MD5 Digest: 88e8c82a.cba1f8b4.df15be4b.8957aa3f 
19 Apr 14 2017 18:52:17.490.4-08:00 hainan RIP/7/DBG: 6: 12439: Sequence: 0000043b 
20 Apr 14 2017 18:52:17.490.5-08:00 hainan RIP/7/DBG: 6: 12315: Dest 36.110.101.0/24, 
21 Nexthop 0.0.0.0, Cost 2, Tag 0
22 Apr 14 2017 18:52:17.490.6-08:00 hainan RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24, Ne
23 xthop 0.0.0.0, Cost 3, Tag 0
24 Apr 14 2017 18:52:17.490.7-08:00 hainan RIP/7/DBG: 6: 12315: Dest 180.168.255.0/24,
25  Nexthop 0.0.0.0, Cost 1, Tag 0
26 Apr 14 2017 18:52:21.270.1-08:00 hainan RIP/7/DBG: 6: 12227: RIP 1: Sending respo
27 nse on interface GigabitEthernet0/0/1 from 221.11.132.21 to 224.0.0.9
28 Apr 14 2017 18:52:21.270.2-08:00 hainan RIP/7/DBG: 6: 12247: Packet: Version 2, C
29 md response, Length 84
30 Apr 14 2017 18:52:21.270.3-08:00 hainan RIP/7/DBG: 6: 12315: Dest 36.110.101.0/24
31 , Nexthop 0.0.0.0, Cost 3, Tag 0
32 Apr 14 2017 18:52:21.270.4-08:00 hainan RIP/7/DBG: 6: 12315: Dest 172.30.1.0/24, 
33 Nexthop 0.0.0.0, Cost 4, Tag 0
34 Apr 14 2017 18:52:21.270.5-08:00 hainan RIP/7/DBG: 6: 12315: Dest 180.168.255.0/2
35 4, Nexthop 0.0.0.0, Cost 2, Tag 0
36 Apr 14 2017 18:52:21.270.6-08:00 hainan RIP/7/DBG: 6: 12315: Dest 202.14.67.0/24,
37  Nexthop 0.0.0.0, Cost 1, Tag 0
38 Apr 14 2017 18:52:25.860.2-08:00 hainan RIP/7/DBG: 6: 12236: RIP 1: Receive respo
39 nse from 221.11.132.22 on GigabitEthernet0/0/1
40 Apr 14 2017 18:52:25.860.3-08:00 hainan RIP/7/DBG: 6: 12247: Packet: Version 2, C
41 md response, Length 24
42 Apr 14 2017 18:52:25.860.4-08:00 hainan RIP/7/DBG: 6: 12315: Dest 192.168.1.0/24,
43  Nexthop 0.0.0.0, Cost 1, Tag 0
配置认证完毕会发现有认证的日志哟

调试完信息之后,如果不想看的话可以关闭调试信息:

<hainan>undo debugging all  #将所有的调试信息关闭。

 
 
 
 扩展题:
  路由器不收路由更新,180s后才能从IP路由表中丢到回收站,这个时间能不能缩短?
  答:可以的。
 
[beijing]rip 
[beijing-rip-1]version 2
[beijing-rip-1]timers timeout 60 #进程模式下降时间设置成为60s
 
 
 
 
 
 
 
posted @ 2017-04-13 01:08  尹正杰  阅读(17050)  评论(0编辑  收藏  举报