Jeremy’s IT Lab lecture video:
Day 22 - Rapid Spanning Tree Protocol (3)
Commands
Commands List
Spanning Tree Show Commands
6. Spanning Tree
Link to original
- show spanning-tree
-->
Shows general STP status and information- show spanning-tree vlan vlan-id
-->
Shows spanning-tree information for a specific VLAN- show spanning-tree detail
-->
Shows detailed STP information- show spanning-tree summary
-->
Shows a summary of the current STP configurationSpanning Tree Interface Commands
Spanning Tree
1. General
- spanning-tree mode mode {mst
/
pvst/
rapid-pvst} (Versions)2. Spanning Tree Portfast / BPDU Guard
- spanning-tree portfast
-->
Enables portfast on the current interface.- spanning-tree portfast default
-->
Enables Portfast on all access ports by default.- spanning-tree bpduguard enable
-->
Enables BPDU Guard on the current interface.- spanning-tree portfast bpduguard default
-->
Enables BPDU Guard on all Portfast-enabled interfaces by default.3. Spanning Tree VLAN Related
- spanning-tree vlan vlan-id root primary
-->
Sets the STP bridge priority to 24576 (Or 4096 lower than the current lowest STP priority.)- spanning-tree vlan vlan-id root secondary
-->
Sets the STP bridge priority to 28672- spanning-tree vlan vlan-id cost number
-->
Changes the interface’s STP root cost- spanning-tree vlan vlan-id port-priority number
-->
Changes the interface’s port priority4. Spanning Tree Link Type
Link to original
- spanning-tree link-type type { point-to-point
/
shared }
Rapid Spanning Tree Information
The protocol version identifier for RSTP is 2
Spanning Tree Versions
Spanning Tree has industry-standard (IEEE) versions and Cisco proprietary versions.
- Industry Standards (IEEE)
- Spanning Tree Protocol (802.1D)
- The original STP.
- All VLANs share one STP instance. Therefore, cannot load balance.
- Rapid Spanning Tree Protocol (802.1w)
- Much faster at converging/adapting to network changes than 802.1D.
- All VLANs share one STP instance. Therefore, cannot load balance.
- Multiple Spanning Tree Protocol (802.1s)
- Uses modified RSTP mechanics.
- Can group multiple VLANs into different instances (ie. VLANs 1-5 in instance 1, VLANs 6-10 in instance 2) to perform load balancing.
- Spanning Tree Protocol (802.1D)
- Cisco proprietary
- Per-VLAN Spanning Tree Plus (PVST+)
- Cisco’s upgrade to 802.1D.
- Each VLAN has its own STP instance.
- Can load balance by blocking different ports in each VLAN.
- Rapid Per-VLAN Spanning Tree Plus (Rapid PVST+)
- Cisco’s upgrade to 802.1w
- Each VLAN has its own STP instance.
- Can load balance by blocking different ports in each VLAN.
- Per-VLAN Spanning Tree Plus (PVST+)
Similarities between STP and RSTP
- RSTP has the same purpose as STP.
- RSTP elects a root bridge with the same rules.
- RSTP elects root ports with the same rules.
- RSTP elects designated ports with the same rules.
RSTP Port States
- If a port is administratively disabled (with shutdown command), it’s in a discarding state.
- If a port is enabled, but blocking traffic to prevent Layer 2 loops, it’s in a discarding state.
RSTP Port Roles
- The root port role remains unchanged in RSTP.
- The designated port role remains unchanged in RSTP.
- The non-designated port is split into two separate roles in RSTP:
- Alternate port
- The alternate port role is a discarding port that receives a superior BPDU from another switch.
- It serves as a backup to the root port. If the root port fails, the switch can immediately change to its best alternate port to forwarding.
- Backup port
- The backup port is discarding port that receives a superior BPDU from another interface on the same switch. (This only happens when two interfaces are connected to the same collision domain through a hub)
- It serves as a backup to the designated port.
- The interface with the lowest Port ID will be selected as the designated port, and the other will be the backup port.
- Alternate port
RSTP New Built-in Functionalities
- UplinkFast
- When a root port goes down, the switch changes to the alternate port for forwarding. This feature is similar to the classic STP optional feature, UplinkFast.
- BackboneFast
- BackboneFast allows switches to expire the max age timer on interfaces and rapidly forward superior BPDUs to other switches.
RSTP BPDUs
In classic STP, only the root bridge sent BPDUs and other switches forwarded them. In RSTP, all switches running RSTP send their own BPDUs every hello time (2 seconds by default) from their designated ports.
- In classic STP, a switch waits 10 hello intervals (20 seconds) before considering a neighbor to be lost.
- In RSTP, a switch considers a neighbor lost if it misses 3 BPDUs (6 seconds). It will then flush all MAC addresses learned on that interface.
RSTP Link Types
There are 3 different link types:
- Edge
- A port that is connected to an end host. Moves directly to forwarding, without negotiation.
- Point-to-point
- Direct connection between two switches. Operates in full-duplex.
- Shared
- Connection to a hub. Must operate in half-duplex.