Build a Multi-Router OSPF Network

Configure single-area OSPFv2 across 4 routers and verify DR/BDR election.

Introduction

30 Second Summary

Every time you send data across a network, routers decide which path it takes. In enterprise networks with dozens of routers, configuring each path manually would be a nightmare.

In this project, you will build a 4-router OSPF network in Cisco Packet Tracer that dynamically discovers routes between a headquarters and three branch offices. You will configure, verify, troubleshoot, and manipulate OSPF adjacencies using the exact commands tested on the CCNA 200-301 exam.

What You'll Build

You will ping from a PC at headquarters all the way to a PC at a remote branch, with traffic automatically routed through OSPF-learned paths. Then you will manipulate which router controls traffic flow on the broadcast segment and watch the election play out.

By the end of this project, you'll have:

  • A working 4-router OSPF topology where you can ping end-to-end through dynamically-learned routes across both point-to-point and broadcast network types.
  • Hands-on experience diagnosing a broken OSPF adjacency and fixing it using the exact show commands from the CCNA exam.
  • Control over the DR/BDR election on a broadcast segment by configuring OSPF priority and verifying the result.
  • Secret Mission: Add a 5th router to the network and watch OSPF auto-discover it with zero configuration changes on existing routers.

Are there any prerequisites?

You need Cisco Packet Tracer installed (free via Cisco Networking Academy) and basic familiarity with the Cisco IOS CLI (enable, configure terminal, interface configuration).

You should also be comfortable with IP addressing and subnetting fundamentals.

Before We Start

Before we dive in, let's lock in what you're about to build and why it matters for your CCNA preparation.

Build the Topology and Assign IP Addressing

Before any routing protocol can work, you need a physical network foundation with working Layer 3 connectivity between directly-connected devices.

In this step, you will build the 4-router topology in Cisco Packet Tracer, cable all connections, and assign IP addresses to every interface. By the end, adjacent routers can ping each other, but end-to-end traffic between PCs will fail because no routing protocol exists yet.

In this step, get ready to:
  • Place all routers, the switch, and PCs, then cable them together.
  • Configure IP addresses on all router interfaces and bring them up.
  • Set PC IP addresses and verify Layer 3 reachability between directly-connected devices.
Place devices and cable the topology

The topology simulates a headquarters router (R1) connected to a distribution router (R2) via a direct point-to-point link. R2 connects through a switch (SW1) to two branch routers (R3 and R4). PCs sit on the R1 and R4 LANs.

  • In the bottom-left corner of Packet Tracer, click the Network Devices category (the router icon in the top row of the Device-Type Selection Box).
  • In the subcategory row, click Routers.
  • Find the 2911 in the Device-Specific Selection Box and click it.
  • Click four times in the workspace to place four routers.
  • Click each router, select the Config tab, and change the Display Name to R1, R2, R3, and R4 respectively.
  • Click the Switches subcategory, select 2960, and place one switch in the workspace.
  • Rename the switch to SW1 using the same Config tab method.
  • Click the End Devices category, select PC, and place two PCs in the workspace.

Now cable the devices. All connections use copper straight-through cables.

  • Click the Connections category (the lightning bolt icon).
  • Select Copper Straight-Through from the cable options.
  • Click R1, select GigabitEthernet0/0, then click R2 and select GigabitEthernet0/0.
  • Click R2, select GigabitEthernet0/1, then click SW1 and select any available FastEthernet port.
  • Click R3, select GigabitEthernet0/0, then click SW1 and select another available FastEthernet port.
  • Click R4, select GigabitEthernet0/0, then click SW1 and select another available FastEthernet port.
  • Click PC1, select FastEthernet0, then click R1 and select GigabitEthernet0/1.
  • Click PC2, select FastEthernet0, then click R4 and select GigabitEthernet0/1.

After about 30 seconds, you should see green link lights appear on both ends of each cable. Amber lights that transition to green indicate the link is coming up.

Don't see green lights on a cable?

Make sure you selected Copper Straight-Through (not Crossover) for all cables. If link lights are not visible at all, go to Options > Preferences and check Show Link Lights.

If a port does not appear in the connection menu, double-check you clicked the correct device. The 2911 has GigabitEthernet0/0 and GigabitEthernet0/1 available by default.

Configure IP addresses on all router interfaces

Each router interface needs an IP address and must be brought up with no shutdown. The point-to-point link between R1 and R2 uses a /30 subnet (just two usable addresses). The broadcast segment and LAN segments use /24 subnets.

  • Click R1 in the workspace, then click the CLI tab to open the router command line.
  • If you see a prompt asking to enter initial configuration dialog, type no and press Enter.
  • Configure R1's interfaces by entering the following commands:
enable
configure terminal
interface GigabitEthernet0/0
 ip address 10.0.12.1 255.255.255.252
 no shutdown
 exit
interface GigabitEthernet0/1
 ip address 192.168.1.1 255.255.255.0
 no shutdown
 end

What do these commands do?

  • enable enters privileged EXEC mode (full access to the router).
  • configure terminal enters global configuration mode where you can change settings.
  • interface GigabitEthernet0/0 selects that specific interface for configuration.
  • ip address assigns the IP and subnet mask to the interface.
  • no shutdown administratively enables the interface. Cisco router interfaces are shut down by default.
  • end returns to privileged EXEC mode.
  • Click R2 in the workspace, then click the CLI tab.
  • Configure R2's interfaces by entering the following commands:
enable
configure terminal
interface GigabitEthernet0/0
 ip address 10.0.12.2 255.255.255.252
 no shutdown
 exit
interface GigabitEthernet0/1
 ip address 10.0.234.2 255.255.255.0
 no shutdown
 end
  • Verify that R1 and R2 can reach each other by running this on R1's CLI:
ping 10.0.12.2

You should see five replies with !!!! indicating success. This proves the point-to-point link is working.

Ping shows dots instead of exclamation marks?

Dots mean the ping timed out. Verify that both R1 GigabitEthernet0/0 and R2 GigabitEthernet0/0 show up/up status. On each router, run show ip interface brief and check the Status and Protocol columns. If they show administratively down, you missed the no shutdown command.

Also check that both addresses are on the same subnet (10.0.12.1 and 10.0.12.2 with mask 255.255.255.252).

  • Click R3 in the workspace, then click the CLI tab.
  • Configure R3's interfaces by entering the following commands:
enable
configure terminal
interface GigabitEthernet0/0
 ip address 10.0.234.3 255.255.255.0
 no shutdown
 exit
interface GigabitEthernet0/1
 ip address 192.168.3.1 255.255.255.0
 no shutdown
 end
  • Click R4 in the workspace, then click the CLI tab.
  • Configure R4's interfaces by entering the following commands:
enable
configure terminal
interface GigabitEthernet0/0
 ip address 10.0.234.4 255.255.255.0
 no shutdown
 exit
interface GigabitEthernet0/1
 ip address 192.168.4.1 255.255.255.0
 no shutdown
 end
  • Verify the broadcast segment by running this on R2's CLI:
ping 10.0.234.3
  • Then ping R4 from R2:
ping 10.0.234.4

Both pings should show !!!!! (success). This confirms R2, R3, and R4 can all communicate through SW1 on the broadcast segment.

Configure PC IP settings and verify Layer 3 reachability

PCs in Packet Tracer are configured through a graphical IP Configuration window, not the CLI.

  • Click PC1 in the workspace.
  • Click the Desktop tab.
  • Click IP Configuration.
  • Select Static and enter the following values:
  • IP Address: 192.168.1.10
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1
  • Close the PC1 window.
  • Click PC2 in the workspace.
  • Click the Desktop tab, then IP Configuration.
  • Select Static and enter the following values:
  • IP Address: 192.168.4.10
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.4.1
  • Verify PC1 can reach its gateway by clicking PC1, going to the Desktop tab, and opening Command Prompt.
  • Run this ping from PC1's command prompt:
ping 192.168.1.1

You should see replies from 192.168.1.1 (R1). This confirms PC1 can reach its directly-connected router.

Now for the real test. Before you run the next command, think about what will happen. Can PC1 reach PC2 at 192.168.4.10? What would need to exist for that traffic to find its way across multiple routers?

  • From PC1's command prompt, try to ping PC2:
ping 192.168.4.10

The ping times out. R1 has no idea how to reach the 192.168.4.0/24 network because no routing protocol is sharing that information. Each router only knows about its directly-connected subnets.

Why does this ping fail?

Without a routing protocol, R1's routing table only contains its own two connected networks: 10.0.12.0/30 and 192.168.1.0/24. It has no entry for 192.168.4.0/24, so it drops the packet.

This is exactly the problem OSPF solves. OSPF lets routers advertise their connected networks to each other, building a complete map of the topology.

  • As a final check, run show ip interface brief on R1's CLI to confirm all interfaces are up:
show ip interface brief

Both GigabitEthernet0/0 and GigabitEthernet0/1 should show up in both the Status and Protocol columns, with the correct IP addresses displayed.

Run this on every router

Run show ip interface brief on R2, R3, and R4 as well. Every interface you configured should show up/up with the correct IP address. This is one of the most commonly tested verification commands on the CCNA exam.

Your physical foundation is solid. Every interface is up, adjacent routers can talk, and PCs can reach their gateways. Next up, you will enable OSPF so these routers start sharing route information and PC1 can finally reach PC2.

Enable OSPF and Form Your First Adjacency

Your topology is built and every interface is up with the correct IP address assigned. But right now, each router only knows about networks directly connected to its own interfaces. R1 has no idea that PC2's network (192.168.4.0/24) even exists.

OSPF solves this by letting routers dynamically advertise their connected networks to each other. In this step, you will enable OSPF on R1 and R2 and watch them form their first neighbor adjacency on the point-to-point link between them.

In this step, get ready to:
  • Configure OSPF process 1 on R1 and R2 with explicit router IDs and network statements.
  • Verify the FULL adjacency state on the point-to-point link using show commands.
Configure OSPF on R1 and R2

You will configure OSPF on both ends of the point-to-point link between R1 and R2. OSPF requires configuration on both routers before an adjacency can form.

  • Click on R1 in Packet Tracer to open its console.
  • Click the CLI tab.
  • Enable OSPF on R1 by entering these commands:
enable
configure terminal
router ospf 1
 router-id 1.1.1.1
 network 10.0.12.0 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.255 area 0
 passive-interface GigabitEthernet0/1
end

What do these commands do?

  • router ospf 1 starts OSPF process ID 1. The process ID is local to this router and does not need to match other routers.
  • router-id 1.1.1.1 explicitly sets this router's OSPF identity. Without it, the router picks the highest IP on any active interface.
  • network 10.0.12.0 0.0.0.3 area 0 tells OSPF to activate on any interface whose IP falls within 10.0.12.0 to 10.0.12.3. The wildcard mask 0.0.0.3 is the inverse of a /30 subnet mask.
  • passive-interface GigabitEthernet0/1 stops OSPF from sending hello packets toward PC1. There is no router on that LAN to form an adjacency with.
  • On R1, run this command to check if any OSPF neighbors have appeared:
show ip ospf neighbor

The output is empty. No neighbors appear because R2 does not have OSPF configured yet. Both sides must be running OSPF before an adjacency can form.

  • Now click on R2 to open its console.
  • Click the CLI tab.
  • Enable OSPF on R2 by entering these commands:
enable
configure terminal
router ospf 1
 router-id 2.2.2.2
 network 10.0.12.0 0.0.0.3 area 0
 network 10.0.234.0 0.0.0.255 area 0
 passive-interface default
 no passive-interface GigabitEthernet0/0
 no passive-interface GigabitEthernet0/1
end

Why use passive-interface default on R2?

R2 sits at the center of the topology and connects to multiple segments. Instead of listing each LAN interface individually as passive, passive-interface default makes every interface passive first. Then you selectively re-enable OSPF hellos only on the two interfaces that face other routers.

This is a common production pattern. It prevents accidental OSPF adjacency formation on interfaces you add later.

  • On R2, run the following command to confirm the adjacency has formed:
show ip ospf neighbor

You should see an entry for R1 with Neighbor ID 1.1.1.1 and State showing FULL/ -. The adjacency formed successfully.

Not seeing R1 as a neighbor?

  • Make sure you typed no passive-interface GigabitEthernet0/0 on R2. If G0/0 is still passive, R2 will not send hello packets toward R1.
  • Confirm both routers use area 0 in their network statements for the 10.0.12.0 link. Mismatched areas block adjacency.
  • Wait 10-15 seconds. OSPF sends hello packets every 10 seconds on broadcast and point-to-point links.
  • help me troubleshoot why my OSPF neighbor is not appearing on R2

✔️ Awesome, I see the neighbor!

Great. Your first OSPF adjacency is alive. Time to dig deeper into what it means.

ⓧ I'd like to double check the full config

Compare your running configuration on each router against these references.

R1 OSPF configuration:

enable
configure terminal
router ospf 1
 router-id 1.1.1.1
 network 10.0.12.0 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.255 area 0
 passive-interface GigabitEthernet0/1
end

R2 OSPF configuration:

enable
configure terminal
router ospf 1
 router-id 2.2.2.2
 network 10.0.12.0 0.0.0.3 area 0
 network 10.0.234.0 0.0.0.255 area 0
 passive-interface default
 no passive-interface GigabitEthernet0/0
 no passive-interface GigabitEthernet0/1
end
Verify the adjacency on the point-to-point link

The adjacency is up, but what does the output actually tell you? The CCNA exam expects you to interpret show ip ospf neighbor output, understand the network type, and confirm routes are being learned.

  • Click on R1 to return to its CLI.
  • Before you run the next command, predict: will R1 show R2 as a DR, BDR, or neither?
  • Check the neighbor table on R1 by running:
show ip ospf neighbor

You should see R2 listed with Neighbor ID 2.2.2.2, State FULL/ -, and Address 10.0.12.2. The dash after FULL means no DR/BDR election occurred. On point-to-point links, there is no Designated Router because only two routers share the segment.

  • Now examine the interface-level OSPF details by running:
show ip ospf interface GigabitEthernet0/0

Look for the network type in the output. It shows POINT_TO_POINT. Packet Tracer auto-detects this because R1 and R2 are directly connected without a switch between them.

Why does the network type matter?

OSPF behaves differently depending on the network type. On broadcast networks (like a switch segment), a DR and BDR are elected to reduce flooding. On point-to-point links, no election is needed because there are only two routers.

The CCNA exam tests both network types. You will see the broadcast type in action in the next step when R3 and R4 join the switch segment.

  • Finally, confirm that R1 has learned a route from R2 by running:
show ip route ospf

You should see the 10.0.234.0/24 network listed with an O code (meaning OSPF-learned) via 10.0.12.2. R1 now knows how to reach the broadcast segment even though it is not directly connected to it.

What does the O code mean?

In the routing table, O indicates a route learned via OSPF. The C code marks directly connected networks, and L marks the router's own local interface addresses. You will see more O routes appear as you add OSPF to R3 and R4 in the next step.

No OSPF routes showing up?

  • If show ip route ospf is empty, check that show ip ospf neighbor shows the neighbor in FULL state. Routes only appear after the adjacency reaches FULL.
  • On R2, verify that the network 10.0.234.0 0.0.0.255 area 0 statement is present. If R2 is not advertising that network, R1 cannot learn it.
  • help me figure out why R1 has no OSPF routes in the routing table

R1 and R2 are now OSPF neighbors, and R1 has dynamically learned the 10.0.234.0/24 network from R2. But PC1 still cannot reach PC2 because R3 and R4 do not have OSPF yet. In the next step, you will expand OSPF to the broadcast segment and hit a common misconfiguration along the way.

Expand OSPF to the Broadcast Segment

In the last step, you formed your first OSPF adjacency between R1 and R2 on the point-to-point link. R1 now knows about R2's connected networks through dynamically learned routes.

The broadcast segment (R2, R3, R4 connected through SW1) is where the DR/BDR election happens. You need R3 and R4 to join OSPF so that PC2 finally becomes reachable from PC1. Along the way, you will deliberately introduce one of the most common OSPF misconfigurations and practice diagnosing it with the exact show commands the CCNA exam tests.

In this step, get ready to:
  • Configure OSPF on R3 and R4 to join the broadcast segment.
  • Diagnose a broken OSPF adjacency caused by an area mismatch.
  • Fix the misconfiguration and verify full adjacencies on the broadcast segment.
Configure OSPF on R3 with an intentional area mismatch

Area mismatches are the most commonly tested OSPF troubleshooting scenario on the CCNA exam. OSPF neighbors on the same segment must be configured in the same area to form an adjacency. You are going to deliberately configure R3 in area 1 (instead of the correct area 0) so you can practice spotting and fixing this mistake.

  • Click on R3 in your topology to open it.
  • Select the CLI tab.
  • Configure OSPF on R3 with area 1 (the intentional mistake) by entering these commands:
enable
configure terminal
router ospf 1
 router-id 3.3.3.3
 network 10.0.234.0 0.0.0.255 area 1
 network 192.168.3.0 0.0.0.255 area 1
 passive-interface GigabitEthernet0/1
end

What does this configuration do?

  • router ospf 1 starts OSPF process 1, the same process number your other routers use.
  • router-id 3.3.3.3 explicitly sets R3's identity in OSPF. Each router must have a unique router ID.
  • The network statements use wildcard masks to tell OSPF which interfaces to activate. Notice they say area 1 instead of area 0. This is the deliberate mistake.
  • passive-interface GigabitEthernet0/1 suppresses OSPF hello packets on the interface facing the LAN (no routers there, only future hosts).

Now configure R4 correctly with area 0. This gives you one working neighbor and one broken one to compare.

  • Click on R4 in your topology to open it.
  • Select the CLI tab.
  • Configure OSPF on R4 with the correct area 0 by entering these commands:
enable
configure terminal
router ospf 1
 router-id 4.4.4.4
 network 10.0.234.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 0
 passive-interface GigabitEthernet0/1
end

What does this configuration do?

R4's configuration is identical in structure to R3's, but it places both network statements in area 0. This matches R2's configuration on the same segment. R4 should form an adjacency successfully.

Observe the failure and diagnose with show commands

Both R3 and R4 are now configured for OSPF. Before you check the neighbor table, think about what you expect to see. R2 is in area 0 on the broadcast segment. R4 is also in area 0. R3 is in area 1.

Do you think R3 will form an adjacency with R2, even though they are configured in different areas?

  • Switch back to R2's CLI tab.
  • Check R2's OSPF neighbor table by running this command:
show ip ospf neighbor

You should see R4 (router-id 4.4.4.4) forming or in FULL adjacency state. R3 does NOT appear in the neighbor table. The adjacency with R3 is stuck or entirely absent.

This is the area mismatch in action. OSPF requires neighbors on the same segment to be in the same area. R2 is in area 0 and R3 is in area 1, so they refuse to form an adjacency.

  • Confirm the mismatch by switching to R3's CLI and running this command:
show ip ospf interface GigabitEthernet0/0

Notice the output shows Area 1 for this interface. Now compare by running the same command on R2's G0/1 interface (the one connected to the broadcast segment).

  • Switch back to R2's CLI and run this command:
show ip ospf interface GigabitEthernet0/1

R2's output shows Area 0. That is the proof. R3 says area 1, R2 says area 0, and OSPF will not form an adjacency across that mismatch.

Why does show ip ospf interface matter for the exam?

The show ip ospf interface command shows the area assignment, network type, DR/BDR state, and hello/dead timers for each OSPF-enabled interface. It is the primary diagnostic tool when an adjacency fails to form.

On the CCNA exam, you may see a screenshot of this command's output and be asked to identify why two routers are not forming a neighbor relationship. The area field is the first thing to check.

R4 not showing up either?

  • Wait 30-40 seconds after configuring R4. OSPF uses hello packets every 10 seconds on broadcast networks, and the dead timer is 40 seconds. Adjacency formation takes a few hello intervals.
  • Verify R4's interface is up by running show ip interface brief on R4. GigabitEthernet0/0 must show status up and protocol up.
  • Confirm R2's G0/1 is not passive. Run show ip ospf interface GigabitEthernet0/1 on R2. If it says passive, R2 is not sending hellos on that interface.

Why isn't R4 forming an adjacency with R2 on the broadcast segment?

Fix the area mismatch on R3

The diagnosis is clear. R3's network statements place its interfaces in area 1, but every other router on the segment is in area 0. You need to remove the area 1 statements and replace them with area 0.

  • Switch to R3's CLI tab.
  • Remove the incorrect network statements and add the corrected ones by entering these commands:
enable
configure terminal
router ospf 1
 no network 10.0.234.0 0.0.0.255 area 1
 no network 192.168.3.0 0.0.0.255 area 1
 network 10.0.234.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 0
end

What does this fix do?

The no network commands remove the area 1 associations. The replacement network commands re-add the same interfaces under area 0. Now R3 matches R2 and R4 on the broadcast segment, and OSPF can form adjacencies.

Before you verify, predict: how many FULL adjacencies do you expect to see on R2's neighbor table now?

  • Switch back to R2's CLI tab.
  • Verify the fix by running this command:
show ip ospf neighbor

You should now see three FULL adjacencies on R2. R1 (1.1.1.1) shows FULL/- on the point-to-point link. R4 (4.4.4.4) shows as FULL/DR and R3 (3.3.3.3) shows as FULL/BDR on the broadcast segment. R2 itself is DROTHER because it has the lowest router-id (2.2.2.2) of the three routers on that segment.

Why is R4 the DR and R3 the BDR?

On broadcast networks, OSPF elects a Designated Router (DR) and Backup Designated Router (BDR). When all routers have the same default priority (1), the router with the highest router-id wins the DR election.

R4 has router-id 4.4.4.4 (highest), so it becomes DR. R3 has 3.3.3.3 (next highest), so it becomes BDR. R2 has 2.2.2.2 (lowest), so it becomes DROTHER.

R3 still not showing up?

  • Wait 30-40 seconds after applying the fix. OSPF needs a few hello intervals to discover the corrected neighbor.
  • On R3, run show ip ospf interface GigabitEthernet0/0 and confirm the area now shows 0, not 1. If it still shows area 1, re-enter the fix commands.
  • Make sure both no network commands used exactly area 1 (matching what you originally configured). If the area number in the no command does not match the existing statement, IOS will not remove it.

I fixed the area mismatch but R3 still won't form an adjacency with R2. Help me troubleshoot.

All four routers are now OSPF neighbors in area 0. The broadcast segment has a DR, BDR, and DROTHER elected based on router-id. Next up, you will prove that this OSPF network actually works by pinging from PC1 all the way to PC2, and you will take a closer look at exactly how the DR/BDR election played out.

Verify End-to-End Reachability and Observe DR/BDR Election

You fixed the area mismatch on R3 and now all four routers have full OSPF adjacencies. But you have not yet proven the whole point of dynamic routing: that PC1 at headquarters can actually reach PC2 at the remote branch without a single static route.

In this step, you will ping across the entire topology and then dig into the show commands that reveal how OSPF elected its Designated Router and synchronized its link-state database. These are the exact commands the CCNA exam screenshots test.

In this step, get ready to:
  • Prove end-to-end connectivity from PC1 to PC2 through OSPF-learned routes.
  • Identify DR, BDR, and DROTHER roles on the broadcast segment.
  • Verify the OSPF link-state database is fully synchronized across all routers.
Test end-to-end connectivity

This is the moment of truth. PC1 sits on R1's LAN (192.168.1.0/24) and PC2 sits on R4's LAN (192.168.4.0/24). For this ping to work, R1 must have learned R4's LAN network through OSPF.

Before you run the ping, think about this: do you expect it to succeed or fail? What route would R1 need in its table for the packet to reach 192.168.4.10?

  • Click on PC1 in the Packet Tracer topology.
  • Select the Desktop tab.
  • Click Command Prompt.
  • Ping PC2 by running this command:
ping 192.168.4.10

You should see replies from 192.168.4.10 with 0% packet loss. Traffic traveled from PC1 through R1, to R2, to R4, and finally to PC2. All of that routing happened dynamically through OSPF.

Ping failed or timed out?

If you see "Request timed out" or "Destination host unreachable", check these common causes:

  • Verify PC1's default gateway is set to 192.168.1.1 and PC2's gateway is 192.168.4.1.
  • On R1, run show ip route ospf and confirm you see the 192.168.4.0 network. If it is missing, R4 may still have an area mismatch or a missing network statement.
  • Try the ping a second time. The first ping sometimes fails while ARP resolves.

Still stuck? Help me troubleshoot why my OSPF ping from PC1 to PC2 is failing in Packet Tracer.

Now confirm exactly which routes OSPF taught R1.

  • Click on R1 and open its CLI tab.
  • View the OSPF-learned routes by running:
show ip route ospf

You should see three routes marked with the O code (OSPF-learned), all reachable via 10.0.12.2 (R2's point-to-point interface):

  • 10.0.234.0/24 (the broadcast segment).
  • 192.168.4.0/24 (PC2's LAN on R4).
  • 192.168.3.0/24 (R3's LAN).

Why do all routes point to 10.0.12.2?

R1 only has one path out of its directly-connected networks: the point-to-point link to R2. Every remote network must be reached through R2 first, so R2's address (10.0.12.2) is the next hop for all OSPF routes on R1.

Examine the DR/BDR election on the broadcast segment

On broadcast multi-access networks like the 10.0.234.0/24 segment, OSPF elects a Designated Router (DR) and a Backup Designated Router (BDR). Non-DR/BDR routers form full adjacencies only with the DR and BDR, not with each other.

  • Click on R2 and open its CLI tab.
  • View the neighbor table by running:
show ip ospf neighbor

You should see entries for three neighbors. Focus on the broadcast segment entries:

  • R4 (router-id 4.4.4.4) shows FULL/DR because it has the highest router-id and won the DR election.
  • R3 (router-id 3.3.3.3) shows FULL/BDR as it has the second-highest router-id.
  • R1 (router-id 1.1.1.1) shows FULL/ - on the point-to-point link because no DR/BDR election occurs there.

What determines who becomes DR?

OSPF uses two criteria in order: first, the highest OSPF priority on the interface (default is 1 for all routers). If priorities tie, the highest router-id breaks the tie.

Since all routers here have the default priority of 1, the router-id decided the election. R4 (4.4.4.4) beats R3 (3.3.3.3) beats R2 (2.2.2.2).

Now look at the interface-level detail to confirm network type and timers.

  • On R2, run this command to inspect the broadcast segment interface:
show ip ospf interface GigabitEthernet0/1

In the output, confirm these key fields:

  • Network Type shows BROADCAST.
  • State shows DROTHER (R2 is neither DR nor BDR on this segment).
  • Designated Router (ID) shows 4.4.4.4 (R4).
  • Timer intervals show Hello 10, Dead 40 (the defaults for broadcast network type).

Why do hello and dead timers matter?

OSPF sends hello packets every 10 seconds on broadcast links. If a router does not hear from a neighbor within the 40-second dead interval, it declares that neighbor down and recalculates routes.

On the CCNA exam, a mismatched hello/dead timer between neighbors is a common reason adjacencies fail to form. Both sides must agree on these values.

Verify the complete OSPF database

Every OSPF router maintains a Link-State Database (LSDB) that must be identical across all routers in the same area. The show ip ospf database command lets you confirm synchronization.

  • On R2 (or any router), view the full LSDB by running:
show ip ospf database

You should see two types of LSAs in the output:

  • Router LSAs (Type 1): one entry from each router-id (1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4). Each router advertises its own links.
  • Network LSA (Type 2): generated by the DR (R4, router-id 4.4.4.4) for the broadcast segment. This LSA describes all routers attached to the 10.0.234.0/24 multi-access network.

Why does only the DR generate the Network LSA?

On a broadcast segment with many routers, having every router flood full-mesh LSA updates would create excessive traffic. The DR acts as a central point that collects updates and generates a single Network LSA representing all routers on that segment.

This is why controlling which router becomes DR matters in production. The DR handles extra processing work that you want on your most capable router.

If you see all four Router LSAs and at least one Network LSA from 4.4.4.4, your LSDB is fully synchronized. Every router in the area has an identical map of the network.

Missing a Router LSA?

If you see fewer than four Router LSAs, one of your routers may not have a working adjacency. Run show ip ospf neighbor on R2 to check which neighbor is missing, then verify that router's OSPF configuration is in area 0.

Need help? Help me figure out why a router's LSA is missing from my OSPF database.

Your OSPF network is fully converged and proven. PC1 can reach PC2 dynamically, DR/BDR roles are visible, and the LSDB is synchronized.

R4 won the DR election because it has the highest router-id. In the next step, you will take control of that election by configuring OSPF priority to force R2 into the DR role instead.

Manipulate the DR/BDR Election with Priority

Your OSPF network is fully converged and PC1 can reach PC2. Right now, R4 won the Designated Router election simply because it has the highest router-id (4.4.4.4). In production, you want your most powerful or most central router as DR, not just the one with the biggest ID.

The CCNA exam tests whether you can deliberately control which router becomes DR. In this step, you will configure OSPF priority on R2 to force it to win the election over R4.

In this step, get ready to:
  • Configure OSPF priority 255 on R2 to guarantee it wins the DR election.
  • Reset the OSPF process to trigger a fresh election and verify R2 is now DR.
  • Confirm end-to-end connectivity still works after the election change.
Configure OSPF priority on R2 to win the election

OSPF uses a priority value (0 to 255) on each interface to determine the DR. The router with the highest priority wins. When priorities are tied (the default is 1 on all routers), the highest router-id breaks the tie.

  • Click on R2 to open its CLI tab.
  • Set OSPF priority to 255 on R2's broadcast-facing interface by entering these commands:
enable
configure terminal
interface GigabitEthernet0/1
 ip ospf priority 255
end

What does this command do?

The ip ospf priority 255 command sets R2's priority to the maximum value (255) on GigabitEthernet0/1. Since every other router still has the default priority of 1, R2 is now guaranteed to win the next DR election on this segment.

Why doesn't the DR change immediately?

The DR/BDR election is non-preemptive. Once a router becomes DR, it stays DR until the OSPF process resets or the router goes down. Changing priority alone does not trigger a new election.

In a lab environment, you force a new election by clearing the OSPF process on all routers connected to the broadcast segment.

  • On R2, force a new election by running this command:
clear ip ospf process
  • When prompted, type yes and press Enter to confirm.
  • Click on R3 to open its CLI tab.
  • Run the same command on R3:
clear ip ospf process
  • Confirm with yes when prompted.
  • Click on R4 to open its CLI tab.
  • Run the same command on R4:
clear ip ospf process
  • Confirm with yes when prompted.
  • Wait about 30 to 40 seconds for OSPF adjacencies to re-establish and the new election to complete.

Seeing errors after clearing OSPF?

You may see console messages about adjacency changes. This is normal. OSPF is tearing down and rebuilding all neighbor relationships. Wait for the messages to stop before running verification commands.

If you only cleared OSPF on one or two routers, the remaining router still holds the old DR state. Clear the process on all three routers (R2, R3, R4) connected to the broadcast segment.

Why isn't the new DR showing up after I cleared the OSPF process?

Verify R2 is now the Designated Router

The election should be complete. Before you check the result, think about what you expect to see. R2 now has priority 255, while R3 and R4 still have the default priority of 1.

Which router do you expect to be DR now? Which should be BDR, and why?

  • On R3, verify the new election results by running:
show ip ospf neighbor

You should see R2 (2.2.2.2) listed as FULL/DR. R4 (4.4.4.4) is now FULL/BDR because among the remaining routers with priority 1, it has the highest router-id. R3 itself is DROTHER.

Why did R4 become BDR instead of staying DR?

When you cleared the OSPF process on all three routers, every router started a fresh election from scratch. R2 wins DR with priority 255. Among R3 (priority 1, router-id 3.3.3.3) and R4 (priority 1, router-id 4.4.4.4), R4 wins BDR because of the higher router-id tiebreaker.

  • Switch back to R2's CLI tab.
  • Confirm R2 knows it is the DR by running:
show ip ospf interface GigabitEthernet0/1

In the output, look for the line that says this router is the Designated Router. You should also see the priority listed as 255. The network type shows BROADCAST, and the hello/dead intervals show 10/40 seconds.

R2 still shows as DROTHER?

Make sure you configured the priority on the correct interface. R2 connects to the broadcast segment via GigabitEthernet0/1, not GigabitEthernet0/0. Run show ip ospf interface GigabitEthernet0/1 and verify the priority shows 255.

If the priority is still 1, re-enter the configuration:

configure terminal
interface GigabitEthernet0/1
 ip ospf priority 255
end

Then clear the OSPF process on all three broadcast-segment routers again and wait 30 to 40 seconds.

Help me troubleshoot why R2 isn't becoming the Designated Router.

Confirm end-to-end connectivity still works after the election change

Changing the DR affects which router generates Network LSAs and how flooding works on the segment. It should not break connectivity. Let's prove it.

  • Click on PC1 to open it.
  • Go to the Desktop tab, then open Command Prompt.
  • Test end-to-end connectivity by running:
ping 192.168.4.10

The ping succeeds. All four reply packets come back, proving OSPF routes are still intact. The DR change affects LSA flooding efficiency on the broadcast segment, but it does not break routing.

What does this prove about DR/BDR?

DR/BDR is an optimization for reducing OSPF traffic on multi-access networks. It is not a routing requirement. All routers still maintain full routing tables regardless of their DR/BDR role. A DROTHER can still forward traffic normally.

Ping to PC2 failing?

After clearing the OSPF process, adjacencies take 30 to 40 seconds to re-establish. If you pinged too quickly, wait a moment and try again.

Run show ip ospf neighbor on R2 and confirm all neighbors show FULL state. If any neighbor is stuck in INIT or 2WAY, the adjacency has not fully re-formed yet.

Why can't PC1 ping PC2 after I changed the DR?

Secret mission

Add a 5th Router and Watch OSPF Auto-Discover It

This is the real power of OSPF over static routing. Can you add a brand new branch office router to the network and have it auto-discovered by existing routers with zero configuration changes on R2, R3, or R4?

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely locally in Cisco Packet Tracer, so there are no ongoing costs or cloud resources to worry about.

Decide whether to keep your topology file for future practice or delete it entirely.

Resources you used:

  • Cisco Packet Tracer topology file (.pkt file) containing your 5-router OSPF network.

Keep everything running

No action needed. Choose this if you want to keep building on your OSPF topology.

  • Save your topology by clicking File, then Save in Packet Tracer.
  • Your .pkt file preserves all router configurations, IP addressing, and OSPF settings.
  • You can extend this topology later with multi-area OSPF, route summarization, or authentication.

Pause - I'll come back to this later

Save your work and close Packet Tracer to free up system memory. Your topology is preserved in the file for next time.

  • Click File, then Save As.
  • Choose a location you will remember (such as your Desktop) and name the file something descriptive like ospf-lab.pkt.
  • Close Cisco Packet Tracer.
  • When you return, double-click the .pkt file to reopen your full topology with all configurations intact.

Delete - I don't want to use this again

Remove all project files and start fresh. This cannot be undone.

  • Close Cisco Packet Tracer without saving. If prompted to save, click No or Don't Save.
  • If you already saved a .pkt file during this project, navigate to where you saved it and delete it.
  • On Windows, right-click the file and select Delete. On macOS, drag the file to the Trash.

Nice Work!

Nice Work!

Nice work! You just built a fully converged multi-router OSPF network from scratch, complete with dynamic route discovery, DR/BDR election control, and real troubleshooting under your belt.

You've learned how to:

  • Configure and verify a single-area OSPFv2 topology across both point-to-point and broadcast network types, forming full neighbor adjacencies confirmed with show ip ospf neighbor.
  • Diagnose and fix a broken OSPF adjacency caused by an area mismatch, using show ip ospf interface to pinpoint the exact misconfiguration.
  • Manipulate the DR/BDR election by setting OSPF priority, resetting the process, and verifying the new roles with show commands.
  • Secret Mission: Added a 5th router and watched OSPF auto-discover it with zero configuration changes to existing infrastructure.

Ready to quiz yourself?