Skip to content

E07 Configuring STP

Back to the Course Schedule

Back to the Material: Loop Detection, part 1 - Ethernet, Spanning-Tree

Video: Instructions for E07

Topology

!a

This exercise follows E05, thus uses its working configuration.

Preparing the topology

Be really precise; update the topology drawing constantly when configuring the network adapters of virtual machines

Be sure to handle the network with one switch powered on at a time. This is to prevent loops.

  1. Add a third switch to your topology as the diagram suggests (e.g. by cloning)
    • remember to reconfigure the switch 3
  2. Move the other lubuntu virtual machine behind the third switch

Configure all the switches in the network to have tagged and untagged ports accordingly.

  1. Test the configuration with Switch1 and Switch2 on (Switch 3 off)
    • can the Lubuntu1 reach its default gateway?
  2. Test the configuration with Switch3 and Switch2 on (Switch1 off)
    • can the Lubuntu2 reach its default gateway?

Once configuration is complete. We can proceed to the next phase.

Making a loop

  1. Enable Lubuntu virtual machines and Vyos
    • Make the Lubuntu machines ping one another
  2. Open Task Manager (or other performance indicator) from your computer
  3. Turn on all the switches, one by one
  4. Verify how the switches are handling the situation
    • show ports statistics from the console of the switch
      • There should be an immediate increase in transmitted packets related to the CPU usage
    • The Task Manager
      • Monitor the CPU usage here
This is how it should look like

!a

If you experience instability/blackouts of the switches; Just turn it off from the VirtualBox window

This will stop the broadcast storm

Enabling STP

  1. Turn on the switches one at a time
  2. Enable spanning-tree protocol on all the vlans in the switches
  3. Enable spanning-tree protocol on the switch
  4. When done, save the configuration, and boot up all the switches
  5. Initiate traffic from lubuntu to another

Monitor the state of the Task Manager for CPU spikes.

Investigating port states

  1. Print out all the show stpd s0 and show stpd s0 ports from all the switches.
  2. Update/draw the spanning-tree topology picture
  3. Answer the question: Is the root switch position ideal? Are the ports forwarding as you would have expected?

Defining a root switch

  1. Plan an update to the network by configuring the priority of the switches as you plan
  2. Power Off/On is required of the switches to elect new Root Switch; so reboot them after configuration
  3. Print out all the show stpd s0 and show stpd s0 ports from all the switches.
  4. Update/draw the spanning tree topology after the changes

Measuring changes in topology

  1. Have one of the Lubuntu -machines actively ping one another
  2. Select one of the ports from the root switch and disable it with disable port <#>
  3. Measure/document the ping timeout between devices
    • You might have to enable/disable the port several times to get desired effect
  4. Print out all the show stpd s0 and show stpd s0 ports from all the switches.
  5. Update/draw the spanning tree topology after the changes in port states
The ping timeouts should be visible as follows

64 bytes from 192.168.0.254: icmp_seq=2022 ttl=64 time=3.99 ms

64 bytes from 192.168.0.254: icmp_seq=2023 ttl=64 time=3.11 ms

64 bytes from 192.168.0.254: icmp_seq=2024 ttl=64 time=3.00 ms

64 bytes from 192.168.0.254: icmp_seq=2025 ttl=64 time=3.68 ms

64 bytes from 192.168.0.254: icmp_seq=2031 ttl=64 time=1.89 ms

64 bytes from 192.168.0.254: icmp_seq=2032 ttl=64 time=2.63 ms

64 bytes from 192.168.0.254: icmp_seq=2033 ttl=64 time=1.94 ms

So 2026 - 2030 packets missing when disabling the port

and

64 bytes from 192.168.0.254: icmp_seq=2034 ttl=64 time=1.86 ms

64 bytes from 192.168.0.254: icmp_seq=2035 ttl=64 time=2.35 ms

64 bytes from 192.168.0.254: icmp_seq=2036 ttl=64 time=1.69 ms

64 bytes from 192.168.0.254: icmp_seq=2037 ttl=64 time=2.22 ms

64 bytes from 192.168.0.254: icmp_seq=2038 ttl=64 time=1.82 ms

64 bytes from 192.168.0.254: icmp_seq=2043 ttl=64 time=3.18 ms

64 bytes from 192.168.0.254: icmp_seq=2044 ttl=64 time=1.56 ms

packets 2039 - 2042 missing when enabling the port

Measure the network timeout from your topology!

Back to the Schedule?

Back to the Course Schedule


License

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