路由技术(IPv4版)
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人

3.4 检查IGRP的运行

1.show ip protocols

使用命令show ip protocols可以检查路由器当前运行的路由协议。

下面是在路由器Left上运行路由协议的报告。

  Left#show ip protocols
  Routing Protocol is "igrp 200"
  Sending updates every 90 seconds, next due in 26 seconds
  Invalid after 270 seconds, hold down 280, flushed after 630
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  IGRP maximum hopcount 100
  IGRP maximum metric variance 1
  Redistributing: igrp 200
  Maximum path: 4
  Routing for Networks:
    172.16.0.0
    192.168.1.0
  Routing Information Sources:
    Gateway   Distance   Last Update
    172.16.3.3     100   00:00:33
  Distance: (default is 100)
Left#

●IGRP maximum metric variance 1:指当前度量值的变化因子为1,该参数用于不等值路径负载分担,请参阅EIGRP。

●其他含义请读者参阅运行RIP协议时对该命令的解释。

2.show ip route

该命令用来查看路由表。

(1)查看路由器Left的路由表

Left#sh ip route
(略去代码部分)
Gateway of last resort is not set
      172.16.0.0/24 is subnetted, 2 subnets
I     172.16.4.0 [100/120] via 172.16.3.3, 00:00:10, FastEthernet0/0
    C    172.16.3.0 is directly connected, FastEthernet0/0
I     10.0.0.0/8 [100/130] via 172.16.3.3, 00:00:10, FastEthernet0/0
C     192.168.1.0/24 is directly connected, FastEthernet0/1
Left#

(2)查看路由器Middle的路由表

Middle#sh ip route
(略去代码部分)
Gateway of last resort is not set
    172.16.0.0/24 is subnetted, 2 subnets
C      172.16.4.0 is directly connected, FastEthernet0/0
C      172.16.3.0 is directly connected, FastEthernet0/1
I   10.0.0.0/8 [100/120] via 172.16.4.4, 00:00:34, FastEthernet0/0
I   192.168.1.0/24 [100/120] via 172.16.3.1, 00:00:34, FastEthernet0/1
Middle#

(3)查看路由器Right的路由表

Right#sh ip rout
(略去代码部分)
Gateway of last resort is not set
    172.16.0.0/24 is subnetted, 2 subnets
C   172.16.4.0 is directly connected, FastEthernet0/1
I  172.16.3.0 [100/120] via 172.16.4.3, 00:00:18, FastEthernet0/1
   10.0.0.0/16 is subnetted, 1 subnets
C  10.11.0.0 is directly connected, FastEthernet0/0
I  192.168.1.0/24 [100/130] via 172.16.4.3, 00:00:18, FastEthernet0/1
Right#

3.debug ip igrp

有两个debug命令可以报告IGRP路由信息的详细内容,一个是debug ip igrp transaction,该命令详细报告了通告出去和接收到的路由条目;另一个是debug ip igrp events ,该命令只是总结性地报告了通告和接收到的路由条目数量及类型。

在路由器Right上执行第一个命令后的输出如下:

Right#debug ip igrp transaction
IGRP protocol debugging is on
Right#
00:59:51: IGRP: received update from 172.16.4.3 on FastEthernet0/1
00:59:51:       subnet 172.16.3.0, metric 120 (neighbor 110)
00:59:51:       network 192.168.1.0, metric 130 (neighbor 120)
01:00:20: IGRP: sending update to 255.255.255.255 via FastEthernet0/0 (10.11.0.1)
01:00:20:           network 172.16.0.0, metric=110
01:00:20:           network 192.168.1.0, metric=130
01:00:20: IGRP: sending update to 255.255.255.255 via FastEthernet0/1 (172.16.4.4)
01:00:20:           network 10.0.0.0, metric=110
Right#undebug all

其中,(neighbor 110)代表邻居路由器到达目标网络的度量值,其他信息的含义请参照对debug ip rip的解释去理解。

执行另一个命令后的输出如下:

Right#debug ip igrp events
IGRP event debugging is on
Right#
01:02:50: IGRP: sending update to 255.255.255.255 via FastEthernet0/0 (10.11.0.1)
01:02:50: IGRP: Update contains 0 interior, 2 system, and 0 exterior routes.
01:02:50: IGRP: Total routes in update: 2
01:02:50: IGRP: sending update to 255.255.255.255 via FastEthernet0/1 (172.16.4.4)
01:02:50: IGRP: Update contains 0 interior, 1 system, and 0 exterior routes.
01:02:50: IGRP: Total routes in update: 1
01:03:49: IGRP: received update from 172.16.4.3 on FastEthernet0/1
01:03:49: IGRP: Update contains 1 interior, 1 system, and 0 exterior routes.
01:03:49: IGRP: Total routes in update: 2
Right#undebug all

粗体显示的部分的含义是:路由器在f0/1接口上收到了来自邻居172.16.4.3的路由更新信息,更新中包含一个内部路由(子网号代表的路由)、一个系统路由(主网号代表的路由)和零个外部路由(非IGRP的路由);这次更新的路由总量为2条。