Open the lab

[ YOUR LAB FILE ]

Download the starting topology, then work through the lesson in SwitchLab.

Download SwitchLab Lab (.swlab)

  1. Save the .swlab file without renaming its extension.
  2. Open SwitchLab. Import and export controls currently require a desktop-width window. On a smaller screen, Tools → Fit brings the topology into view.
  3. Select Import Sandbox (folder icon), choose the downloaded file, and confirm the device and cable counts below.
  4. Select a device, then choose Open device on desktop or its name in the bottom bar on smaller screens. Select CLI for switches/routers or Desktop → Terminal for PCs. Enter enable only when the prompt ends in >.
  5. Follow this page beside the simulator. Use a free account to export your work. Reimport the original download to restart; export any work you want to keep first.

Prerequisites

  • Complete Route through a Three-Router OSPF Core.
  • Understand that OSPF prefers the path with the lowest total interface cost and that administrative shutdown removes a path.

Follow the CCNA study path · Browse all SwitchLab labs

Topology

Design and Test a Resilient OSPF Triangle: actual imported SwitchLab starting topology.
Starting topology captured in SwitchLab. Select the image to view it at full size.

5 devices · 5 links

Scenario

The regional network now includes a direct emergency link between its two edge routers. Normal traffic must use the core; the direct circuit is reserved as backup. Deliver this policy with OSPF costs, prove the alternate path during a controlled failure, and restore the normal topology before handoff.

Objectives

  • Implement a preferred OSPF path and a higher-cost alternate using the specified constraints.
  • Verify next-hop changes when one core link becomes unavailable.
  • Restore the normal path and demonstrate that user traffic works in both operating states.

CCNA blueprint

200-301 v1.1 objectives — this lab covers the following specific skills, not every subtopic in the domain.

  • 3.4.a — Troubleshoot single-area OSPFv2 neighbor adjacency.
  • 3.4.d — Identify peers by router ID.
  • 3.1.a — Distinguish OSPF-learned routes from connected routes.

Starting information

  • R1 and R3 have g0/2 addresses on 10.0.13.0/30 for the backup circuit. R2 remains the preferred transit core.
  • Use one area 0, process 1, and router IDs 1.1.1.1, 2.2.2.2 and 3.3.3.3. Advertise both user LANs and every transit subnet.
  • Set the OSPF cost to 50 at both ends of the direct R1–R3 link. Other links retain their default costs. Keep only workstation LANs passive.
  • During the controlled failure, shut R2 g0/1, verify delivery using the direct edge link, then re-enable R2 g0/1. Finish with all five physical links enabled.
HostIPv4 addressMaskGateway
PC110.10.10.10255.255.255.010.10.10.1
PC310.30.30.30255.255.255.010.30.30.1
RouterInterfaceIPv4 addressMask
R1g0/010.10.10.1255.255.255.0
R1g0/110.0.12.1255.255.255.252
R1g0/210.0.13.1255.255.255.252
R2g0/010.0.12.2255.255.255.252
R2g0/110.0.23.1255.255.255.252
R3g0/010.30.30.1255.255.255.0
R3g0/110.0.23.2255.255.255.252
R3g0/210.0.13.2255.255.255.252
Device / portDevice / port
PC1 / eth0R1 / g0/0
R1 / g0/1R2 / g0/0
R2 / g0/1R3 / g0/1
PC3 / eth0R3 / g0/0
R1 / g0/2R3 / g0/2

Tasks

  1. Plan the expected neighbor IDs and forward/return next hops for normal and failed-core operation before making changes.
  2. Deploy the required routing policy. Do not add static routes, change addressing or remove the backup link to force path selection.
  3. Verify normal routing through R2 on both edges, then test both workstation directions.
  4. Perform the stated core-link shutdown. Confirm that each edge selects the direct-link peer for the remote LAN and that both workstation directions still succeed.
  5. Restore R2 g0/1. Verify that both edges prefer the core again, save the final running configurations and write a brief explanation of the path-selection result. Do not claim measured convergence time; this simulator recomputes converged state.

Useful commands

show ip interface brief
show ip ospf neighbor
show ip ospf interface brief
show ip route
show running-config
copy running-config startup-config

Progressive hints

Hint 1

A working alternate cable is not enough. Both ends must participate in OSPF and learn the destination LAN.

Hint 2

Compare total OSPF path costs. A cost of 50 on each outgoing direct interface makes the two-core-link path preferable under the defaults.

Hint 3

Inspect the remote /24 next hop before, during and after the R2 g0/1 shutdown. The direct peers use 10.0.13.1 and 10.0.13.2.

Verification

  • Normal state: R1 reaches 10.30.30.0/24 via 10.0.12.2 and R3 reaches 10.10.10.0/24 via 10.0.23.1.
  • With R2 g0/1 shut: R1 uses 10.0.13.2 and R3 uses 10.0.13.1 for the remote LAN; both workstation directions succeed.
  • After R2 g0/1 is restored, both edges select their core next hop again.
  • All physical links finish enabled, both direct interfaces retain cost 50, user LANs are passive, and no static routes are configured.

Solution / walkthrough

Show Solution

Use enable only from a > prompt; if already at #, begin with configure terminal.

R1

Use OSPF for every transit and LAN prefix. The direct g0/2 link has cost 50, so it remains an alternate to the lower-cost core path.

enable
configure terminal
router ospf 1
router-id 1.1.1.1
network 10.10.10.0 0.0.0.255 area 0
network 10.0.12.0 0.0.0.3 area 0
passive-interface g0/0
network 10.0.13.0 0.0.0.3 area 0
exit
interface g0/2
ip ospf cost 50
end
copy running-config startup-config

R2

Use OSPF for every transit and LAN prefix. The core keeps default costs.

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.23.0 0.0.0.3 area 0
end
copy running-config startup-config

R3

Use OSPF for every transit and LAN prefix. The direct g0/2 link has cost 50, so it remains an alternate to the lower-cost core path.

enable
configure terminal
router ospf 1
router-id 3.3.3.3
network 10.30.30.0 0.0.0.255 area 0
network 10.0.23.0 0.0.0.3 area 0
passive-interface g0/0
network 10.0.13.0 0.0.0.3 area 0
exit
interface g0/2
ip ospf cost 50
end
copy running-config startup-config

R2

For the full failure exercise, pause after shutdown and inspect both edge routing tables and workstation pings as described in Verification. Then restore g0/1. The automated evidence executes those intermediate checks; do not paste this entire batch without observing the outage state.

enable
configure terminal
interface g0/1
shutdown
end
show ip ospf neighbor
configure terminal
interface g0/1
no shutdown
end

Run every verification check above after the changes. A saved configuration alone does not prove packet delivery.

Previous lab

Find a Missing OSPF LAN Advertisement

Related labs

Related articles and tools

Next recommended lab

Configure and Verify IPv6 Router Interfaces