Lab - 5: Spanning Tree Protocol

Objectives

  1. Make observation of a network’s bridge port STP status when there are loops in the network graph

  2. Determination of layer 2 paths based on the STP port status of bridge ports for various end point pairs and topologies

  3. Observation of failover scenarios: what is the resulting spanning tree when a port is down?

Load Lab Network

In your lab notebook, execute:

%load_ext uhed
%lab

In order to conduct this lab, we have prepared two different topologies. From the drowdown menu please pick the topologies for this lab in the order presented below and click on the Build Network button.

Topology Orientation

Observation Plan and Environment

In this lab, you will be building and making observations on two different topologies. Each topology display and bridge STP state observations will help illustrate the role of the spanning tree protocol in a network.

  • STP Topology A: examine STP state of bridge ports and determine the path of a packet

  • STP Topology B: make observations on STP failover to other existing layer 2 paths when a port on a bridge encounters a failure (submit homework using this topology)

STP Topology A

Make observations on port STP status of bridge ports. Let’s have a look at the topology A prepared for this lab:

_images/stpTopoB.png

After building your network, you will be able to retrieve the port STP information on each bridge. When you run the command, NET[<bridge-name>].getSTPInfo() in a cell, a table will load with information on the bridge as a whole (bridge ID, the root bridge ID and a root path hop count) followed by per port STP state information on each row.

_images/topoBgeneralSTP.png

The bridge port STP states are listed in the second column of the tabular list. You will notice that the two main states are the forwarding and blocking states.

Note

The display of the topology has been rendered using the circo engine:

NET.showTopo("circo")
  • What layer 2 path does it seem like the packets from hostA will take when they are destined to hostB? Is it the following?

    hostA \rightarrow bridge1 \rightarrow bridge3 \rightarrow hostB

  • Let’s examine the port STP status to determine whether such an assumption is correct.

Note

Bridge Port STP State

Every time you build the lab network, the bridge states may differ (and, they may be different from the states shown in these documents).

Retrieve the STP state information for the bridge1. The port number 1 is blocking.

_images/stpTopoBBridge1Info.png

Overlaying the port STP status on the network diagram shows what forwarding behavior to expect on each of the ports of this bridge:

_images/topoBbridge1stp.png

The diagram illustrates how this bridge will not forward any packets to its port number 1.

Retrieve the STP state for bridge2 ports:

_images/stpTopoBBridge2Info.png

Overlaying this information on the topology:

_images/topoBbridge2stp.png

Since all ports of bridge2 are in forwarding state, packets will be forwarded to the bridge1 port 1 even though that’s a blocking port. When packets arrive at bridge1 port number 1, there will be no action taken on them. That is, no MAC learning will take place and the packet will not be forwarded. This is a receive and ignore action by the bridge.

Retrieve the STP state for bridge4 ports:

_images/stpTopoBBridge4Info.png

Overlaying this information over the topology:

_images/topoBbridge4stp.png

Finally, retrieve the STP state for bridge3 ports:

_images/stpTopoBBridge3Info.png

Overlaying this information over the topology shows how bridge3 ports 1 and 2 are also blocking.

_images/topoBbridge3stp.png

The forwarding information displayed in the overlay above shows how a broadcast packet will travel in this network.

A packet from hostA to hostB or vice versa will be on the path displayed below:

_images/topoBpaths.png

STP Topology B

Examine the failover scenarios for the given topology B.

Building and Deleting Networks

After you have completed your observations on the STP Topology A, please delete the resources of that network by running %delete. You can then run %lab in a cell to build STP Topology B.

You can only have one lab network built at a time.

Here is the topology B for this phase of the lab.

_images/stpTopoD.png

The bridge port STP status for each bridge is shown below.

Note

Bridge Port STP State

Every time you build the lab network, the bridge states may differ (and, they may be different from the states shown in these documents).

_images/topoDstpoverlay.png

What is the path of a packet that originates at host3 and is destined to host4?

Pick a port that currently has a port STP status forwarding and disable it. For example:

NET["bridge2"][2].setDown()

When the port 2 on bridge2 goes down, the link of that port will no longer be active and therefore, the other port (port 1 on bridge3) on that link will also be disabled.

_images/topoDdisabledlink.png

What is the path of a packet that originates at host3 and is destined to host4 now? What is the path of a packet that is destined to host2? Answer these questions on your own by examining the port STP status of the bridges in your network.

Note

Observation portion of the lab is now complete. Please examine the practice and exercise homework portion at the end of this document for the next lab tasks.

Learning Activities

Step 1 – General Activity

Follow the process outlined above to make your observations over the Spanning Tree Protocol impact on topology state and the resulting forwarding behavior.

Here are some questions to guide your learning:

  1. What are the implications of choosing one particular spanning tree over another one?

  2. Is there a best spanning tree? If yes, what constraint drives one option over another?

  3. What happens to the physical links that become blocked by STP?

  4. What bandwidth utilization do you expect for different choices of spanning trees?

  5. Do you expect a failure that has happened on a previously blocking port to change the existing spanning tree of a topology?

Step 2 – Lab Homework Requirements

Important

You must have a lab topology built at the time you submit this homework. Do not delete your topology until after you submit.

2a. Build STP Topology-B and determine the spanning tree created after the protocol converges. Wait for a few minutes and retrieve port STP status tables for the bridges. Upon examination, all bridge STP tables should have an entry that is either forwarding or blocking listed in the port status column.

2b. Identify a link in the spanning tree graph that is forwarding packets on both ports. Disable one of the forwarding ports using the command below:

NET[<bridge-label>][<port-label>].setDown()

2c. Wait until STP state converges and observe STP reconfiguring to a new spanning tree by examining the bridge STP state tables. Use the command:

NET[<bridge-label>].getSTPInfo()

to retrieve individual STP status tables for bridge ports.

2d. In your lab notebook, run:

%homework

in a cell and complete the submission.

Caution

You only have one submission attempt available to you.

_images/lab03hwprompt.png

Lab Wrap-up

Please follow the instructions to delete your reserved topology and then close and halt your lab notebook and any open terminals on the lab service.