In a previous lesson I explained the differences between classic and rapid spanning-tree and how rapid spanning-tree works. If you haven’t seen it before, I would recommend to look at it first before diving in the configuration.
Having said that, let’s look at the configuration. This is the topology that I will use:
This is the topology I’m going to use. SW1 will be the root bridge in my example. First we have to enable rapid spanning-tree:
SW1(config)#spanning-tree mode rapid-pvst
SW2(config)#spanning-tree mode rapid-pvst
SW3(config)#spanning-tree mode rapid-pvst
That’s it…just one command will enable rapid spanning tree on our switches. The implementation of rapid spanning tree is rapid-pvst. We are calculating a rapid spanning tree for each VLAN.
First I want to show you the sync mechanism:
SW1(config)#interface fa0/14
SW1(config-if)#shutdown
SW1(config)#interface f0/17
SW1(config-if)#shutdown
I’m going to shut both interfaces on SW1 to start with.
SW1#debug spanning-tree events
Spanning Tree event debugging is on
SW2#debug spanning-tree events
Spanning Tree event debugging is on
SW3#debug spanning-tree events
Spanning Tree event debugging is on
Second step is to enable debug on all the switches.
SW1(config)#interface fa0/14
SW1(config-if)#no shutdown
I’m going to bring the fa0/14 interface back to the land of the living on SW1. Here’s what we see:
SW1#
setting bridge id (which=3) prio 4097 prio cfg 4096 sysid 1 (on) id 1001.0011.bb0b.3600
RSTP(1): initializing port Fa0/14
RSTP(1): Fa0/14 is now designated
RSTP(1): transmitting a proposal on Fa0/14
The fa0/14 interface on SW1 will be blocked and it’ll send a proposal to SW2.
SW2#
RSTP(1): initializing port Fa0/14
RSTP(1): Fa0/14 is now designated
RSTP(1): transmitting a proposal on Fa0/14
RSTP(1): updt roles, received superior bpdu on Fa0/14
RSTP(1): Fa0/14 is now root port
Apparently SW2 thought it was the root bridge because it says it received a superior BPDU on its fa0/14 interface. It changes its fa0/14 interface to root port.
SW2# RSTP(1): syncing port Fa0/16
The fa0/16 interface on SW2 will go into sync mode. This is the interface that connects to SW3.
SW2# RSTP(1): synced Fa0/14
RSTP(1): transmitting an agreement on Fa0/14 as a response to a proposal
SW2 will respond to SW1 its proposal by sending an agreement.
SW1# RSTP(1): received an agreement on Fa0/14
%LINK-3-UPDOWN: Interface FastEthernet0/14, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to up
SW1 receives the agreement from SW2 and interface fa0/14 will go into forwarding.
SW2# RSTP(1): transmitting a proposal on Fa0/16
SW2 will send a proposal to SW3.
SW3# RSTP(1): transmitting an agreement on Fa0/16 as a response to a proposal
SW3 will respond to the proposal of SW2 and send an agreement.
SW2# RSTP(1): received an agreement on Fa0/16
%LINK-3-UPDOWN: Interface FastEthernet0/14, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to up
SW2 receives the agreement from SW3 and the interface will go into forwarding. That’s all there to is it…a quick number of handshakes and the interfaces will move to forwarding without the use of any timers. Let’s continue!
SW1(config)#interface fa0/17
SW1(config-if)#no shutdown
I’m going to enable this interface so that connectivity is fully restored. Let’s look at an overview:
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 4097
Address 0011.bb0b.3600
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address 0011.bb0b.3600
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/14 Desg FWD 19 128.16 P2p
Fa0/17 Desg FWD 19 128.19 P2p
We can verify that SW1 is the root bridge. This show command also reveals that we are running rapid spanning tree. Note that the link type is p2p. This is because my FastEthernet interfaces are in full duplex by default. Let’s run the same command on the other two switches:
SW2#show spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 4097
Address 0011.bb0b.3600
Cost 19
Port 16 (FastEthernet0/14)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 8193 (priority 8192 sys-id-ext 1)
Address 0019.569d.5700
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/14 Root FWD 19 128.16 P2p
Fa0/16 Desg FWD 19 128.18 P2p
SW3#show spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 4097
Address 0011.bb0b.3600
Cost 19
Port 14 (FastEthernet0/14)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000f.34ca.1000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/14 Root FWD 19 128.14 P2p
Fa0/16 Altn BLK 19 128.16 P2p
Here are SW2 and SW3. Nothing new here, it’s the same information as classic spanning tree. Here’s what the topology looks like now:
Let’s add another link between SW2 and SW3 to see if this influences our topology:
SW2#show spanning-tree | begin Interface
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/14 Root FWD 19 128.16 P2p
Fa0/16 Desg FWD 19 128.18 P2p
Fa0/17 Desg FWD 19 128.19 P2p
SW3#show spanning-tree | begin Interface
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/14 Root FWD 19 128.14 P2p
Fa0/16 Altn BLK 19 128.16 P2p
Fa0/17 Altn BLK 19 128.17 P2p
Nothing spectacular, we just have another designated port on SW2 and another alternate port on SW3. Let me add that alternate port to the topology:
So far the topology with rapid spanning-tree looks the same as with classic spanning-tree. Now let me show you something you haven’t seen before. I will add a hub between SW2 and SW3:
Now take a look again at the interfaces:
SW2#show spanning-tree | begin Interface
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/14 Root FWD 19 128.5 P2p
Fa0/16 Desg FWD 100 128.3 Shr
Fa0/17 Back BLK 100 128.4 Shr
SW3#show spanning-tree | begin Interface
Interface Role Sts Cost Prio.Nbr Type
--------- -------- --------------------------------
Fa0/14 Root FWD 19 128.5 P2p
Fa0/16 Altn BLK 100 128.3 Shr
Fa0/17 Altn BLK 100 128.4 Shr
Here’s something new. SW2 has a backup port. Because of the hub in the middle SW2 and SW3 will hear their own BPDUs.
You can also see that the link type is shr (shared). That’s because the hub causes these switches to switch their interfaces to half duplex. Here’s the topology picture again:
You probably won’t ever see the backup port on a production network since hubs are scarce now but if you see it, you’ll know why…
BPDUs are sent every two seconds (hello time) and if you want to prove this you can take a look at a debug:
SW2#debug spanning-tree bpdu
You can use the debug spanning-tree bpdu command to view BPDUs are are sent or received.
SW2#
STP: VLAN0001 rx BPDU: config protocol = rstp, packet from FastEthernet0/14 , linktype IEEE_SPANNING , enctype 2, encsize 17
STP: enc 01 80 C2 00 00 00 00 11 BB 0B 36 10 00 27 42 42 03
STP: Data 000002023C10010011BB0B36000000000010010011BB0B360080100000140002000F00
STP: VLAN0001 Fa0/14:0000 02 02 3C 10010011BB0B3600 00000000 10010011BB0B3600 8010 0000 1400 0200 0F00
RSTP(1): Fa0/14 repeated msg
RSTP(1): Fa0/14 rcvd info remaining 6
RSTP(1): sending BPDU out Fa0/16
RSTP(1): sending BPDU out Fa0/17
STP: VLAN0001 rx BPDU: config protocol = rstp, packet f
You will see the contents of the BPDU like above. It’s not very useful if you want to see the content of the BPDU but it does show us that SW2 is receiving BPDUs and sending them on its interfaces.
If you do want to look at the contents of a BPDU I recommend you to use wireshark. It shows everything in a nice structured way.
You don’t have to capture a BPDU yourself if you don’t feel like. The wireshark website has many pre-recorded packet captures.
Let’s get rid of the hub and do something else…I’m going to simulate a link failure between SW1 and SW3 to see how rapid spanning tree deals with this.
SW1(config)#interface fa0/17
SW1(config-if)#shutdown
First I’m going to shut the fa0/17 interface on SW1.
SW3#
RSTP(1): updt rolesroot port Fa0/14 is going down
RSTP(1): Fa0/16 is now root port
SW3 realized something is wrong with the root port almost immediately and will change the fa0/16 interface from alternate port to root port. This is the equivalent of UplinkFast for classic spanning tree but it’s enabled by default for rapid spanning tree.
Rene,
Hi. In the last part of the lesson you convert switch B to PVST mode - what is the impact to the network - does computer A lose connectivity to the rest of the network outside of switch B for 30 seconds? What about if there was a host connected off of switch A and another host connected off switch B - they would still continue to communicate throughout the change of switch B to PVST mode?
Many thanks,
Thomas
Sorry, Shanmugasiva,
I am not understanding what you are asking. Could you ask this another way?
If you are asking what this message means, I can try to help.
setting bridge id (which=3) prio 4097 prio cfg 4096 sysid 1 (on) id 1001.0011.bb0b.3600
“cfg 4096”
This means you set (either via spanning-tree vlan 1 4096, or spanning-tree vlan 1 root primary). This is what it means when it says “prio cfg 4096”–the vlan was configured to be priority 4096.
“prio 4097”
... Continue reading in our forumHowever, the actual priority is the configured priority + vlan number. So, in this case, the actual p
Hello Rene,
... Continue reading in our forumI have configured a lab connecting three switches on gns3 (SW1,SW2 and SW3). SW1 is the Root switch. They are connected like this:
SW1(e1/3-DP)>>>SW2(e1/3-RP)
SW1(e3/0-DP)>>>SW3(e3/2-RP)
SW2(e3/0-DP)>>>SW3(e3/3-ALT/BLK)
The issue is that as soon as i admin down the port on SW3(e3/2-RP), the other port e3/3 becomes the new RP. This is expected. But when i bring back the port up on SW3(e3/2), the port doesn’t becomes automatically RP again, because its far end device port SW1 (e3/0) is going into err-disabled state, essentially the moment that i admin
Ok i think i have found the issue here. I have configured udld mode aggressive on all the ports. So that is why when i admin down the port on SW3(e3/2-RP), the Root switch port SW1 (e3/0) goes into err-disable state! Since Root Switch port e3/0 will not receive any traffic, it goes into err-disable state. Finally, i just needed to bounce it, to work as before.
Also, when i tried to admin down the port on the Root Switch (SW1-e3/0) i noticed that the far end port doesn’t go to the error-disable state, even though the far end port (SW3-e3/2) is configured with ud
... Continue reading in our forumHello Bernard
Unfortunately, Packet Tracer doesn’t support all of the commands and features available on real Cisco devices. This is one example of unsupported commands. Alternatively, you can use the GNS3 emulator which includes all of the commands available in a particular IOS image, or a choice of several other emulators including Cisco CML. More info on these can be found at the following lesson. The lesson may refer to CCIE, but the same applies for all Cisco certifications:
https://networklessons.com/cisco/ccie-routing-switching/ccie-rs-lab-equipment
... Continue reading in our forum