Chapter 10: OSPF Tuning and Troubleshooting - cisco academy

Breaking

Thursday, April 4, 2019

Chapter 10: OSPF Tuning and Troubleshooting

Class Activity - DR and BDR Election

DR and BDR Elections
You are trying to decide how to influence the selection of the designated router and backup designated router for your OSPF network. This activity simulates that process.
Three separate designated-router election scenarios will be presented. The focus is on electing a DR and BDR for your group. Refer to the PDF for this activity for the remaining instructions.
If additional time is available, two groups can be combined to simulate DR and BDR elections.
Class Activity - DR and BDR Elections

OSPF Network Types

To configure OSPF adjustments, start with a basic implementation of the OSPF routing protocol.
OSPF defines five network types, as shown in Figures 1 to 5:
  • Point-to-point - Two routers interconnected over a common link. No other routers are on the link. This is often the configuration in WAN links. (Figure 1)
  • Broadcast multiaccess - Multiple routers interconnected over an Ethernet network. (Figure 2)
  • Nonbroadcast multiaccess (NBMA) - Multiple routers interconnected in a network that does not allow broadcasts, such as Frame Relay. (Figure 3)
  • Point-to-multipoint - Multiple routers interconnected in a hub-and-spoke topology over an NBMA network. Often used to connect branch sites (spokes) to a central site (hub). (Figure 4)
  • Virtual links - Special OSPF network used to interconnect distant OSPF areas to the backbone area. (Figure 5)
A multiaccess network is a network with multiple devices on the same shared media, which are sharing communications. Ethernet LANs are the most common example of broadcast multiaccess networks. In broadcast networks, all devices on the network see all broadcast and multicast frames. They are multiaccess networks because there may be numerous hosts, printers, routers, and other devices that are all members of the same network.

Challenges in Multiaccess Networks

Multiaccess networks can create two challenges for OSPF regarding the flooding of LSAs:
  • Creation of multiple adjacencies - Ethernet networks could potentially interconnect many OSPF routers over a common link. Creating adjacencies with every router is unnecessary and undesirable. This would lead to an excessive number of LSAs exchanged between routers on the same network.
  • Extensive flooding of LSAs - Link-state routers flood their link-state packets when OSPF is initialized, or when there is a change in the topology. This flooding can become excessive.
The following formula can be used to calculate the number of required adjacencies. The number of adjacencies required for any number of routers (designated as n) on a multiaccess network is:
n (n – 1) / 2
Figure 1 shows a simple topology of four routers, all of which are attached to the same multiaccess Ethernet network. Without some type of mechanism to reduce the number of adjacencies, collectively these routers would form six adjacencies: 4 (4 - 1) / 2 = 6, as shown in Figure 2. Figure 3 shows that as routers are added to the network, the number of adjacencies increases dramatically.

OSPF Designated Router

The solution to managing the number of adjacencies and the flooding of LSAs on a multiaccess network is the DR. On multiaccess networks, OSPF elects a DR to be the collection and distribution point for LSAs sent and received. A BDR is also elected in case the DR fails. The BDR listens passively to this exchange and maintains a relationship with all the routers. If the DR stops producing Hello packets, the BDR promotes itself and assumes the role of DR.
All other non-DR or BDR routers become DROTHER (a router that is neither the DR nor the BDR).
In Figure 1, R1 has been elected as the designated router for the Ethernet LAN interconnecting R2, R3, and R4. Notice how the number of adjacencies has been reduced to 3.
Routers on a multiaccess network elect a DR and BDR. DROTHERs only form full adjacencies with the DR and BDR in the network. Instead of flooding LSAs to all routers in the network, DROTHERs only send their LSAs to the DR and BDR using the multicast address 224.0.0.6 (all DR routers).
Note: The DR is used only for the distribution of LSAs. Packets are routed according the each of the routers’ individual routing tables.
Click the Play button in Figure 2 to see the animation of the role of DR. In the animation, R1 sends LSAs to the DR. The BDR also listens. The DR is responsible for forwarding the LSAs from R1 to all other routers. The DR uses the multicast address 224.0.0.5 (all OSPF routers). The end result is that there is only one router doing all of the flooding of all LSAs in the multiaccess network.
Note: DR/BDR elections only occur in multiaccess networks and do not occur in point-to-point networks.

Verifying DR/BDR Roles

In the multiaccess topology shown in Figure 1, there are three routers interconnected over a common Ethernet multiaccess network, 192.168.1.0/28. Each router is configured with the indicated IPv4 address on the Gigabit Ethernet 0/0 interface.
Because the routers are connected over a common multiaccess broadcast network, OSPF has automatically elected a DR and BDR. In this example, R3 has been elected as the DR because its router ID is 3.3.3.3, which is the highest in this network. R2 is the BDR because it has the second highest router ID in the network.
To verify the roles of the OSPFv2 router, use theshow ip ospf interface command (Figure 2). The output generated by R1 confirms that:
1. R1 is not the DR or BDR, but is a DROTHER with a default priority of 1. (1)
2. The DR is R3 with router ID 3.3.3.3 at IPv4 address 192.168.1.3, while the BDR is R2 with router ID 2.2.2.2 at IPv4 address 192.168.1.2. (2)
3. R1 has two adjacencies: one with the BDR and one with the DR. (3)
The output generated by R2 in Figure 3 confirms that:
1. R2 is the BDR with a default priority of 1. (1)
2. The DR is R3 with router ID 3.3.3.3 at IPv4 address 192.168.1.3, while the BDR is R2 with router ID 2.2.2.2 at IPv4 address 192.168.1.2. (2)
3. R2 has two adjacencies; one with a neighbor with router ID 1.1.1.1 (R1) and the other with the DR. (3)
The output generated by R3 in Figure 4 confirms that:
1. R3 is the DR with a default priority of 1. (1)
2. The DR is R3 with router ID 3.3.3.3 at IPv4 address 192.168.1.3, while the BDR is R2 with router ID 2.2.2.2 at IPv4 address 192.168.1.2. (2)
3. R3 has two adjacencies: one with a neighbor with router ID 1.1.1.1 (R1) and the other with the BDR. (3)
Note: For the equivalent OSPFv3 command, simply substitute ip with ipv6.

Verifying DR/BDR Adjacencies

To verify the OSPFv2 adjacencies, use the show ip ospf neighbor command as shown in Figure 1.
Unlike serial links that only display a state ofFULL/-, the state of neighbors in multiaccess networks can be:
  • FULL/DROTHER- This is a DR or BDR router that is fully adjacent with a non-DR or BDR router. These two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
  • FULL/DR- The router is fully adjacent with the indicated DR neighbor. These two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
  • FULL/BDR- The router is fully adjacent with the indicated BDR neighbor. These two neighbors can exchange Hello packets, updates, queries, replies, and acknowledgments.
  • 2-WAY/DROTHER- The non-DR or BDR router has a neighbor relationship with another non-DR or BDR router. These two neighbors exchange Hello packets.
The normal state for an OSPF router is usually FULL. If a router is stuck in another state, it is an indication that there are problems in forming adjacencies. The only exception to this is the 2-WAY state, which is normal in a multiaccess broadcast network.
In multiaccess networks, DROTHERs only form FULL adjacencies with the DR and BDR. However, DROTHERs will still form a 2-WAY neighbor adjacency with any DROTHERs that join the network. This means that all DROTHER routers in the multiaccess network still receive Hello packets from all other DROTHER routers. In this way, they are aware of all routers in the network. When two DROTHER routers form a neighbor adjacency, the neighbor state displays as 2-WAY/DROTHER.
The output generated by R1 confirms that R1 has adjacencies with router:
1. R2 with router ID 2.2.2.2 is in a Full state and the role of R2 is BDR. (1)
2. R3 with router ID 3.3.3.3 is in a Full state and the role of R3 is DR. (2)
The output generated by R2 in Figure 2 confirms that R2 has adjacencies with router:
1. R1 with router ID 1.1.1.1 is in a Full state and R1 is neither the DR nor BDR. (1)
2. R3 with router ID 3.3.3.3 is in a Full state and the role of R3 is DR. (2)
The output generated by R3 in Figure 3 confirms that R3 has adjacencies with router:
1. R1 with router ID 1.1.1.1 is in a Full state and R1 is neither the DR nor BDR. (1)
2. R2 with router ID 2.2.2.2 is in a Full state and the role of R2 is BDR. (2)

Default DR/BDR Election Process

How do the DR and BDR get elected? The OSPF DR and BDR election decision is based on the following criteria, in sequential order:
1. The routers in the network elect the router with the highest interface priority as the DR. The router with the second highest interface priority is elected as the BDR. The priority can be configured to be any number between 0 – 255. The higher the priority, the likelier the router will be selected as the DR. If the priority is set to 0, the router is not capable of becoming the DR. The default priority of multiaccess broadcast interfaces is 1. Therefore, unless otherwise configured, all routers have an equal priority value and must rely on another tie breaking method during the DR/BDR election.
2. If the interface priorities are equal, then the router with the highest router ID is elected the DR. The router with the second highest router ID is the BDR.
Recall that the router ID is determined in one of three ways:
  • The router ID can be manually configured.
  • If no router IDs are configured, the router ID is determined by the highest loopback IPv4 address.
  • If no loopback interfaces are configured, the router ID is determined by the highest active IPv4 address.
Note: In an IPv6 network, if there are no IPv4 addresses configured on the router, then the router ID must be manually configured with therouter-id ridcommand; otherwise, OSPFv3 does not start.
In the figure, all Ethernet router interfaces have a default priority of 1. As a result, based on the selection criteria listed above, the OSPF router ID is used to elect the DR and BDR. R3 with the highest router ID becomes the DR; and R2, with the second highest router ID, becomes the BDR.
Note: Serial interfaces have default priorities set to 0; therefore, they do not elect DR and BDRs.
The DR and BDR election process takes place as soon as the first router with an OSPF-enabled interface is active on the multiaccess network. This can happen when the preconfigured OSPF routers are powered on, or when OSPF is activated on the interface.. The election process only takes a few seconds. If all of the routers on the multiaccess network have not finished booting, it is possible that a router with a lower router ID becomes the DR. (This can be a lower-end router that takes less time to boot.)

DR/BDR Election Process

OSPF DR and BDR elections are not pre-emptive. If a new router with a higher priority or higher router ID is added to the network after the DR and BDR election, the newly added router does not take over the DR or the BDR role. This is because those roles have already been assigned. The addition of a new router does not initiate a new election process.
After the DR is elected, it remains the DR until one of the following events occurs:
  • The DR fails
  • The OSPF process on the DR fails or is stopped
  • The multiaccess interface on the DR fails or is shutdown
If the DR fails, the BDR is automatically promoted to DR. This is the case even if another DROTHER with a higher priority or router ID is added to the network after the initial DR/BDR election. However, after a BDR is promoted to DR, a new BDR election occurs and the DROTHER with the higher priority or router ID is elected as the new BDR.
Figures 1 to 4 illustrate various scenarios relating to the DR and BDR election process.
In Figure 1, the current DR (R3) fails; therefore, the pre-elected BDR (R2) assumes the role of DR. Subsequently, an election is held to choose a new BDR. Because R1 is the only DROTHER, it is elected as the BDR.
In Figure 2, R3 has re-joined the network after several minutes of being unavailable. Because the DR and BDR already exist, R3 does not take over either role; instead, it becomes a DROTHER.
In Figure 3, a new router (R4) with a higher router ID is added to the network. DR (R2) and BDR (R1) retain the DR and BDR roles. R4 automatically becomes a DROTHER.
In Figure 4, R2 has failed. The BDR (R1) automatically becomes the DR and an election process selects R4 as the BDR because it has the higher router ID.

The OSPF Priority

The DR becomes the focal point for the collection and distribution of LSAs; therefore, this router must have sufficient CPU and memory capacity to handle the workload. It is possible to influence the DR/BDR election process through configurations.
If the interface priorities are equal on all routers, the router with the highest router ID is elected the DR. It is possible to configure the router ID to manipulate the DR/BDR election. However, this process only works if there is a stringent plan for setting the router ID on all routers. In large networks, this can be cumbersome.
Instead of relying on the router ID, it is better to control the election by setting interface priorities. Priorities are an interface-specific value, which means it provides better control on a multiaccess network. This also allows a router to be the DR in one network and a DROTHER in another.
To set the priority of an interface, use the following commands:
  • ip ospf priority value - OSPFv2 interface command
  • ipv6 ospf priority value - OSPFv3 interface command
The value can be:
  • - Does not become a DR or BDR.
  • 1 – 255 - The higher the priority value, the more likely the router becomes the DR or BDR on the interface.
In the figure, all routers have an equal OSPF priority because the priority value defaults to 1 for all router interfaces. Therefore, the router ID is used to determine the DR (R3) and BDR (R2). Changing the priority value on an interface from 1 to a higher value, would enable the router to become a DR or BDR router during the next election.
If the interface priority is configured after OSPF is enabled, the administrator must shut down the OSPF process on all routers, and then re-enable the OSPF process, to force a new DR/BDR election.

Changing the OSPF Priority

In the topology in Figure 1, R3 is the DR and R2 is the BDR. It has been decided that:
  • R1 should be the DR and will be configured with a priority of 255.
  • R2 should be the BDR and will be left with the default priority of 1.
  • R3 should never be a DR or BDR and will be configured with a priority of 0.
Figure 2 changes the R1 interface Gigabit 0/0 priority from 1 to 255.
Figure 3 changes the R3 interface Gigabit 0/0 priority from 1 to 0.
The changes do not automatically take effect because the DR and BDR are already elected. Therefore, the OSPF election must be negotiated using one of the following methods:
  • Shutdown the router interfaces and then re-enable them starting with the DR, then the BDR, and then all other routers.
  • Reset the OSPF process using the clear ip ospf process privileged EXEC mode command on all routers.
Figure 4 displays how to clear the OSPF process on R1. Assume that the clear ip ospf process privileged EXEC mode command has been also been configured on R2 and R3. Notice the OSPF state information generated.
The output displayed in Figure 5 confirms that R1 is now the DR with a priority of 255 and identifies the new neighbor adjacencies of R1.
Use the Syntax Checker in Figure 6 to verify the role and adjacencies of R2 and R3.

Packet Tracer - Determining the DR and BDR

Background/Scenario
In this activity, you will examine DR and BDR roles and watch the roles change when there is a change in the network. You will then modify the priority to control the roles and force a new election. Finally, you will verify routers are filling the desired roles.
Packet Tracer - Determining the DR and BDR Instructions
Packet Tracer - Determining the DR and BDR - PKA

5 comments:

  1. Replies
    1. Thank you for your commented, if the article useful for you pls check out more contain

      Delete
  2. Replies
    1. Thank you for your commented, if the article useful for you pls check out more contain

      Delete
  3. Thank you for your commented, if the article useful for you pls check out more contain

    ReplyDelete