2.6Configure, verify, and troubleshoot STP protocols featuring PVST

Good day and Welcome back mate! If you are kind of follower, hahahaha, you observed that I already moved to 2.7 discussing Portfast and BPDU guard but I decided to go back on this Per VLAN STP I watched an online video, it gives me deeper knowledge about PVST.

To those new readers, just be reminded that PVST is a variation of STP which is a cisco proprietary which means the protocol only runs with CISCO devices. What PVST offers compared to other STP protocols is that it offers load balancing specially if we only have access switches. The reason is that core switches are so expensive, the best switch suitable to be configured as the root bridge. With this PVST, we can balance the traffic because every switch on the network can be the root bridge designated to specific VLANs.

jjjjjjj

I have here a network diagram, I used show version command to know the mac addresses of every switch. Just looking at the MAC addresses, we can see that SW2 is the root bridge since it has the lowest MAC address. Be reminded that STP and PVST are enabled by default and that is the reason that fa 0/3 is on blocking state because SW1 is has the highest MAC address and has the highest cost going to the root bridge.

We can verify that using

show spanning-tree

222222.PNG

 

***********************************************************************

From the show commands above, you would see that it is correct that SW2 is the rot bridge when you the phrase ” This bridge is the root” just below the Root Bridge MAC address. Anyway, let me explain that what you see is the BPDU content. Remember BPDU content has:

1.Root Bridge ID – contains the priority, mac address and also STP timer

The priority you see is 32678 + the vlan id which is vlan 1 by default so the priority is 32769

2.Sender’s Bridge ID – Since it is the root bridge -the sender’s bridge ID details will be the same

3. STP timer- it was stated above that hello timer is 2 seconds by default and max age is 20 seconds. Listening and learning timer refers to forward delay

4. Port cost-

Interface Role Sts Cost Prio.Nbr Type

—————- —- — ——— ——– ——————————–

Fa0/2 Desg FWD 19 128.2 P2p

Fa0/4 Desg FWD 19 128.4 P2p

Port cost is 19 as you see above that is the port cost of fa 0/2 and fa 0/4 and it means that their speed is 100 Mbps. Since the switch is root bridge, both of the ports are designate port and the status is that it forwards frame.

333333

 

We move to SW3 and let’s just focus on the difference of SW2 and SW3 . SW3  ROOT Bridge ID is the MAC address of SW2 because that is the root bridge of the network. Sender’s Bridge ID of SW2 is the MAC address. You will also see the cost as the port cost of the root bridge.
Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Root FWD 19 128.4 P2p

It is very obvious on the network itself that since SW2 is the rootbridge that has has fa 0/4  which is the designated port connecting  another fa 0/4 of SW3, then we conclude that fa 0/4 is the root port.

1111111

And lastly, Root bridge ID will be the same for all switches but for SW1,  Sender’s Bridge ID will be the MAC address of SW1.
Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Fa0/2 Root FWD 19 128.2 P2p
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Altn BLK 19 128.3 P2p

This switch has contains all the port roles, alternate port—> the orange port which is expected to block frames. fa 0/2 is the root port as it opposes the fa 0/2 or the designated port of the SW2. Since SW1 has the highest MAC address, it is the switch that contains the  alternate block port.

Configure PVST

Let us be reminded that we configure PVST so that we designate different root bridge per VLAN for load balancing purposes.

So here is my goal or I’ll set the primary and secondary root for the following vlan:

PRIMARY ROOT BRIDGE
SW1 VLAN 5, 10
SW2  VLAN15
SW3 VLAN 20

SECONDARY ROOT BRIDGE
SW1 VLAN 15
SW2 VLAN 10,20
SW3 VLAN 5

It should be noted that secondary root bridge will take over the primary root bridge in the event of network failure. Let’s say for example for VLAN 15–> primary root bridge will be SW2 and in the event there is network failure, SW1 will be the root bridge.

If you wonder how it happens, the switches adjusts their priority ID.

For Primary root:

if priority > 24576, then set 24576
if priority < 24576, then set to highest multiple of 4096 that will make it a root bridge

For Secondary root:
set 28672, regardless of the original priority ID

We will discuss the priority ID soon as we got the configuration.

The syntax or configuration will as follows:

@ SW1
en
conf t
spanning-tree vlan 5,10 root primary
spanning-tree vlan 15 root secondary
exit
@sw2

en
conf t
spanning-tree vlan 15 root primary
spanning-tree vlan 10,20 root secondary
exit

@sw3

en
conf t
spanning-tree vlan 20 root primary
spanning-tree vlan 5 root secondary
exit

 

Before we verify, first implement vlan and trunk configuration on all interfaces.

You will see no spanning tree instance exists if you don’t do that , I encountered that and troubleshoot it before verification.

Let us try to verify:

Let’s try to check Switch 1 wherein we set

PRIMARY ROOT BRIDGE-SW1 VLAN 5, 10

SECONDARY ROOT BRIDGE-SW1 15

1a

Since both ports are designated so it is correct that it is the root bridge. We can also prove that since I told you earlier that if priority < 24576, then set to highest multiple of 4096 that will make it a root bridge. 24581- vlan#–> 5 divided by 4086 =6  So it is exact multiple of 4096

1b

Same scenario, we can see all port as designated and this is what we set as root bridge. We can prove that as well since 24586-10 divided by 4096 is 6. So it is multiple by 4096 then it is a root bridge for vlan 10.

3a

We set SW1 as secondary root for VLAN 15, and as you can see it has root and designated port and no blocking port it proves that it is the secondary root. Also,  I told you that secondary root priority is 28672 + vlan by default then  28672+15= 28687 and it is the priority of sender’s bridge ID.

Lastly, let us try to examine VLAN 15 primary root that we set which is SW2

xzzzzz

There is a note saying that this is the root bridge and both ports are designated. It only proves what we configure and also we can prove that using the priority ID which is 24591-15 divided by 4096 is 6. So it is a multiple of 4096 and is  a primary root that we set.

Gotta sleep now and thanks!

******************************End of Blog******************************

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s