PVST (Per Vlan Spanning Tree)


Scenario:

For this lab you need REAL hardware. You can’t use switches in GNS3!

You need at least Catalyst 2950 switches for this lab.

You are the network engineer for a company in Florida that is specialized in campus LAN designs. One of your customers is having issues with their network and it seems their spanning-tree topology has been misconfigured. The network has a number of non-Cisco devices so you need to run an IEEE version of spanning-tree.

Goal:

  • Ensure all switches run PVST (default on most Cisco switches).
  • Create VLAN 10,20 and 30 on all switches.
  • Ensure SW1 is the root bridge for VLAN 10.
  • Ensure SW2 is the root bridge for VLAN 20.
  • Ensure SW3 is the root bridge for VLAN 30.
  • Ensure SW2 prefers the path through SW3 to reach the root bridge in VLAN 10. You are only allowed to change the cost.
  • Ensure SW3 prefers interface fa0/14 to reach the root bridge for VLAN 10. You are only allowed to change the port priority.
  • Ensure BPDUs are sent every second for VLAN 20.
  • Ensure the switches detect a problem in VLAN 30 after 6 seconds of not receiving BPDUs.

IOS:

Basic IOS for the switches should be sufficient. No special features needed.

Topology:

Per VLAN Spanning Tree PVST

Video Solution:

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

15 Comments

  1. If you have connected the interfaces SW1 to SW3 like in the picture then at Switch 3 port f0/14 will be the Des FW and NOT f0/13 for VLAN 10

    Probably you had connected
    SW1 f0/16 –> SW2 f0/13
    SW1 f0/17 –> SW2 f0/14

    and like in the picture:
    SW1 f0/16 –> SW2 f0/14
    SW1 f0/17 –> SW2 f0/13

    As I understood correctly when selecting root port the Switch checks the Sender(Sw!) port priority to decide.

    Do you agree with this?

    BR. Marco

    1. It is my understanding that all spanning tree timers do indeed have to be set on the root, how do you explain this anomaly in your video, it puzzled me somewhat

  2. Hello , I have a question about the priority change you have made on the root bridge in order to change the RP on SW 3 for vlan 10.Why the change was made on root bridge .? the election of the root port on a switch if the path cost to the root bridge are identical is not tied by the port priotity on the local switch?

    thanks

  3. there is a mistake in the video solution for question on stp priority.
    rene says f0/14 becomes root port on SW3 after priority of f0/16 on SW1 is set higher.
    this should be the other way around,
    the root port on SW3 should be selected based on the rule : select the local port which receives the lowest port Spanning Tree Port Priority value from neighbor Switch as the Root Port.

    http://www.omnisecu.com/cisco-certified-network-associate-ccna/how-spanning-tree-protocol-stp-select-root-port.php

  4. In the depicted topology, with everything set to default, the fa0/14 on SW3 will be the Root port, because the decision is made on RECEIVED port ID (aka the designated port ID), if the Costs and Bridge IDs tie. So, since both links from SW3 are connected to the same SW1 upstream neighbor and have the same costs, the Root port will be elected based on received Port IDs (port ID consists of priority + port number). The SW3 hears 128.16 on local port fa0/14, and 128.17 on local port fa0/13. Since 128.16 is lower than 128.17, the local port fa0/14 will be the Root one.

    So, once again:
    The Root port is selected based on the lowest path cost to the root bridge. If there is a tie on cost, then the Root port will be the local port that receives the lowest bridge ID from a neighbor. If there is still a tie, the Root port will be the one, that hears (receives) the lowest port-priority (the neighbor’s port priority).

    1. Last line of the comment should read ‘port ID’ instead of ‘port-priority’ for both matches.

    2. Alex, thanks for the comment, you are correct. I removed the first sentence of your comment as it set a rather negative tone for your otherwise excellent post.

      1. And what was negative? O_o Did you hear my real tone? 🙂 Sorry, but I assume, you took it your way, man 😉

        BTW, Rene could’ve already answered to other posts, confirming, that he was wrong 🙂

        Cheers.

  5. Question:
    Why do you check the propagation of Hello Time under Root section, while you expect the max-age to be changed under Bridge section in the ‘sh spann’ command output? Because, if you look at the Bridge section, you’ll find, that none of the parameters where actually propagated. So, you need to configure both hello time and max-age on ALL the switches.

    1. I’m not sure what I did / said in a video I recorded over 2 years ago but since it has some errors, I’ll re-record it. Thanks for your comments 🙂

    2. Alex, I believe that configuring any of the STP timers on the root bridge is all that matters for a given VLAN. The only time the local hello time matters is during a topology change event, as TCNs are flooded towards the root using the locally configured hello timer. Are you seeing something different?

      EDIT: I just did a quick setup. Note that if the port is not yet in FWD state, the timers are not updated. Once the port goes into FWD, it appears that the non-root bridges inherit the root bridges timers, as they should. I set some random values on the root to illustrate the difference. Version below.

      Router#sh ver | i IOS
      Cisco IOS Software, 3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T7, RELEASE SOFTWARE (fc3)

      Router#sh sp vl 20 br

      VLAN20
      Spanning tree enabled protocol ieee
      Root ID Priority 32768
      Address c200.0324.0000
      Cost 19
      Port 42 (FastEthernet1/1)
      Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

      Bridge ID Priority 32768
      Address c201.0324.0000
      Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
      Aging Time 300

      Interface Designated
      Name Port ID Prio Cost Sts Cost Bridge ID Port ID
      ——————– ——- —- —– — —– ——————– ——-
      FastEthernet1/1 128.42 128 19 LIS 0 32768 c200.0324.0000 128.42

      Router#sh sp vl 20 br

      VLAN20
      Spanning tree enabled protocol ieee
      Root ID Priority 0
      Address c200.0324.0000
      Cost 19
      Port 42 (FastEthernet1/1)
      Hello Time 7 sec Max Age 34 sec Forward Delay 14 sec

      Bridge ID Priority 32768
      Address c201.0324.0000
      Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
      Aging Time 300

      Interface Designated
      Name Port ID Prio Cost Sts Cost Bridge ID Port ID
      ——————– ——- —- —– — —– ——————– ——-
      FastEthernet1/1 128.42 128 19 FWD 0 0 c200.0324.0000 128.42

  6. I’ve changed port-priority in port FA0/2, but It’s still in BLK state. BID and cost are the same, port-priority is the tiebreaker. I don’t know why don’t change to FWD state.
    SW3#sh cdp n | inc SW1
    SW1 Fas 0/1 137 S I WS-C3550-2Fas 0/1
    SW1 Fas 0/2 137 S I WS-C3550-2Fas 0/2
    SW3#
    SW3#
    SW3#sh spanning-tree vlan 10 | inc Fa0
    Fa0/1 Root FWD 19 128.1 P2p
    Fa0/2 Altn BLK 19 16.2 P2p
    Fa0/5 Desg FWD 19 128.5 P2p
    Fa0/6 Desg FWD 19 128.6 P2p
    SW3#

Comments are closed.