58 terms

Spanning Tree Protocol

STUDY
PLAY
STP - Spanning Tree Protocol
Allows Ethernet LANs to have the added benefits of installing redundant links in a LAN, while overcoming the known problems that occur when adding those extra links. Limits where a switch chooses to forward frames, for the purpose of preventing problems with loops. Without STP a LAN with redundant links would cause Ethernet frames to loop for an indefinite period of time.
LAN switch logic
Receive the frame
Determine the VLAN
Match the destination MAC to the MAC table
Choose outgoing interface
Forward the frame.
Show MAC address-table dynamic
Command lists all dynamically learned MAC table entries on a switch, for all VLANs. STP will impact the set of ports on which a switch can learn MAC addresses, so STP indirectly changes what output shows up in the output of the show mac address-table command. STP will cause a port to block, meaning that the switch ignores frames entering the interface and the switch will not learn MAC addresses from those frames.
Show interfaces status
Command lists all switch interfaces and current status. Also list either the interface's VLAN, if operating as an access port, or it lists the fact that the port is working as a trunk.
Show VLAN brief
Command lists all VLANs with a matching list of all access ports assigned to each VLAN.
Show interfaces trunk
Command lists only currently operational trunks. Also lists the VLANs for which the switch currently forwards frames.
Broadcast Storm
One frame that loops around a network. Happens when broadcast frames, multicast frames, or unknown destination unicast frames loop around a LAN indefinitely.
Not using STP
Broadcast storms
MAC table instability
Multiple frame transmission
STP
Prevents loops by placing each switch port in either a forwarding state or blocking state. Interfaces in forwarding state act as normal. Blocking state do not process any frames except STP messages and some overhead messages, do not forward user frames, do not learn MAC addresses of received frames, and do not process received user frames.
STP convergence
The process by which the switches collectively realize that something has changed in the LAN topology and so the switches might need to change which ports block and which ports forward.
STA - Spanning tree algorithm
Criteria used:
STP elects a root switch. STP puts all working interfaces on the root switch in forwarding state.
Each nonroot switch considers one of its ports to have the least administrative cost between itself and the root switch.
STA
The cost is called that switch's root cost. STP places its port that is part of the least root cost path, called that switch's root port (RP), in forwarding state.
STA
Normally two switches connect to each link. The switch with the lowest root cost as compared with the other switches attached to the same link is placed in forwarding state. That switch is the designated switch and that switch's interface attached to that segment is called the designated port (DP).
STP Bridge ID
8 byte value unique to each switch. 2 byte priority field and a 6 byte system ID with system ID being based on a universal burned in MAC address in each switch.
BID - Bridge ID
Cisco switches let you configure the BID, but only the priority part. The only part configurable is the 4 bit priority field. The switch still sets the first 4 bits of the BID based on the configured value.
spanning-tree VLAN (VLAN ID) priority (value)
Command to enter priority and requires a decimal number between 0 and 65535. It must be a multiple of 4096.
spanning-tree VLAN cost
Command to configure a switch's STP port cost. You see this command most often on trunks because setting the cost on trunks has an impact on the switch's root cost whereas setting STP costs on access ports does not.
Bridge Protocol Data Units (BPDU)
STP switches uses to exchange info with each other. Most common called Hello BPDU.
Hello BPDU
Root bridge ID
Senders bridge ID
Senders root cost
Timer values on the root switch.
Root Switch
Switches elect a root switch based on the BIDs in the BPDUs. Lowest numeric value for the BID. The switch with lowest priority becomes the root. If a tie, lowest MAC address portion of BID is the root. Sends hello BPDU every 2 Seconds by default. Root switches do not have Root Ports!
Root Port (RP)
A switches RP is its interface through which it has the least STP cost to reach the root switch (least root cost).
Designated Port (DP)
The designated port on each LAN segment is the switch port that advertises the lowest cost hello onto a LAN segment. Switch with lowest cost to reach root switch. All DPs are placed into a forwarding state.
Influence STP topology
Override default BID setting to make a switch become root.
Change STP port costs
STP enabled
All working switch interfaces will settle into an STP forwarding or blocking state, even access ports.
STP timers
Hello - 2 seconds
MaxAge - 10 times hello (20 sec)
Forward delay - 15 seconds
STP
When a port that formally blocked needs to transition to forwarding, the switch first put the port through 2 intermediate interface states:
Listening
Learning
EtherChannel
Provides a way to prevent STP convergence from being needed when only a single port or cable failure occurs. Combines multiple parallel segments of equal speed (up to 8) between the same pair of switches bundled into an EtherChannel.
PVST - per vlan standard tree protocol
PVST Plus (PVST+) is the default setting on all
Cisco Catalyst switches.
In a PV T+ environment, you can tune the
spanning-tree parameters so that half the VLANs
forward on each uplink trunk.
You do this by configuring one switch to be
elected the root bridge for half of the VLANs in
the network and a second switch to be elected
the root bridge for the other half of the VLANs.
PortFast
Allows a switch to immediately transition from blocking to forwarding bypassing listening and learning states. No bridges, switches or other STP speaking devices on those ports. Most appropriate for connections to end user devices.
BPDU guard
Feature disables a port if any BPDUs are received on the port. Useful on ports that should be used only as an access port and never connected to another switch. Also helps prevent problems with PorttFast.
Rapid STP
Better convergence time than STP. 10 seconds vs 50 seconds for STP. 802.1w
Per-VLAN Spanning Tree Plus - PVST+ or PVSTP
CISCO proprietary improvement of 802.1D STP. PVST+ creates a different STP topology per VLAN. PVST+ also introduced PortFast. Gives engineers a load balancing tool with STP.
Rapid PVST+ or RPVST+
Another Cisco proprietary improvement. PVST Plus (PVST+) is the default setting on all Cisco Catalyst switches. In a PVST+ environment, you can tune the spanning-tree parameters so that half the VLANs forward on each uplink trunk. You do this by configuring one switch to be elected the root bridge for half of the VLANs in
the network and a second switch to be elected the root bridge for the other half of the VLANs.
spanning-tree mode pvst
Global command
spanning-tree mode rapid-pvst
Global command
spanning-tree mode mst
Multiple spanning tree global command
STP defaults - BID priority
Base 32,768
spanning-tree vlan root
spanning-tree vlan priority
Interface cost
100 for 10 Mbps
19 for 100 Mbps
4 for 1 gbps
2 for 10 gbps
spanning-tree vlan cost
PortFast
Not enabled
spanning-tree portfast
BPDU Guard
Not enabled
spanning-tree bpduguard enable
Show spanning-tree vlan 10
Command identifies the root switch and lists settings on the local switch.
Show spanning-tree root
Command lists the root's BID for each VLAN and also the local switch's root cost and root port.
Show spanning-tree vlan 10 bridge
Command breaks out the BID into its component parts.
Spanning-tree VLAN id cost
Command changes STP port costs. Interface subcommand.
Spanning-tree VLAN id priority value
Command to change the STP priority of a switch. Requires a multiple of 4096.
Spanning-tree VLAN id root primary
Command tells the switch to se its priority low enough to become root right now
Spanning-tree VLAN id secondary
Command tells switch to allocate vlan if primary VLAN fails. Sets the switch base priority to 28,672 regardless of the current root's current priority value.
Configuring PortFast and BPDU
Spanning-tree PortFast
Spanning-tree bpduguard enable
Spanning-tree PortFast default
Spanning-tree PortFast bpduguard default
Spanning-tree PortFast disable
Spanning-tree bpduguard disable
Configuring a manual EtherChannel
Simplest way to configure an EtherChannel is to add the correct channel-group config command to each physical interface, on each switch, all with the on keyword. The on keyword tells the switches to place a physical interface into an EtherChannel.
EtherChannel
PortChannel
Channel-group
IOS uses the channel-group config command but to display status, IOS uses show ether-channel command and output refers to port channel.
Channel-group 1 mode on
Interface sub command to manually configure EtherChannel. To display use the show EtherChannel command.
show EtherChannel 1 summary
Command shows ports included within channel.
show EtherChannel 1 summary
...
Port aggregation protocol (PAgP)
Cisco proprietary protocol for EtherChannel. Uses channel group command. Negotiate so that only links that pass the configuration checks are actually used in an EtherChannel. Desirable and Auto keywords enable PAgP.
Link Aggregation Control Protocol (LACP)
IEEE standard 802.3ad for EtherChannel. Uses channel group command. Active and passive keywords enable LACP.
Data plane
Refers to actions devices take to forward data.
Control plane
Refers to the overhead processes that control the work done by the network device, but does not directly impact the forwarding of individual frames or packets. CDP, STP and any IP routing protocol are examples.
PING
Packet Internet groper. Tests connectivity by sending packets to an IP address, expecting the device at that address to send packets back. Uses ICMP Echo request and echo reply messages.
YOU MIGHT ALSO LIKE...