Config Lab: OSPF DR Priority

Wendell Odom
By Wendell Odom September 24, 2021 09:05

OSPF includes many optional features. Depending on the network, particularly the WAN, you may ignore some of those features while possibly using others. The choice to influence which router becomes the Designated Router (DR) matters in some cases, and you can configure routers with an OSPF priority to influence the choice. This lab asks you to do just that.

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

The Lab Exercise

Lab Requirements

By default, OSPF routers elect a Designated Router (DR) and Backup Designated Router (BDR) on Ethernet links, whether LAN or WAN. The routers do so because of the OSPF network type of “broadcast,” the default OSPF network type in Cisco IOS for Ethernet interfaces.

When holding an election to choose the DR, the router with the highest OSPF priority – another OSPF interface setting – wins. By default, Cisco IOS sets all interfaces to OSPF priority 1, causing a tie when using defaults. Because the priority values tie, the routers elect the DR based on the best/highest Router ID (RID).

For this lab, configure the OSPF priority values per the following requirements:

  1. Before configuring, examine the initial configurations. Predict which routers become the DR and BDR on each Ethernet link that has multiple routers connected to it. In concept, complete the empty column of Table 1.
  2. Configure the OSPF interface priority so that:
    1.  Router R1 becomes the DR in all cases.
    2. On the R2/R3 LAN, make router R3 become the DR.
    3. Even if a router would become the DR based on a better RID, still configure the OSPF priority so that all the above DR choices flow from the priority settings.
    4. Use the smallest priority value(s) that meet the requirements.
  3. Because the configuration of the OSPF priority does not cause a new DR election, note any commands you would need to use to force a recent DR election.
Link Predicted DR per Initial Config Intended DR per this Lab’s Config
R1-R2 WAN R1
R1-R3 WAN R1
R1-R4 WAN R1
R2-R3 LAN R3

Table 1: Designated Routers (DRs) in Lab



Figure 1: Topology for this Lab


Initial Configuration

The configurations on the four routers show a minimal OSPF configuration. It uses mostly default OSPF settings, except that the configuration sets the RID for each router.

Example 1: R1 Config


Example 2: R2 Config


Example 3: R3 Config


Example 4: R4 Config


The lab does not call for any switches or PCs. Note that if you add them yourself, you can use all default configuration in a Cisco switch for this lab, which would place all devices connected to a switch in the same VLAN.

Answer Options - Click Tabs to Reveal

You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!

To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.

You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.

(Use this link for more information about Cisco Packet Tracer.)

Use this workflow to do the labs in Cisco Packet Tracer:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2.

If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML and then start the lab.
  3. Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
  4. Add your planned configuration to the lab.
  5. Test the configuration using some of the suggestions below.

Download this lab’s CML file!

Network Device Info:

This table lists the interfaces listed in the lab exercise documentation versus those used in the sample CML file.

Device Lab Port  CML Port
R1 G0/0/0 G0/3
R1 G0/1/0 G0/1
R1 G0/2/0 G0/2
R2 G0/0/0 G0/2
R3 G0/0/0 G0/2
R4 G0/0/0 G0/2

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Lab Answers


Figure 1: Topology for this Lab


Example 1: R1 Config


Example 2: R3 Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)

Lab Commentary

First, consider the OSPF interface subcommand ip ospf priority priority-value. When in configuration mode, the command sets the OSPF interface priority. 

Next, the requirements asked you to configure the priority value with the lowest values to meet requirements. Because the priority value defaults to 1, the answers show a value of 2 for each case in which a router needs to use priority to win the DR election.

Next, choose the interfaces which need a higher priority setting so that they win the DR election. One requirement states that R1 should be the DR on all of its links. A brief look at the figure shows R1 connected to three WAN links, using interfaces G0/0/0, G0/1/0, and G0/2/0. Example 1 shows R1’s configuration for all three of those interfaces.

Another requirement states that on the LAN where both R2 and R3 connect, R3 should become the DR. Example 2 shows the configuration on R3, which uses interface G0/1 to connect to that LAN.

Note that you did not need to change the priority on any other interfaces.

Known Issues in this Lab

This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:

# Summary Detail
1 None No known issues related to this lab.


Why Would Cisco Packet Tracer Have Issues?

(Note: The below text is the same in every Config Lab.)

Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software that runs in real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without having to own real devices.

CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.

Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps. 

  1. Force the re-election of the DR. You can save the configuration and then reload each router. Alternately, in CPT, you can save and then re-open the PT file.
  2. Find the role of each router (DR, BDR, DROther) on each interface using the show ip ospf interface and show ip ospf neighbor commands.

More Labs with Related Content!

Config Lab: Multi-area OSPF 2
Config Lab: OSPF Network Type
Wendell Odom
By Wendell Odom September 24, 2021 09:05
Write a comment

No Comments

No Comments Yet!

Let me tell You a sad story ! There are no comments yet, but You can be first one to comment this article.

Write a comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email


Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.