本帖最后由 jkrh9 于 2011-6-29 19:32 编辑
两台路由直连,一个接口:192.168.1.1,另一个接口:192.168.1.2
问题:两个路由互相发HELLO包,包中的DR和BDR域都是0.0.0.0,如图:
在互相发了几个这样的hello包(DR及BDR域都是0.0.0.0)后,根据调试发现,就已经选举出DR及BDR了。
问题是:在DR、BDR选举流程中,第一个步骤是:2 way时,所有路由器都宣告自己为DR/BDR。但是我在做实验时,都没看到有数据包里面将自己宣告为DR、BDR,仅仅是在如上图的几个hello之后就已经选举出DR、BDR了。为什么呢?请高人指点。
以下是两个路由器的调试过程:
路由1的:
Router>enable
Router#debug ip ospf adj
OSPF adjacency events debugging is on
Router#
00:00:50: OSPF: end of Wait on interface FastEthernet0/0
00:00:50: OSPF: DR/BDR election on FastEthernet0/0
00:00:50: OSPF: Elect BDR 192.168.1.2
00:00:50: OSPF: Elect DR 192.168.1.2
00:00:50: OSPF: Elect BDR 192.168.1.1
00:00:50: OSPF: Elect DR 192.168.1.2
00:00:50: DR: 192.168.1.2 (Id) BDR: 192.168.1.1 (Id)
00:00:50: OSPF: Send DBD to 192.168.1.1 on FastEthernet0/0 seq 0x2feb opt 0x00 flag 0x7 len 32
00:00:50: OSPF: Build router LSA for area 0, router ID 192.168.1.2, seq 0x80000002
00:00:50: OSPF: No full nbrs to build Net Lsa for interface FastEthernet0/0
00:00:50: OSPF: Rcv DBD from 192.168.1.1 on FastEthernet0/0 seq 0x7c8d opt 0x00 flag 0x7 len 32 mtu 1500 state EXSTART
00:00:50: OSPF: First DBD and we are not SLAVE
00:00:50: OSPF: DR/BDR election on FastEthernet0/0
00:00:50: OSPF: Elect BDR 192.168.1.1
00:00:50: OSPF: Elect DR 192.168.1.2
00:00:50: DR: 192.168.1.2 (Id) BDR: 192.168.1.1 (Id)
00:00:55: OSPF: Send DBD to 192.168.1.1 on FastEthernet0/0 seq 0x2feb opt 0x00 flag 0x7 len 32
00:00:55: OSPF: Rcv DBD from 192.168.1.1 on FastEthernet0/0 seq 0x2feb opt 0x00 flag 0x2 len 52 mtu 1500 state EXSTART
00:00:55: OSPF: NBR Negotiation Done. We are the MASTER
00:00:55: OSPF: Send DBD to 192.168.1.1 on FastEthernet0/0 seq 0x2fec opt 0x00 flag 0x3 len 52
00:00:55: OSPF: Rcv DBD from 192.168.1.1 on FastEthernet0/0 seq 0x2fec opt 0x00 flag 0x0 len 32 mtu 1500 state EXCHANGE
00:00:55: OSPF: Send DBD to 192.168.1.1 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x1 len 32
00:00:55: OSPF: Rcv DBD from 192.168.1.1 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x0 len 32 mtu 1500 state EXCHANGE
00:00:55: Exchange Done with 192.168.1.1 on FastEthernet0/0
00:00:55: OSPF: Database request to 192.168.1.1
00:00:55: OSPF: sent LS REQ packet to 192.168.1.1, length 12
00:00:55: OSPF: Rcv DBD from 192.168.1.1 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x0 len 32 mtu 1500 state LOADING
00:00:55: Synchronized with with 192.168.1.1 on FastEthernet0/0, state FULL
00:00:55: %OSPF-5-ADJCHG: Process 101, Nbr 192.168.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
00:00:55: OSPF: Build router LSA for area 0, router ID 192.168.1.2, seq 0x80000002
00:00:55: OSPF: Build net LSA for area 0, router ID 192.168.1.2, seq 0x80000001
00:01:00: OSPF: DR/BDR election on FastEthernet0/0
00:01:00: OSPF: Elect BDR 192.168.1.1
00:01:00: OSPF: Elect DR 192.168.1.2
00:01:00: DR: 192.168.1.2 (Id) BDR: 192.168.1.1 (Id)
路由2的:
Router>enable
Router#debug ip ospf adj
OSPF adjacency events debugging is on
Router#
00:00:51: OSPF: end of Wait on interface FastEthernet0/0
00:00:51: OSPF: DR/BDR election on FastEthernet0/0
00:00:51: OSPF: Elect BDR 192.168.1.2
00:00:51: OSPF: Elect DR 192.168.1.2
00:00:51: DR: 192.168.1.2 (Id) BDR: 192.168.1.2 (Id)
00:00:51: OSPF: Send DBD to 192.168.1.2 on FastEthernet0/0 seq 0x7c8d opt 0x00 flag 0x7 len 32
00:00:51: OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000002
00:00:51: OSPF: DR/BDR election on FastEthernet0/0
00:00:51: OSPF: Elect BDR 192.168.1.1
00:00:51: OSPF: Elect DR 192.168.1.2
00:00:51: OSPF: Elect BDR 192.168.1.1
00:00:51: OSPF: Elect DR 192.168.1.2
00:00:51: DR: 192.168.1.2 (Id) BDR: 192.168.1.1 (Id)
00:00:51: OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000002
00:00:56: OSPF: Rcv DBD from 192.168.1.2 on FastEthernet0/0 seq 0x2feb opt 0x00 flag 0x7 len 32 mtu 1500 state EXSTART
00:00:56: OSPF: NBR Negotiation Done. We are the SLAVE
00:00:56: OSPF: Send DBD to 192.168.1.2 on FastEthernet0/0 seq 0x2feb opt 0x00 flag 0x2 len 52
00:00:56: OSPF: Rcv DBD from 192.168.1.2 on FastEthernet0/0 seq 0x2fec opt 0x00 flag 0x3 len 52 mtu 1500 state EXCHANGE
00:00:56: OSPF: Send DBD to 192.168.1.2 on FastEthernet0/0 seq 0x2fec opt 0x00 flag 0x0 len 32
00:00:56: OSPF: Rcv DBD from 192.168.1.2 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x1 len 32 mtu 1500 state EXCHANGE
00:00:56: OSPF: Send DBD to 192.168.1.2 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x0 len 32
00:00:56: Exchange Done with 192.168.1.2 on FastEthernet0/0
00:00:56: OSPF: Database request to 192.168.1.2
00:00:56: OSPF: sent LS REQ packet to 192.168.1.2, length 12
00:00:56: OSPF: Send DBD to 192.168.1.2 on FastEthernet0/0 seq 0x2fed opt 0x00 flag 0x0 len 32
00:00:56: Synchronized with with 192.168.1.2 on FastEthernet0/0, state FULL
00:00:56: %OSPF-5-ADJCHG: Process 101, Nbr 192.168.1.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
00:00:56: OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000002
该贴已经同步到 jkrh9的微博
|