Example 856 Forcing r1 to Become the DR

r2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

1.1.1.1 1 FULL/BDR 00:01:45 192.168.8.1 Serial0.101

r2#configure terminal r2(config)#router ospf 1

r2 (config-router)#neighbor 192 . 168.8.1

r2 (config-router)#interface s0.101

r2(config-subif)#ip ospf priority 0

r2(config-subif)#end r4#configure terminal r4(config)#router ospf 1 r4(config-router)#neighbor 192.168.8.1

r4 (config-router)#interface s0/0.101 r4(config-subif)#ip ospf priority 0 r4(config-subif)#end r4#debug ip ospf adj

OSPF adjacency events debugging is on

Dec 13 23:37:18.150: OSPF: Rcv hello from 1.1.1.1 area 8 from Serial0/0.101 192 . 168.8.1

Dec 13 23:37:18.150: OSPF: Neighbor change Event on interface Serial0/0.101

Dec 13 23:37:18.154: OSPF: DR/BDR election on Serial0/0.101

Dec 13 23:37:18.154: OSPF: Elect BDR 1.1.1.1

Dec 13 23:37:18.154: OSPF: Elect DR 1.1.1.1

Dec 13 23:37:18.154: DR: 1.1.1.1 (Id) BDR: 1.1.1.1 (Id)

Dec 13 23:37:18.154: OSPF: Send DBD to 1.1.1.1 on Serial0/0.101 seq 0xFDD opt 0x2

flag 0x7 len 32

Dec 13 23:37:18.154: OSPF: End of hello processing

Dec 13 23:37:18.190: OSPF: Rcv DBD from 1.1.1.1 on Serial0/0.101 seq 0xDB6 opt 0x2

flag 0x7 len 32 state EXSTART

Dec 13 23:37:18.190: OSPF: First DBD and we are not SLAVE

Dec 13 23:37:18.654: OSPF: Build router LSA for area 8, router ID 4.4.4.4

Dec 13 23:37:23.154: OSPF: Retransmitting DBD to 1.1.1.1 on Serial0/0.101

Dec 13 23:37:23.154: OSPF: Send DBD to 1.1.1.1 on Serial0/0.101 seq 0xFDD opt 0x2 flag 0x7 len 32

Dec 13 23:37:23.190: OSPF: Rcv DBD from 1.1.1.1 on Serial0/0.101 seq 0xDB6 opt 0x2

flag 0x7 len 32 state EXSTART

Dec 13 23:37:23.190: OSPF: First DBD and we are not SLAVE

Dec 13 23:37:23.222: OSPF: Rcv DBD from 1.1.1.1 on Serial0/0.101 seq 0xFDD opt 0x2

flag 0x2 len 132 state EXSTART

Dec 13 23:37:23.222: OSPF: NBR Negotiation Done. We are the MASTER

Dec 13 23:37:23.222: OSPF: Send DBD to 1.1.1.1 on Serial0/0.101 seq 0xFDE opt 0x2 flag 0x3 len 132

Dec 13 23:37:23.286: OSPF: Rcv DBD from 1.1.1.1 on Serial0/0.101 seq 0xFDE opt 0x2

flag 0x0 len 32 state EXCHANGE Dec 13 23:37:23.286: OSPF: Send DBD to 1.1.1.1 on Serial0/0.101 seq 0xFDF opt 0x2 flag 0x1 len 32

Dec 13 23:37:23.322: OSPF: Rcv DBD from 1.1.1.1 on Serial0/0.101 seq 0xFDF opt 0x2

flag 0x0 len 32 state EXCHANGE Dec 13 23:37:23.326: OSPF: Exchange Done with 1.1.1.1 on Serial0/0.101 Dec 13 23:37:23.326: OSPF: Synchronized with 1.1.1.1 on Serial0/0.101, state FULL Dec 13 23:37:23.654: OSPF: Build router LSA for area 8, router ID 4.4.4.4 Dec 13 23:37:28.654: OSPF: Build router LSA for area 8, router ID 4.4.4.4 r4#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

1.1.1.1 1 FULL/DR 00:01:46 192.168.8.1 Serial0/0.101 Dec 13 23:37:48.270: OSPF: Rcv hello from 1.1.1.1 area 8 from Serial0/0.101

Dec 13 23:37:48.270: OSPF: Neighbor change Event on interface Serial0/0.101

Dec 13 23:37:48.270: OSPF: DR/BDR election on Serial0/0.101

Dec 13 23:37:48.274: DR: 1.1.1.1 (Id) BDR: none

Dec 13 23:37:48.274: OSPF: End of hello processing

Dec 13 23:37:48.774: OSPF: Build router LSA for area 8, router ID 4.4.4.4

r4#undebug all r1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

4.4.4.4 0 FULL/DROTHER 00:01:46 192.168.8.4 Serial0.100

2.2.2.2 0 FULL/DROTHER 00:01:38 192.168.8.2 Serial0.100

Obsorve the nreced ing output of show ip ospf neighbor on each oh the routers to note that both r2 and r4 are in a full state with the DR (r1). Likewise, from rl's perspective it is in a full state with the DRothers. The clear ip ospf process command was not necessary here because changing the priority to 0 forced the election to occur. Had you set rl with a higher priority, clearing the OSPF process or bouncing the interface would have been an effective way to trigger the election. However, on r4 the version of code doesn't support the clear ip ospf command anyway. The debug ip ospf adj command enabled you to watch the stages of the election process.

I find it more helpful for troubleshooting to manually configure the router ID (RID). In the preceding example, the loopbacks should take precedence unless OSPF was configured before you created them. The p roblem with making changes to the RID is that it normally doesn't take effect until yoL reload the router (or restart the OSPF process). I can get away with that in a test environment, but that is not always a choice in a practical environment. Example 8-57 illustrates how to ha I'd code the RIDs.

Continue reading here: Exa mple 919 Testing the HDLC Scenario

Was this article helpful?

0 0