R1(config)#router ospf 10
R1(config-router)#net 192.168.12.0 0.0.0.255 a 0
R1(config-router)#
*Dec 6 05:51:32.975: OSPF: Interface Ethernet0/0 going Up
*Dec 6 05:51:32.975: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
*Dec 6 05:51:33.475: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000001, process 10
R1(config-router)#
*Dec 6 05:51:42.807: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-router)#
*Dec 6 05:51:52.179: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-router)#
*Dec 6 05:52:01.335: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-router)#
*Dec 6 05:52:10.907: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-router)#
*Dec 6 05:52:12.975: OSPF: end of Wait on interface Ethernet0/0
*Dec 6 05:52:12.975: OSPF: DR/BDR election on Ethernet0/0
*Dec 6 05:52:12.975: OSPF: Elect BDR 1.1.1.1
*Dec 6 05:52:12.975: OSPF: Elect DR 1.1.1.1
*Dec 6 05:52:12.975: OSPF: Elect BDR 0.0.0.0
*Dec 6 05:52:12.975: OSPF: Elect DR 1.1.1.1
*Dec 6 05:52:12.975: DR: 1.1.1.1 (Id) BDR: none
*Dec 6 05:52:13.475: OSPF: No full nbrs to build NetLSA for interface Ethernet0/0
R1(config-router)#
对端R2还没开启OSPF呢,此时会发现R1的e0/0会等一段时间,然后大概有40S的样子,探测不到邻居便自己选举DR了。"end of Wait on interface Ethernet0/0"
当把R1的0/0关掉后会出现下列信息:"Remember old DR 1.1.1.1 (id)"
R1(config)#int e 0/0
R1(config-if)#
*Dec 6 06:10:24.575: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#shut
R1(config-if)#
*Dec 6 06:10:27.903: OSPF: Ethernet0/0: Route adjust notification: DOWN/DOWN
*Dec 6 06:10:27.903: OSPF: Interface Ethernet0/0 going Down
*Dec 6 06:10:27.903: OSPF: 1.1.1.1 address 192.168.12.1 on Ethernet0/0 is dead, state DOWN
*Dec 6 06:10:27.903: OSPF: Neighbor change Event on interface Ethernet0/0
*Dec 6 06:10:27.903: OSPF: DR/BDR election on Ethernet0/0
*Dec 6 06:10:27.903: OSPF: Elect BDR 0.0.0.0
*Dec 6 06:10:27.903: OSPF: Elect DR 0.0.0.0
*Dec 6 06:10:27.903: OSPF: Elect BDR 0.0.0.0
*Dec 6 06:10:27.903: OSPF: Elect DR 0.0.0.0
*Dec 6 06:10:27.903: DR: none BDR: none
*Dec 6 06:10:27.903: OSPF: Flush network LSA immediately
R1(config-if)#exit
R1(config)#
*Dec 6 06:10:27.903: OSPF: Remember old DR 1.1.1.1 (id)
*Dec 6 06:10:27.903: OSPF: Ethernet0/0: Interface state change to DOWN, new ospf state DOWN
*Dec 6 06:10:28.403: OSPF: We are not DR to build Net LSA for interface Ethernet0/0
*Dec 6 06:10:28.403: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000002, process 10
R1(config)#exit
R1#
R1#
*Dec 6 06:10:29.903: %LINK-5-CHANGED: Interface Ethernet0/0, changed state to administratively down
*Dec 6 06:10:30.119: %SYS-5-CONFIG_I: Configured from console by console
*Dec 6 06:10:30.907: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down
R1#
从上述log中会发现,R1记了一个old DR,这个DR只有在对应的ospf端口开启后如果没有更合适的DR时候才会启用,就想重复第一步实验的时候,因为没有邻居,所以就会直接启用记录的DR,而当有邻居后就会从新协商新的DR和BDR,如下所示:
R1(config-if)#
*Dec 6 06:11:51.175: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Dec 6 06:11:52.175: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
*Dec 6 06:11:52.175: OSPF: Ethernet0/0: Route adjust notification: UP/UP
*Dec 6 06:11:52.175: OSPF: Interface Ethernet0/0 going Up
*Dec 6 06:11:52.175: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
*Dec 6 06:11:52.175: OSPF: Ethernet0/0: Interface state change to UP, new ospf state WAIT
R1(config-if)#
*Dec 6 06:11:52.675: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000003, process 10
R1(config-if)#
*Dec 6 06:12:01.787: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#
*Dec 6 06:12:07.299: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:07.299: OSPF: Send immediate hello to nbr 2.2.2.2, src address 192.168.12.2, on Ethernet0/0
*Dec 6 06:12:07.299: OSPF: Send hello to 192.168.12.2 area 0 on Ethernet0/0 from 192.168.12.1
*Dec 6 06:12:07.299: OSPF: End of hello processing
R1(config-if)#
*Dec 6 06:12:11.263: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
*Dec 6 06:12:11.263: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:11.263: OSPF: 2 Way Communication to 2.2.2.2 on Ethernet0/0, state 2WAY
*Dec 6 06:12:11.263: OSPF: End of hello processing
R1(config-if)#
*Dec 6 06:12:17.139: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:17.139: OSPF: End of hello processing
R1(config-if)#
*Dec 6 06:12:20.587: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#
*Dec 6 06:12:26.871: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:26.871: OSPF: End of hello processing
R1(config-if)#
*Dec 6 06:12:30.579: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#
*Dec 6 06:12:32.175: OSPF: end of Wait on interface Ethernet0/0
*Dec 6 06:12:32.175: OSPF: DR/BDR election on Ethernet0/0
*Dec 6 06:12:32.175: OSPF: Elect BDR 2.2.2.2
*Dec 6 06:12:32.175: OSPF: Elect DR 2.2.2.2
*Dec 6 06:12:32.175: DR: 2.2.2.2 (Id) BDR: 2.2.2.2 (Id)
*Dec 6 06:12:32.175: OSPF: Ethernet0/0 Nbr 2.2.2.2: Prepare dbase exchange
*Dec 6 06:12:32.175: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x24BF opt 0x52 flag 0x7 len 32
R1(config-if)#
*Dec 6 06:12:36.339: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:36.339: OSPF: End of hello processing
*Dec 6 06:12:36.983: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x24BF opt 0x52 flag 0x7 len 32
*Dec 6 06:12:36.983: OSPF: Retransmitting DBD to 2.2.2.2 on Ethernet0/0 [1]
R1(config-if)#
*Dec 6 06:12:39.727: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#
*Dec 6 06:12:41.559: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x24BF opt 0x52 flag 0x7 len 32
*Dec 6 06:12:41.559: OSPF: Retransmitting DBD to 2.2.2.2 on Ethernet0/0 [2]
R1(config-if)#
*Dec 6 06:12:45.919: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:45.919: OSPF: End of hello processing
*Dec 6 06:12:46.419: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x24BF opt 0x52 flag 0x7 len 32
*Dec 6 06:12:46.419: OSPF: Retransmitting DBD to 2.2.2.2 on Ethernet0/0 [3]
*Dec 6 06:12:47.303: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x22F9 opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART
*Dec 6 06:12:47.303: OSPF: NBR Negotiation Done. We are the SLAVE
*Dec 6 06:12:47.303: OSPF: Ethernet0/0 Nbr 2.2.2.2: Summary list built, size 1
*Dec 6 06:12:47.303: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x22F9 opt 0x52 flag 0x2 len 52
*Dec 6 06:12:47.311: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x22FA opt 0x52 flag 0x1 len 52 mtu 1500 state EXCHANGE
*Dec 6 06:12:47.311: OSPF: Exchange Done with 2.2.2.2 on Ethernet0/0
*Dec 6 06:12:47.311: OSPF: Send LS REQ to 2.2.2.2 length 12 LSA count 1
*Dec 6 06:12:47.311: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x22FA opt 0x52 flag 0x0 len 32
*Dec 6 06:12:47.319: OSPF: Rcv LS UPD from 2.2.2.2 on Ethernet0/0 length 64 LSA count 1
*Dec 6 06:12:47.319: OSPF: Synchronized with 2.2.2.2 on Ethernet0/0, state FULL
*Dec 6 06:12:47.319: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
R1(config-if)#
*Dec 6 06:12:47.319: OSPF: Rcv LS REQ from 2.2.2.2 on Ethernet0/0 length 36 LSA count 1
*Dec 6 06:12:47.819: OSPF: Build router LSA for area 0, router ID 1.1.1.1, seq 0x80000004, process 10
R1(config-if)#
*Dec 6 06:12:49.183: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1(config-if)#^Z
R1#un
*Dec 6 06:12:54.275: %SYS-5-CONFIG_I: Configured from console by console
R1#undbug
*Dec 6 06:12:55.599: OSPF: Rcv hello from 2.2.2.2 area 0 from Ethernet0/0 192.168.12.2
*Dec 6 06:12:55.599: OSPF: Neighbor change Event on interface Ethernet0/0
*Dec 6 06:12:55.599: OSPF: DR/BDR election on Ethernet0/0
*Dec 6 06:12:55.599: OSPF: Elect BDR 1.1.1.1
*Dec 6 06:12:55.599: OSPF: Elect DR 2.2.2.2
*Dec 6 06:12:55.599: OSPF: Elect BDR 1.1.1.1
*Dec 6 06:12:55.599: OSPF: Elect DR 2.2.2.2
*Dec 6 06:12:55.599: DR: 2.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Dec 6 06:12:55.599: OSPF: Neighbor change Event on interface Ethernet0/0
*Dec 6 06:12:55.599: OSPF: DR/BDR election on Ethernet0/0
*Dec 6 06:12:55.599: OSPF: Elect BDR 1.1.1.1
R1#undb
*Dec 6 06:12:55.599: OSPF: Elect DR 2.2.2.2
*Dec 6 06:12:55.599: DR: 2.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Dec 6 06:12:55.599: OSPF: End of hello processing
R1#undb
R1#un
*Dec 6 06:12:58.607: OSPF: Send hello to 224.0.0.5 area 0 on Ethernet0/0 from 192.168.12.1
R1#unde
R1#undebug all
OSPF选举过程的小发现
原创
©著作权归作者所有:来自51CTO博客作者醉卧流云KF的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
ospf 入门
hhh
OSPF 数据库 IP -
OSPF单区域实验
华为HCIP-Datacom实验系列-OSPF单区域
OSPF Ethernet IP -
OSPF多区域实验
华为HCIP-Datacom实验系列之OSPF多区域实验
OSPF Ethernet IP -
[BSCI]配置OSPF DR选举过程
[BSCI]配置OSPF DR选举过程 2009-07-23 23:10:20 标签:OSPF BSCI 选举 [
OSPF 路由交换 DR BSCI 选举过程