Skip to content

E08 Configuring OSPF

Back to the Course Schedule

Back to the Material: Loop Detection, part 2 - IPv4, Routing

Video: Instructions for E08



This exercise follows E07, thus uses its working configuration.

Preparing the Topology

See the topology above

  1. Clone a third vyos virtual machine.
  2. Attach adapters to the third vyos VM and update the other vyos VMs to have links accordingly
  3. Use two different 2 host subnets (from E03 Calculating Subnets, Exercise 4) between the routers
    • one subnet between R1 and R3
    • one subnet between R2 and R3
  4. Configure the subnets into use on all of the routers (set interfaces ethernet eth...)

Addressing loopback interfaces

The figure has new drawings of loopback interfaces as presented below.


Address the loopbacks the following way:

  1. Select an available 2 host subnet (from E03 Calculating Subnets, Exercise 4)
  2. distribute a single /32 address for each of the routers (you can use all the addresses of the selected subnet on the routers)

The address is configured on the router set interfaces loopback lo address <x.x.x.x/32>

Configuring OSPF on the routers

Ditching Static routing

Delete all the static routes from your configuration on all the routers.

delete protocols static route <x.x.x.x/xx>

Enabling Dynamic Routing - OSPF

  1. Form adjacencies between all the routers through set protocols ospf area 0 network <x.x.x.x/xx>
  2. Route all the subnets in the topology with OSPF
    • remember the loopback subnets also

Checking for routing table

Verify and document your topology through different show commands on all the routers

  1. show ip ospf neighbor
  2. show ip route ospf and show ip route
  3. show ip ospf database

Verifying connectivity

Investigate and document the topology through ping and traceroute

Draw conclusions of routes used by the packets based on

  • traceroute output
  • show commands
  • (logical) topology picture

Configuring (Cyber) Security to OSPF

If you want you can,

  1. configure OSPF authentication between the devices
  2. configure passive-interfaces to suitable positions

Back to the Schedule?

Back to the Course Schedule


This course and its materials are written by Karo Saharinen and licenced by Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) license.

Creative Commons -licence