What is PVST+ – Exclusive Explanation
The original IEEE 802.1D standard spanning tree protocol assumes only one spanning-tree instance for the entire switched network, regardless of the number of VLANs. A network running cannot ensure load balancing because one uplink must block for all VLANs but the CPU is free because there is only one instance of spanning tree working.
The PVST+ is the improved version of CST providing an independent instance of the Cisco implementation of IEEE 802.1D for each VLAN in the network. With PVST+, it is possible for one trunk port on a switch to forward the traffic for one VLAN while blocking the traffic of other VLAN.
PVST+ can be used for Layer 2 load balancing. It requires a larger CPU process in the switches. It also consumes more bandwidth for BPDU than a traditional CST implementation of STP because all VLAN runs a separate instance of STP.
In a PVST+ it is possible that half of the VLANs forward traffic on each uplink trunk which makes possible best load balancing. One spanning-tree instance for each VLAN means that each instance of the PVST + sends its own BPDU which consumes the CPU of the switch as well as the bandwidth. These drawbacks are problematic in case of a large number of VLANs in the network.
The figure below illustrates the PVST+. Port F0/0 on Switch-3 is the forwarding port for VLAN 100 and F0/1 on Switch-3 is the forwarding port for VLAN 200. This is done by configuring one switch-1 to be elected as the root bridge for VLAN-100 and switch-2 to be elected as the root bridge for VLAN-200. Multiple STP root bridges per VLAN increases redundancy in the network.
PVST+ Port States
Spanning tree protocol provides a logical loop-free path to the switched network. This is possible by using an exchange of information to determine the best path and block the alternate loop to avoid layer 2 loops. This is possible through the exchange of the BPDU frames between the interconnected switches. To make possible the learning of the spanning tree, each switch port transitions different five possible port states including three BPDU timers.
The spanning tree is starting automatically when a switch is complete boot process. The switch port goes through five different states to get information about full topology. If a switch port transitions directly from the blocking state to the forwarding state without getting information about the topology, the port can momentarily create a data loop. The five different port states are the following:-
Blocking
The port remains in the blocking state for 20 seconds during the election process. During the blocking state, the port cannot participate in frame forwarding. The port receives BPDU frames to decide the root bridge, the best path to the root bridge and port roles for each switch port in the final active STP topology.
During the blocking state, the port cannot receive and send frame forwarding. It discards the frame received from adjacent network switches. During the blocking state, the port only listening and check for BPDU frames.
Listening
The root port and designated port change states from blocking to listening. In the listening state, the port discards frames switched from other ports of the switch including a frame from the attached network for forwarding.
The switch port receives BPDU from other switches, transmits its own BPDU, and informs adjacent switches that the switch port is preparing to contribute in the active topology. The ports remain 15 seconds in the listening state and then move to learning state.
Learning
After the listening state, the switch moves to the learning state where the port prepares to participate in frame forwarding and begins to populate the MAC address table. In the state the port listening for and processing the BPDU frames.
The port receives the user frames, learns the frames and updates the MAC address table from the frame but cannot forward the frames to destination. The port remains 15 seconds in the learning state and moves to the forwarding state.
Forwarding
When the port status reached to forwarding state then it can send and receive traffic. The port is considered the part of the active network. It is the normal working state of the switch port.
Disabled
When the network administrator is down the switch port administratively, the switch port is disabled. The port does not participate in spanning tree and does not forward frames.
PVST+ operation for VLAN
The PVST+ performs the following four steps for each VLAN in a switched network. The steps for PVST+ operation are identical to CST
Elects one root bridge
The PVST+ elects the root bridge for the given VLAN. The root bridge selection criteria are the same as CST. The switch with the lowest bridge ID on the VLAN is selected as Root Bridge. All the ports of the root bridge are designated ports.
Selects the root port on each non-root bridge
Similarly to other spanning-tree protocol, the PVST+ also establishes one root port on each non-root bridge for each VLAN. The root port selection is based on the cost of the path. The port with the lowest-cost path from the non-root bridge to the root bridge is selected as the root port. Root ports are generally in the forwarding state.
Selects the designated port on each segment
PVST+ also establishes one designated port for each link on the VLAN. The designated port is elected on the switch with the lowest-cost path to the root bridge. Designated ports are in the forwarding state.
The remaining ports in the switched network are alternate ports
The alternate ports remain in the blocking state, to break logically the layer 2 loops. When a port is in the blocking state, it does not forward traffic, it only processes received BPDU messages in this status.
Verifying Different State
We can verify the different port state by using eh “show spanning-tree” command. We can also enter the “show spanning-tree summary” command