Information

Author(s) Noah Van Horenbeke
Deadline Keine Frist
Abgabenlimit No limitation

Einloggen

2 - OSPF Shortest Path

🎯 Learning Objectives

This lab will allow you to:

  • Design: choose OSPFv3 interface costs that produce a specific set of best paths.
  • Diagnose: use vtysh to inspect the OSPFv3 routing table and verify that SPF selects the expected next-hop interfaces.

In this lab, you will need to verify and enforce the following intradomain routing property:

  • From every router, the next-hop interface used to reach each destination loopback must match the reference table given below.

In this lab, all OSPFv3 adjacencies are correct by construction. You should not encounter any neighbor stuck below the Full state. There is nothing to debug at the adjacency level. The only thing you have to configure is the OSPFv3 interface cost on each link, so that SPF computes the expected best paths.

Lab Presentation

Lab network topology

This image represents the topology used by the lab. All adjacencies will form correctly as soon as the lab is started; your job is to assign costs.

About OSPF costs: the correction is not based on exact cost values. Several different cost configurations can produce the same shortest paths. The correction validates that, from each router, the next-hop interface used to reach each destination matches the reference table.

Reference: Expected Best Paths

The following table indicates, for each (source, destination) pair, the interface of the source router used in the SPF best path. This is the reference used by the automatic correction.

Source \ Dest R1 lo R2 lo R3 lo R4 lo R5 lo
R1 local eth0 eth0 eth0 eth1
R2 eth0 local eth0 eth0 eth0
R3 eth0 eth0 local eth1 eth1
R4 eth1 eth0 eth0 local eth1
R5 eth0 eth1 eth0 eth0 local

Routing Policy

Operator choices

The most counter-intuitive entry of the reference table is R2 → R5, which is forced to traverse R3 and R4 instead of taking the direct link R2-R5. The operator's rationale is the following:

  • The direct R2–R5 link is a low-bandwidth fallback line. R2 must not prefer it for transit traffic, but only as a backup.
  • R2's traffic to R5 must exit via R2's interface toward R3, and be forwarded along the R3 → R4 backbone, even though this path is one hop longer.
  • Note that R2 has a direct link to R1. However, R1's uplink is reserved for R1's own egress traffic: any cost assignment that would route R2 → R5 traffic through R1 is therefore invalid, even if it satisfies the interface constraint.

Your cost assignment must be consistent with this intent for every entry of the table, not only for the R2 → R5 case. [1]

📥 Download the Base Lab

Download the starting archive
To begin the exercise, you need to download the archive. It contains the base configuration with errors to fix.

Diagnostic Tools

vtysh is the unified command-line interface of FRRouting.

Useful commands for validating SPF results:

# Access vtysh
root@r1:/# vtysh
r1#

# Show running configuration (router-id, interfaces, costs)
show running-config

# Show the OSPFv3 routing table (SPF result, with next-hop interface)
show ipv6 ospf6 route

# Inspect interface-level OSPF state (notably the configured cost)
show ipv6 ospf6 interface <ifname>

# Confirm that adjacencies are healthy (sanity check, should all be Full)
show ipv6 ospf6 neighbor
Focus on the next-hop interface of each route in show ipv6 ospf6 route. That field, not the absolute cost, is what the correction compares against the reference table.

Submit your corrected lab

As OSPF may take some time to converge, every submission takes at least 1min to be evaluated.


Max file size: 9.5 MiB
Allowed extensions: .zip