RIP路由协议快速入门(4)

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

中括号里的内容是路由项的治理距离和度量值,RIP的缺省治理距离是120,到达3、4子网的度量值是1,即经过1个路由器可达。

同样的命令在另外两台路由器上运行,结果如下。

testSH#shiproute

Gatewayoflastresortisnotset

172.16.0.0/24issubnetted,4subnets

R172.16.4.0[120/1]via172.16.3.2,00:00:13,Ethernet0/0

C172.16.1.0isdirectlyconnected,Ethernet0/1

R172.16.2.0[120/1]via172.16.1.2,00:00:11,Ethernet0/1

[120/1]via172.16.3.2,00:00:13,Ethernet0/0

C172.16.3.0isdirectlyconnected,Ethernet0/0

testTJ#shiproute

Gatewayoflastresortisnotset

172.16.0.0/24issubnetted,4subnets

C172.16.4.0isdirectlyconnected,Ethernet0/0

R172.16.1.0[120/1]via172.16.3.3,00:00:07,Ethernet0/1

[120/1]via172.16.2.3,00:00:19,Serial1/0

C172.16.2.0isdirectlyconnected,Serial1/0

C172.16.3.0isdirectlyconnected,Ethernet0/1

分析上述命令输出时,一定要随时参照拓扑图,离开网络拓扑,上面的信息就没有任何意义。动态路由的灵活性体现在一条链路出现故障,路由算法会自动切换到迂回链路上。例如我们将testBJ和testTJ之间的串行线缆断开,一段时间后,再检查路由表,如下所示。

testBJ#shiproute

Gatewayoflastresortisnotset

172.16.0.0/24issubnetted,3subnets

R172.16.4.0[120/2]via172.16.1.3,00:00:22,Ethernet0/1

C172.16.1.0isdirectlyconnected,Ethernet0/1

R172.16.3.0[120/1]via172.16.1.3,00:00:22,Ethernet0/1

我们发现串行链路所在的子网2断开了,到网络172.16.4.0网络的数据包都将绕经testSH路由器。

shipprotocols命令可以显示当前路由协议的状况,如下所示。

testBJ#shipprotocols

RoutingProtocolis"rip"

Sendingupdatesevery30seconds,nextduein19seconds

Invalidafter180seconds,holddown180,flushedafter240

Outgoingupdatefilterlistforallinterfacesisnotset

Incomingupdatefilterlistforallinterfacesisnotset

Redistributing:connected,rip

Defaultversioncontrol:sendversion1,receiveanyversion

InterfaceSendRecvKey-chain

Ethernet0/1112

Serial1/0112

RoutingforNetworks:

172.16.0.0

RoutingInformationSources:

GatewayDistanceLastUpdate

172.16.2.212000:00:05

172.16.1.312000:00:27

Distance:(defaultis120)

从命令输出中,可以看出RIP协议的基本配置,还可以得知与当前路由器交换信息的路由器有testTJ(172.16.2.2)和testSH(172.16.1.3)两台路由器,上次接收路由信息分别在5秒和27秒之前。

要了解路由器之间交换路由信息的详情,可以使用debugiprip命令。如下所示,输入命令后,隔一段时间,控制台上出现接收或者发送RIP广播的信息。

testBJ#debugiprip

RIPprotocoldebuggingison

testBJ#

RIP:receivedv1updatefrom172.16.2.2onSerial1/0

172.16.4.0in1hops

172.16.3.0in1hops

RIP:receivedv1updatefrom172.16.1.3onEthernet0/1

172.16.4.0in2hops

172.16.3.0in1hops

RIP:sendingv1updateto255.255.255.255viaEthernet0/1(172.16.1.2)

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航