监测和调试 OSPF协议( 二 )


●发送链路状态请求包 (LS REQ Packct)到192.168.1.1 , 状态为"EXCHANGE";
●与邻居路由器192.168.1.1的同步操作完成 , 状态为"FULL";
●整个加载过程完成 。
(6)show IP ospf 100命令也显示了路由器R2的ID号为10.1.2.1 , 即回送接口上的最高IP
(7)切换到R1路由器 , 查看其OSPF邻居 , 同样可以看到邻居路由器R2的ID变成了
第2部分:监测OSPF事件和OSPF包的传输
以下使用debug ip ospf events和debug ip ospf packet命令监测OSPF相关事件和相关数据包的传输 。
监测清单11-4记录了有关操作及监测结果 。
监测清单11-4监测OSPF事件和数据包
R1(config)#logg console
R1(config)#^Z
R1#debug ip ospf events
OSPF events debuggmg is on
R1#
02:08:50: OSPF: Rev hello from 10,1.2.1 area 0 from Serial1 192.168.1.2
02:08:50: OSPF: End of hello processing
02:09:00: OSPF: Rev hello from 10.1.2.1 area 0 from Serial1 192.168.1.2
02:09:00: OSPF: End of hello processing
02:09:10: OSPF: Rcv hello from 10.1.2.1 area 0 from Serial1 192.168.1.2
02:09:10: OSPF: End of hello processing
02:09:20:"OSPF: Rcv hello from 10.1.2.1 area 0 from Serial1 192.168.1.2
02:09:20: OSPF: End of hello processing
R1#undebug all
All possible debugging has been turned off
R1#debug ip ospf packet
OSPF packet debugging is on
R1#
02:11:40: OSPF: rev. v:21:1 1:48 rid: 10.1.2.1
aid:0.0.0.0.chk:2DF3 aut:0 auk: from Serial1
02:11:50: OSPF: rev. v:21:1 1:48 rid: 10.1.2.1
aid:0.0.0.0 chk:2DF3 aut:0 auk: from Serial 1
02:12:00: OSPF: rev. v:2 t:1 1:48 rid: 10.1.2.1
aid:0.0.0.0 chk:2DF3 aut:0 auk: from Serial 1
02:12:10: OSPF: rev. v:2 t:1 1:48 rid:10.1.2.1
aid:0.0.0.0 ehk:2DF3 aut:0 auk: from Serial 1
02:12:20: OSPF: rev. v:2 t:1 1:48 rid: 10.1.2.1
aid:0.0.0.0 ehk:2DF3 aut:0 auk: from Serial 1
RS#undebug all
All possible debugging has been turned off
(1)在R1路由器上 , 首先打开对OSPF事件的Debug , 监测结果显示了接收一系列的Hello包 , 其源地址是192.168.1.2 , 即R2的IP地址 。
注重到Hello包之间的时间间隔是10秒 , 这是因为在点到点链路中 , Hello包每隔10秒发送一次 。
(2)关闭Debug 。然后打开对OSPF包的监测 , 其命令是debug ip ospf packet 。
R1路由器监测到从R2传来的一系列的OSPF包 , 这些包实际上就是每10秒接收1个的Hello包 。
第3部分:调整带宽参数更改cost值
路由器接口的带宽参数对链路cost有直接的影响 。
监测清单11-5是有关操作及监测结果的记录 。
监测清单11-5更改带宽参数以影响cost值
让我们用实验来进行演示 。
第1段:查看接口带宽与链路Cost
R2#conft
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 100
R2(config-router)#netw 192.168.1.5 0.0.0.0 area 0
R2(config"router)#^Z
R2#
R2#sh ip route ospf
172.16.0.0/24 is subnetted, 2 subnets
O 172.16.1.0 [110/11] via 192.168.1.1, 00:00:33, Serial1
O 172.16.3.0 [110/11 via 192.168.1.6, 00:00:33, Serial0
R2#sh int s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 192.168.1.5/30
MTU 1500 DLY 20000 usec,
 reliability 255/255, txioad 1/255, rxioad 1/255
... (此处删节)
R2#sh int s1
Serial 1 is up, line protocol is up
 Hardware is HD64570
 Internet address is 192.168.1.2/30
 MTU 1500 bytes,BW 1544 Kbit,DLY 20000 usec,
reliability 255/255, txioad 1/255, rxioad 1/255
... (此处删节)
R2#sh ip ospf int s0
Serial0 is up, line protocol is up
 Internet Address 192.168.1.5/30, Area 0
 Process ID 100, Router ID 10.1.2.1, Network Type POINT_TO_POINT,Cost:64

推荐阅读