Lab #6

OSPF in a simple topology

The purpose of this lab is to show how three different subnets can be connected by means of three routers connected in a triangle topology.
Routes between subnets are established by means of the OSPF protocol. All the three routers are configured to belong to the same area.

Preparation steps

Before this experiment is executed, it is required that you have previously configured GNS3 to make it able to instantiate a Docker container of a Linux-based router based on the FRR (Free Range Routing) software suite, as described in Lab #2.
In particular, the GNS3 VM in which Docker containers are activated should have:

Experiment steps

  1. Recreate the following topology in GNS3. Choose the "GNS3 VM" server to instantiate all the devices of this lab.
  2. lab6-topology
     
  3. When the devices are still inactive, right-click on the R1 router icon and select the Configure option. Then, press Edit to modify the R1 router's network configuration.
    Modify R1's interfaces configuration as illustrated in the following picture.
    R1-configuration
    Then, click the "Advanced" tab and add /etc/frr to the Additional directories to make persistent.
  4. Right-click on the R2 router icon and select the Configure option. Then press Edit to modify the R2 router's network configuration.
    Modify R2's interfaces configuration as illustrated in the following picture.

  5. R2-configuration
    Then, click the "Advanced" tab and add /etc/frr to the Additional directories to make persistent.
  6. Right-click on the R3 router icon and select the Configure option. Then press Edit to modify the R3 router's network configuration.
    Modify R3's interfaces configuration as illustrated in the following picture.

  7. R3-configuration
    Then, click the "Advanced" tab and add /etc/frr to the Additional directories to make persistent.
     
  8. Start all devices.

  9. Open PC1 terminal and execute the command:
    ip 192.168.10.2/24 192.168.10.1
  10. Open PC2 terminal and execute the command:
    ip 192.168.20.2/24 192.168.20.1
  11. Open PC3 terminal and execute the command:
    ip 192.168.30.2/24 192.168.30.1
  12. Open R1 auxiliary console. At the root command prompt:
    echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
    chown frr:frr /etc/frr/vtysh.conf
    Then edit the /etc/frr/daemons file to ensure that the ospfd daemon is enabled.
    ospfd=yes
    Edit the /etc/frr/frr.conf file to make it appear as the following:
    frr version 8.1_git
    frr defaults traditional
    hostname R1
    no ipv6 forwarding
    service integrated-vtysh-config
    !
    interface eth0
     ip address 192.168.10.1/24
     ip ospf passive
    !
    interface eth1
     ip address 10.10.10.1/24
    !
    interface eth2
     ip address 10.10.20.1/24
    !
    interface lo
     ip address 10.0.0.1/32
     ip ospf passive
    !
    router ospf
     network 192.168.10.0/24 area 0.0.0.0
     network 10.10.10.0/24   area 0.0.0.0
     network 10.10.20.0/24   area 0.0.0.0
    !
    line vty
    !
    
    Fix /etc/frr/frr.conf ownership:
    chown frr:frr /etc/frr/frr.conf
    Finally, stop and restart the R1 container to start the ospfd daemon.
  13. Open R2 auxiliary console. At the root command prompt:
    echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
    chown frr:frr /etc/frr/vtysh.conf
    Then edit the /etc/frr/daemons file to ensure that the ospfd daemon is enabled.
    ospfd=yes
    Edit the /etc/frr/frr.conf file to make it appear as the following:
    frr version 8.1_git
    frr defaults traditional
    hostname R2
    no ipv6 forwarding
    service integrated-vtysh-config
    !
    interface eth0
     ip address 192.168.20.1/24
     ip ospf passive
    !
    interface eth1
     ip address 10.10.10.2/24
    !
    interface eth2
     ip address 10.10.30.1/24
    !
    interface lo
     ip address 10.0.0.2/32
     ip ospf passive
    !
    router ospf
     network 192.168.20.0/24 area 0.0.0.0
     network 10.10.10.0/24   area 0.0.0.0
     network 10.10.30.0/24   area 0.0.0.0
    !
    line vty
    !
    
    Fix /etc/frr/frr.conf ownership:
    chown frr:frr /etc/frr/frr.conf
    Finally, stop and restart the R2 container to start the ospfd daemon.
  14. Open R3 auxiliary console. At the root command prompt:
    echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
    chown frr:frr /etc/frr/vtysh.conf
    Then edit the /etc/frr/daemons file to ensure that the ospfd daemon is enabled.
    ospfd=yes
    Finally, edit the /etc/frr/frr.conf file to make it appear as the following:
    frr version 8.1_git
    frr defaults traditional
    hostname R3
    no ipv6 forwarding
    service integrated-vtysh-config
    !
    interface eth0
     ip address 192.168.30.1/24
     ip ospf passive
    !
    interface eth1
     ip address 10.10.20.2/24
    !
    interface eth2
     ip address 10.10.30.2/24
    !
    interface lo
     ip address 10.0.0.3/32
     ip ospf passive
    !
    router ospf
     network 192.168.30.0/24 area 0.0.0.0
     network 10.10.20.0/24   area 0.0.0.0
     network 10.10.30.0/24   area 0.0.0.0
    !
    line vty
    !
    
    Fix /etc/frr/frr.conf ownership:
    chown frr:frr /etc/frr/frr.conf
    Finally, stop and restart the R3 container to start the ospfd daemon.
  15. In PC1 terminal execute the command:
    ping 192.168.20.2
    and verify that answers are received from PC2.
    In PC1 terminal execute the command:
    ping 192.168.30.2
    and verify that answers are received from PC3.

  16. PC1-pings
  17. In PC1 terminal execute the command:
    trace 192.168.20.2
    and verify that packets are routed through R1 and R2 (shortest path).
    In PC1 terminal execute the command:
    trace 192.168.30.2
    and verify that packets are routed through R1 and R3 (shortest path).

  18. PC1-traces
  19. Right-click on the link connecting R1 and R2 and suspend the link.
    trace 192.168.20.2
    and verify that packets are routed through R1, R3 and R2.

  20. PC1-traces-alt


    Return to list of labs

    Copyright (c) 2024 - Roberto Canonico

    Last updated: October 3, 2024 by Roberto Canonico