//调试ospf事件,显示发送,接受hello包,邻居改变事件,DR选取,如何建立邻接关系。
带认证的会多一条
*Mar 1 04:43:39.382: OSPF: Send with youngest Key 1
*Mar 1 04:43:39.382: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 04:43:41.986: OSPF: Rcv pkt from 12.1.1.2, FastEthernet0/0 : Mismatch Authentication Key - No message digest key 0 on interface
如下,不带认证的debug信息
R1#debug ip ospf events
OSPF events debugging is on
R1#正常状况,每隔10s发送hello包,并接受邻居的hello包
*Mar 1 02:28:12.911: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:28:15.919: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:28:15.923: OSPF: End of hello processing
R1#
*Mar 1 02:28:19.159: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:28:22.915: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:28:25.947: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:28:25.951: OSPF: End of hello processing
R1#
*Mar 1 02:28:29.159: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:28:32.919: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:28:39.159: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:28:42.919: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:28:49.163: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:28:52.923: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:28:59.163: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:29:02.927: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#//在R2上shutdown 与R1的接口,邻接关系断掉,重新选取DR,建立路由器LSA,显示无邻居可以建立。。。
*Mar 1 02:29:05.951: OSPF: 22.2.2.2 address 12.1.1.2 on FastEthernet0/0 is dead
*Mar 1 02:29:05.951: OSPF: 22.2.2.2 address 12.1.1.2 on FastEthernet0/0 is dead, state DOWN
*Mar 1 02:29:05.955: %OSPF-5-ADJCHG: Process 1, Nbr 22.2.2.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R1#
*Mar 1 02:29:05.959: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 02:29:05.963: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 02:29:05.963: OSPF: Elect BDR 0.0.0.0
*Mar 1 02:29:05.967: OSPF: Elect DR 1.1.1.1
*Mar 1 02:29:05.967: DR: 1.1.1.1 (Id) BDR: none
*Mar 1 02:29:06.459: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000015
*Mar 1 02:29:06.463: OSPF: No full nbrs to build Net Lsa for interface FastEthernet0/0
*Mar 1 02:29:06.463: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
*Mar 1 02:29:06.467: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
R1#
*Mar 1 02:29:09.167: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:29:12.931: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#//试图删除过期的LSA
*Mar 1 02:29:16.467: OSPF: service_maxage: Trying to delete MAXAGE LSA
R1#
*Mar 1 02:29:19.171: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:29:22.935: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:29:29.175: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 02:29:32.939: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#//R2 f0/0 no shutdown ,收到邻居的hello包。没有等到10s,立即发送hello包
*Mar 1 02:29:39.179: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 02:29:39.395: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:29:39.399: OSPF: Send immediate hello to nbr 22.2.2.2, src address 12.1.1.2, on FastEthernet0/0
*Mar 1 02:29:39.403: OSPF: Send hello to 12.1.1.2 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 02:29:39.407: OSPF: End of hello processing
R1#
*Mar 1 02:29:42.943: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#//进入2 way状态,选取DR,确定主备,交换DBD等建立邻接关系。
*Mar 1 02:29:44.435: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x81A opt 0x52 flag 0x7 len 32 mtu 1500 state INIT
*Mar 1 02:29:44.439: OSPF: 2 Way Communication to 22.2.2.2 on FastEthernet0/0, state 2WAY
*Mar 1 02:29:44.443: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 02:29:44.443: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 02:29:44.447: OSPF: Elect BDR 22.2.2.2
*Mar 1 02:29:44.447: OSPF: Elect DR 1.1.1.1
*Mar 1 02:29:44.451: DR: 1.1.1.1 (Id) BDR: 22.2.2.2 (Id)
*Mar 1 02:29:44.455: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x2652 opt 0x52 flag 0x7 len 32
*Mar 1 02:29:44.459: OSPF: NBR Negotiation Done. We are the SLAVE
*Mar 1 02:29:44.459: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x81A opt 0x52 flag 0x2 len 212
*Mar 1 02:29:44.527: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x81B opt 0x52 flag 0x3 len 232 mtu 1500 state EXCHANGE
*Mar 1 02:29:44.531: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x81B opt 0x52 flag 0x0 len 32
*Mar 1 02:29:44.563: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x81C opt 0x52 flag 0x1 len 32 mtu 1500 state EXCHANGE
*Mar 1 02:29:44.567: OSPF: Exchange Done with 22.2.2.2 on FastEthernet0/0
*Mar 1 02:29:44.567: OSPF: Send LS REQ to 22.2.2.2 length 24 LSA count 2
*Mar 1 02:29:44.571: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x81C opt 0x52 flag 0x0 len 32
*Mar 1 02:29:44.575: OSPF: Rcv LS REQ from 22.2.2.2 on FastEthernet0/0 length 36 LSA count 1
*Mar 1 02:29:44.579: OSPF: Send UPD to 12.1.1.2 on FastEthernet0/0 length 64 LSA count 1
*Mar 1 02:29:44.607: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 120 LSA count 2
*Mar 1 02:29:44.615: OSPF: No full nbrs to build Net Lsa for interface FastEthernet0/0
*Mar 1 02:29:44.619: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
*Mar 1 02:29:44.619: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
*Mar 1 02:29:44.623: OSPF: Synchronized with 22.2.2.2 on FastEthernet0/0, state FULL
*Mar 1 02:29:44.627: %OSPF-5-ADJCHG: Process 1, Nbr 22.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar 1 02:29:44.959: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000016
*Mar 1 02:29:45.115: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 88 LSA count 1
R1#
R1#
*Mar 1 02:29:49.183: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 02:29:49.271: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:29:49.275: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 02:29:49.279: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 02:29:49.279: OSPF: Elect BDR 22.2.2.2
*Mar 1 02:29:49.279: OSPF: Elect DR 1.1.1.1
*Mar 1 02:29:49.283: DR: 1.1.1.1 (Id) BDR: 22.2.2.2 (Id)
*Mar 1 02:29:49.287: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 02:29:49.287: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 02:29:49.291: OSPF: Elect BDR 22.2.2.2
R1#
*Mar 1 02:29:49.291: OSPF: Elect DR 1.1.1.1
*Mar 1 02:29:49.295: DR: 1.1.1.1 (Id) BDR: 22.2.2.2 (Id)
*Mar 1 02:29:49.295: OSPF: End of hello processing
*Mar 1 02:29:49.619: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
*Mar 1 02:29:49.623: OSPF: Build network LSA for FastEthernet0/0, router ID 1.1.1.1
R1#
*Mar 1 02:29:52.947: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:29:59.187: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 02:29:59.311: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:29:59.315: OSPF: End of hello processing
R1#
*Mar 1 02:30:02.947: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 02:30:09.191: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 02:30:09.291: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 02:30:09.295: OSPF: End of hello processing
带认证的debug信息
R1#
*Mar 1 04:44:23.170: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 04:44:29.394: OSPF: Send with youngest Key 1
*Mar 1 04:44:29.394: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 04:44:32.002: OSPF: Rcv pkt from 12.1.1.2, FastEthernet0/0 : Mismatch Authentication Key - No message digest key 0 on interface
R1#
*Mar 1 04:44:33.170: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 04:44:39.398: OSPF: Send with youngest Key 1
*Mar 1 04:44:39.398: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 04:44:41.994: OSPF: Rcv pkt from 12.1.1.2, FastEthernet0/0 : Mismatch Authentication Key - No message digest key 0 on interface
R1#
*Mar 1 04:44:43.174: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 04:44:49.398: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.398: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 04:44:49.454: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 04:44:49.458: OSPF: 2 Way Communication to 22.2.2.2 on FastEthernet0/0, state 2WAY
*Mar 1 04:44:49.462: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 04:44:49.462: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 04:44:49.466: OSPF: Elect BDR 0.0.0.0
*Mar 1 04:44:49.466: OSPF: Elect DR 22.2.2.2
*Mar 1 04:44:49.470: OSPF: Elect BDR 1.1.1.1
*Mar 1 04:44:49.470: OSPF: Elect DR 22.2.2.2
*Mar 1 04:44:49.474: DR: 22.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Mar 1 04:44:49.474: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x243B opt 0x52 flag 0x7 len 32
*Mar 1 04:44:49.478: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.482: OSPF: Set FastEthernet0/0 flush timer
*Mar 1 04:44:49.482: OSPF: Remember old DR 1.1.1.1 (id)
*Mar 1 04:44:49.486: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 04:44:49.490: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 04:44:49.490: OSPF: Elect BDR 1.1.1.1
*Mar 1 04:44:49.490: OSPF: Elect DR 22.2.2.2
*Mar 1 04:44:49.494: DR: 22.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Mar 1 04:44:49.494: OSPF: Send immediate hello to nbr 22.2.2.2, src address 12.1.1.2, on FastEthernet0/0
*Mar 1 04:44:49.494: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.494: OSPF: Send hello to 12.1.1.2 area 0 on FastEthernet0/0 from 12.1.1.1
*Mar 1 04:44:49.494: OSPF: End of hello processing
*Mar 1 04:44:49.522: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x254B opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART
*Mar 1 04:44:49.522: OSPF: NBR Negotiation Done. We are the SLAVE
*Mar 1 04:44:49.526: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x254B opt 0x52 flag 0x2 len 232
*Mar 1 04:44:49.530: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.578: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x254C opt 0x52 flag 0x3 len 212 mtu 1500 state EXCHANGE
*Mar 1 04:44:49.586: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x254C opt 0x52 flag 0x0 len 32
*Mar 1 04:44:49.586: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.630: OSPF: Rcv DBD from 22.2.2.2 on FastEthernet0/0 seq 0x254D opt 0x52 flag 0x1 len 32 mtu 1500 state EXCHANGE
*Mar 1 04:44:49.634: OSPF: Exchange Done with 22.2.2.2 on FastEthernet0/0
*Mar 1 04:44:49.634: OSPF: Send LS REQ to 22.2.2.2 length 12 LSA count 1
*Mar 1 04:44:49.638: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.638: OSPF: Send DBD to 22.2.2.2 on FastEthernet0/0 seq 0x254D opt 0x52 flag 0x0 len 32
*Mar 1 04:44:49.642: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.646: OSPF: Rcv LS REQ from 22.2.2.2 on FastEthernet0/0 length 48 LSA count 2
*Mar 1 04:44:49.650: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.650: OSPF: Send UPD to 12.1.1.2 on FastEthernet0/0 length 96 LSA count 2
*Mar 1 04:44:49.670: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 88 LSA count 1
*Mar 1 04:44:49.674: OSPF: Synchronized with 22.2.2.2 on FastEthernet0/0, state FULL
*Mar 1 04:44:49.678: %OSPF-5-ADJCHG: Process 1, Nbr 22.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
*Mar 1 04:44:49.718: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 60 LSA count 1
*Mar 1 04:44:49.986: OSPF: Send with youngest Key 1
*Mar 1 04:44:49.998: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 88 LSA count 1
*Mar 1 04:44:52.002: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 04:44:52.006: OSPF: Neighbor change Event on interface FastEthernet0/0
*Mar 1 04:44:52.010: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 04:44:52.010: OSPF: Elect BDR 1.1.1.1
*Mar 1 04:44:52.014: OSPF: Elect DR 22.2.2.2
*Mar 1 04:44:52.014: DR: 22.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Mar 1 04:44:52.014: OSPF: End of hello processing
*Mar 1 04:44:52.182: OSPF: Send with youngest Key 1
*Mar 1 04:44:53.174: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
*Mar 1 04:44:54.690: OSPF: Rcv LS UPD from 22.2.2.2 on FastEthernet0/0 length 60 LSA count 1
R1#
R1#
*Mar 1 04:44:57.194: OSPF: Send with youngest Key 1
R1#
*Mar 1 04:44:59.402: OSPF: Send with youngest Key 1
*Mar 1 04:44:59.402: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 04:45:01.998: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 04:45:02.002: OSPF: End of hello processing
R1#
*Mar 1 04:45:03.178: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet1/0 from 10.1.1.1
R1#
*Mar 1 04:45:09.402: OSPF: Send with youngest Key 1
*Mar 1 04:45:09.402: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/0 from 12.1.1.1
R1#
*Mar 1 04:45:12.010: OSPF: Rcv hello from 22.2.2.2 area 0 from FastEthernet0/0 12.1.1.2
*Mar 1 04:45:12.014: OSPF: End of hello processing
R1#
这三条debug命令区别
debug ip ospf packet
调试ip ospf 数据包。输出的只是收到的包的信息,不涉及发送的包,只列出包头的各字段,并没有解读,不涉及其他信息,一般不用打开。
调试ospf事件,显示发送,接受hello(已解读),邻居改变事件,DR选取,
显示建立邻接关系的过程,比debug ip ospf adj,多了显示 发送接收hello数据包
debug ip ospf adj
调试OSPF邻接信息
显示邻接关系的建立过程。比debug ip ospf events 更加简洁,只显示邻接建立。
显示,发送认证密钥的情况(每隔10S,hello包),如果(收到的数据包)密钥不匹配 ,会提示;
没有配置认证的话,无输出。一般只用这个就可以了。