Examining the DR/BDR Election Process


Routers Used: 3640 w/ NM-1FE-TX

IOS: c3640-jk9s-mz.124-16a

Objective:
  • In this lab, observe the OSPF DR and BDR election processing using debug commands. Then assign each OSPF interface a priority value to force the election of a specific router as a DR.
Scenario
  • The backbone of International Travel Agency’s enterprise network consists of three routers connected using an Ethernet core. Asterix1 has more memory and processing power than the other core routers. Unfortunately, other core routers are continually elected as the DR under the default settings. In the interest of optimization, ensure that Asterix1 is elected the DR, because it is best suited to handle associated extra duties, including management of Link State Advertisements (LSA) for Area 0. Investigate and correct this situation.
Step 1
  • Build and configure the network according to the diagram. Use the configuration files from the previous lab if available. Configure OSPF on all Ethernet interfaces. A switch or hub is required to connect the three routers through Ethernet. Be sure to configure each router with the loopback interface and IP address shown in the diagram.
  • Use ping to verify the work and test connectivity between the Ethernet interfaces.
Step 2
  • Use the show ip ospf neighbor detail command as follows to verify that the OSPF routers have formed adjacencies:
    Note: The routers are still using authentication for the previous lab setup.
    Asterix3#sh ip ospf neighbor detail
    Neighbor 192.168.31.11, interface address 192.168.1.1
    In the area 0 via interface FastEthernet0/0
    Neighbor priority is 1, State is FULL, 6 state changes
    DR is 192.168.1.3 BDR is 192.168.1.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:16
    Neighbor is up for 00:00:43
    Index 1/1, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
    Neighbor 192.168.31.22, interface address 192.168.1.2
    In the area 0 via interface FastEthernet0/0
    Neighbor priority is 1, State is FULL, 6 state changes
    DR is 192.168.1.3 BDR is 192.168.1.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:15
    Neighbor is up for 00:00:44
    Index 2/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
  • Recall that router IDs determine the DR and BDR.
Step 3
  • If the network is configured according to the diagram, Asterix1 will not be the DR. Temporarily shutdown Asterix3, which has the highest router ID, 192.168.31.33, and observe the DR/BDR election process. To observe the election, issue the following debug command on Asterix1:
    Asterix1#debug ip ospf adj
  • Now that OSPF adjacency events will be logged to Asterix1 console, remove Asterix3 from the OSPF network by shutting down its FastEthernet interface as follows:
    Asterix3(config)#interface fastethernet 0/0
    Asterix3(config-if)#shutdown

    Asterix1#
    *Mar 1 00:18:09.787: OSPF: 192.168.31.33 address 192.168.1.3 on FastEthernet0/0
    is dead
    *Mar 1 00:18:09.787: OSPF: 192.168.31.33 address 192.168.1.3 on FastEthernet0/0
    is dead, state DOWN
    *Mar 1 00:18:09.791: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthern
    et0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
    *Mar 1 00:18:09.795: OSPF: Neighbor change Event on interface FastEthernet0/0
    *Mar 1 00:18:09.799: OSPF: DR/BDR election on FastEthernet0/0
    *Mar 1 00:18:09.799: OSPF: Elect BDR 192.168.31.22
    *Mar 1 00:18:09.803: OSPF: Elect DR 192.168.31.22
    *Mar 1 00:18:09.803: DR: 192.168.31.22 (Id) BDR: 192.168.31.22 (Id)
    *Mar 1 00:18:09.807: OSPF: Remember old DR 192.168.31.33 (id)
    *Mar 1 00:18:09.867: OSPF: Neighbor change Event on interface FastEthernet0/0
    *Mar 1 00:18:09.871: OSPF: DR/BDR election on FastEthernet0/0
    *Mar 1 00:18:09.871: OSPF: Elect BDR 192.168.31.11
    *Mar 1 00:18:09.875: OSPF: Elect DR 192.168.31.22
    Asterix1#
    *Mar 1 00:18:09.875: OSPF: Elect BDR 192.168.31.11
    *Mar 1 00:18:09.879: OSPF: Elect DR 192.168.31.22
    *Mar 1 00:18:09.879: DR: 192.168.31.22 (Id) BDR: 192.168.31.11 (Id)
  • The former BDR is promoted to DR.
  • In the debug output, look for a statement about remembering the “old DR”. Unless Asterix1 and Asterix2 are powered off, they will remember that Asterix3 was the old DR. When Asterix3 comes back online, these routers will allow Aserix3 to reassume its role as DR.
Step 4
  • At this point, Asterix1 should have assumed the role of BDR. Bring Asterix3 back online, and observe the new election process.
  • Asterix1 remains the BDR even though Asterix2 has the higher router ID.
Step 5
  • A router can be manipulated to become the DR by using two methods. The router ID could be changed to a higher number, but that could confuse the loopback addressing system and affect elections on other interfaces. The same router ID is used for every network that a router is a member of. For example, if an OSPF router has an exceptionally high router ID, it could win the election on every multiaccess interface and, as a result, do triple or quadruple duty as a DR.
  • Instead of reconfiguring router IDs, manipulate the election by configuring OSPF priority values. Because priorities are an interface-specific value, they provide finer control of the OSPF internetwork by allowing a router to be the DR in one network and a DRother in another. Priority values are the first consideration in the DR election, with the highest priority winning. Values can range from 0 to 255. A value of 0 indicates that the interface will not participate in an election. Use the show ip ospf interface command as follows to examine the current priority values of the Ethernet interfaces on the three routers:
    Asterix1#sh ip ospf interface
    FastEthernet0/0 is up, line protocol is up
    Internet Address 192.168.1.1/24, Area 0
    Process ID 1, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State BDR, Priority 1
    Designated Router (ID) 192.168.31.22, Interface address 192.168.1.2
    Backup Designated router (ID) 192.168.31.11, Interface address 192.168.1.1
    Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
    Supports Link-local Signaling (LLS)
    Index 1/1, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 1
    Last flood scan time is 4 msec, maximum is 4 msec
    Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.22 (Designated Router)
    Adjacent with neighbor 192.168.31.33
    Suppress hello for 0 neighbor(s)
    Message digest authentication enabled
    Youngest key id is 1
  • The default priority is one (1). Because all have equal priority, router ID is used to determine the DR and BDR.
  • Modify the priority values so that Asterix1 will become the DR and Asterix2 will become the BDR, regardless of their router ID. Use the following commands:
    Asterix1(config)#interface fastethernet 0/0
    Asterix1(config-if)#ip ospf priority 200

    Asterix2(config)#interface fastethernet 0/0
    Asterix2(config-if)#ip ospf priority 100
  • In order to reset the election process, write the configuration for each router to NVRAM and reload Asterix1, Asterix2, and Asterix3. Issue the following command at each router:
    Asterix1#copy running-config startup-config
  • To reload all routers use stop and start buttons in GNS3 or use the following command in GNS3 Console:
    => reload /all
  • When the routers finish reloading, try to observe the OSPF election on Asterix1 by using the debug ip ospf adj command. Also, verify the configuration by issuing the show ip ospf interface command at both Asterix1 and Asterix2.
    Asterix1#debug ip ospf adj
    OSPF adjacency events debugging is on
    Asterix1#
    *Mar 1 00:00:42.027: OSPF: Neighbor change Event on interface FastEthernet0/0
    *Mar 1 00:00:42.031: OSPF: DR/BDR election on FastEthernet0/0
    *Mar 1 00:00:42.031: OSPF: Elect BDR 192.168.31.22
    *Mar 1 00:00:42.035: OSPF: Elect DR 192.168.31.11
    *Mar 1 00:00:42.035: DR: 192.168.31.11 (Id) BDR: 192.168.31.22 (Id)

    Asterix2#sh ip ospf interface
    FastEthernet0/0 is up, line protocol is up
    Internet Address 192.168.1.2/24, Area 0
    Process ID 1, Router ID 192.168.31.22, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State BDR, Priority 100
    Designated Router (ID) 192.168.31.11, Interface address 192.168.1.1
    Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2
    Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
    Supports Link-local Signaling (LLS)
    Index 1/1, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 0, maximum is 1
    Last flood scan time is 0 msec, maximum is 4 msec
    Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.11 (Designated Router)
    Adjacent with neighbor 192.168.31.33
    Suppress hello for 0 neighbor(s)
    Message digest authentication enabled
    Youngest key id is 1
  • After the election is complete, verify that Asterix1 and Asterix2 have assumed the correct roles by using the show ip ospf neighbor detail command. Troubleshoot, if necessary.
    Asterix3#show ip ospf neighbor detail
    Neighbor 192.168.31.11, interface address 192.168.1.1
    In the area 0 via interface FastEthernet0/0
    Neighbor priority is 200, State is FULL, 6 state changes
    DR is 192.168.1.1 BDR is 192.168.1.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:17
    Neighbor is up for 00:04:07
    Index 1/1, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec
    Neighbor 192.168.31.22, interface address 192.168.1.2
    In the area 0 via interface FastEthernet0/0
    Neighbor priority is 100, State is FULL, 6 state changes
    DR is 192.168.1.1 BDR is 192.168.1.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:17
    Neighbor is up for 00:04:07
    Index 2/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
  • Note that the order in which routers join an area can have the most significant effect on which routers are elected as DR and BDR. An election is necessary only when a DR or BDR does not exist in the network. As a router starts its OSPF process, it checks the network for an active DR and BDR. If they exist, the new router becomes a DRother, regardless of its priority or router ID. Remember, the roles of DR and BDR were created for efficiency. New routers in the network should not force an election when adjacencies are already optimized. However, there is an exception. A known bug in some IOS versions allows a ’new’ router with higher election credentials to force an election and assume the role of DR.
Download

Popular posts from this blog

Cisco binary image unpacker

How to find Cisco IOS with Google