|
(在R3的打开debug ip ospf events )
00:33:04: OSPF: Rcv hello from 10.1.3.4 area 2 from Serial0/1 34.34.34.2
00:33:04: OSPF: End of hello processing
(然后在R4上
00:33:04: OSPF: End of hello processing
(然后在R4上
R4(Config-router)#router-id 4.4.4.4
R4#clear ip ospf process )---更改路由ID
R3#
00:33:08: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:08: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.3.4 on Serial0/1 from FULL to DOWN (从R4接收到改变的信息,状态变成DOWN)
, Neighbor Down: Adjacency forced to reset (邻居关系强制重设)
R3#
00:33:08: OSPF: End of hello processing
R3#
00:33:10: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:10: OSPF: End of hello processing
R3#(R3先发送一个HELLO到对方,R4就会从DOWN状态进入到INIT状态)
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DA opt 0x42 flag 0x7 l (在INIT状态下只能单方向的从对方接收DBD,而不能发送DBD到对方)
en 32 mtu 1500 state INIT
00:33:14: OSPF: 2 Way Communication to 4.4.4.4 on Serial0/1, state 2WAY
R3#
00:33:08: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:08: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.3.4 on Serial0/1 from FULL to DOWN (从R4接收到改变的信息,状态变成DOWN)
, Neighbor Down: Adjacency forced to reset (邻居关系强制重设)
R3#
00:33:08: OSPF: End of hello processing
R3#
00:33:10: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:10: OSPF: End of hello processing
R3#(R3先发送一个HELLO到对方,R4就会从DOWN状态进入到INIT状态)
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DA opt 0x42 flag 0x7 l (在INIT状态下只能单方向的从对方接收DBD,而不能发送DBD到对方)
en 32 mtu 1500 state INIT
00:33:14: OSPF: 2 Way Communication to 4.4.4.4 on Serial0/1, state 2WAY
(当路由器看到它自己出现在一个邻居路由器的HELLO分组中时,它就进入了双向状态)
00:33:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x1E65 opt 0x42 flag 0x7 len 32
(当从对方接收到一个类型2的数据库描述DBD分组,路由器就会进入EXSTART状态,在这里没有显示出来)
00:33:14: OSPF: NBR Negotiation Done. We are the SLAVE (当前R3为从状态,具有最高OSPF路由器ID的路由器将胜出并变为"主",此时R4为主)
00:33:14: OSPF: NBR Negotiation Done. We are the SLAVE (当前R3为从状态,具有最高OSPF路由器ID的路由器将胜出并变为"主",此时R4为主)
(两个邻居路由器用HELLO分组来协商谁主谁从,并用DBD分组来交换数据库信息)
00:33:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DA opt 0x42 flag 0x2 le
n 152
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DB opt 0x42 flag 0x3 l
en 52 mtu 1500 state EXCHANGE
00:33:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DA opt 0x42 flag 0x2 le
n 152
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DB opt 0x42 flag 0x3 l
en 52 mtu 1500 state EXCHANGE
(路由器用类型2的DBD来相互描述它们的链路状态数据库的摘要信息)
n 323:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DB opt 0x42 flag 0x0 le
00:33:14: OSPF: Database request to 4.4.4.4
00:33:14: OSPF: sent LS REQ packet to 34.34.34.2, length 12
n 323:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DB opt 0x42 flag 0x0 le
00:33:14: OSPF: Database request to 4.4.4.4
00:33:14: OSPF: sent LS REQ packet to 34.34.34.2, length 12
(在描述过各自的链路状态数据库之后,路由器用类型3的链路状态请求(LSR)分组来请求更完整的信息,上为R3向R4发也链路状态请示包,这是在加载状态下完成的,这里好像没有显示)
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DC opt 0x42 flag 0x1 l (当R4接收到一个LSR的时候,它会用一个类型4的链路状态更新(LSU)分组进行回应.这些类型4的LSU分组含有确切的LSA,而LSA是链路状态型路由选择协议的核心)
en 32 mtu 1500 state EXCHANGE(这个交换状态显示,是因为它又从对方接收到了DBD分组)
00:33:14: OSPF: Exchange Done with 4.4.4.4 on Serial0/1
00:33:14: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1 seq 0x11DC opt 0x42 flag 0x1 l (当R4接收到一个LSR的时候,它会用一个类型4的链路状态更新(LSU)分组进行回应.这些类型4的LSU分组含有确切的LSA,而LSA是链路状态型路由选择协议的核心)
en 32 mtu 1500 state EXCHANGE(这个交换状态显示,是因为它又从对方接收到了DBD分组)
00:33:14: OSPF: Exchange Done with 4.4.4.4 on Serial0/1
(交换状态已经完成)
00:33:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DC opt 0x42 flag 0x0 le
n 32
00:33:14: OSPF: Synchronize ( 两边已经达到同步)
R3# with 4.4.4.4 on Serial0/1, state FULL
00:33:14: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/1 from LOADING to FULL, Loading Done
00:33:14: OSPF: Send DBD to 4.4.4.4 on Serial0/1 seq 0x11DC opt 0x42 flag 0x0 le
n 32
00:33:14: OSPF: Synchronize ( 两边已经达到同步)
R3# with 4.4.4.4 on Serial0/1, state FULL
00:33:14: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/1 from LOADING to FULL, Loading Done
(加载状态结束之后,路由器就进入全毗邻状态)
R3#
00:33:18: OSPF: service_maxage: Trying to delete MAXAGE LSA
00:33:18: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:18: OSPF: End of hello processing
R3#
00:33:20: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:20: OSPF: End of hello processing
R3#
00:33:28: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:28: OSPF: End of hello processing
R3#
00:33:30: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:30: OSPF: End of hello processing
R3#sh ip route (显示路由表信息)
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
R3#
00:33:18: OSPF: service_maxage: Trying to delete MAXAGE LSA
00:33:18: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:18: OSPF: End of hello processing
R3#
00:33:20: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:20: OSPF: End of hello processing
R3#
00:33:28: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:28: OSPF: End of hello processing
R3#
00:33:30: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:30: OSPF: End of hello processing
R3#sh ip route (显示路由表信息)
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
34.0.0.0/24 is subnetted, 1 subnets
C 34.34.34.0 is directly connected, Serial0/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 23.23.23.1, 00:02:18, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/65] via 34.34.34.2, 00:00:08, Serial0/1
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
10.0.0.0/32 is subnetted, 4 subnets
O 10.1.3.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.2.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.1.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.0.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/128] via 23.23.23.1, 00:00:10, Serial0/0
(已经从R4上学到了路由信息了)
C 34.34.34.0 is directly connected, Serial0/1
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 23.23.23.1, 00:02:18, Serial0/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/65] via 34.34.34.2, 00:00:08, Serial0/1
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
10.0.0.0/32 is subnetted, 4 subnets
O 10.1.3.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.2.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.1.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
O 10.1.0.4 [110/65] via 34.34.34.2, 00:00:10, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/128] via 23.23.23.1, 00:00:10, Serial0/0
(已经从R4上学到了路由信息了)
R3#
00:33:38: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:38: OSPF: End of hello processing
R3#
00:33:40: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:40: OSPF: End of hello processing
R3#
00:33:48: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:48: OSPF: End of hello processing
R3#
00:33:38: OSPF: End of hello processing
R3#
00:33:40: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial0/0 23.23.23.1
00:33:40: OSPF: End of hello processing
R3#
00:33:48: OSPF: Rcv hello from 4.4.4.4 area 2 from Serial0/1 34.34.34.2
00:33:48: OSPF: End of hello processing
R3#
转载于:https://blog.51cto.com/qq163/63633