Spanning tree Flashcards
Default STP port costs for the following speeds: 10M 100M 1G 10G
10M = 100 100M = 19 1G = 4 10G = 2
What are the 3 types of BPDUs?
Hello BPDU
CBDPU - Configuration BPDU
TCN BPDU - Topology Change Notification BPDU
Command to configure a static etherchannel
conf t
interface int
channel-group group number mode on
Command to show the status of an etherchannel
show etherchannel group number
What are the 2 protocols that can be used to create dynamic etherchannels?
PAgP
LACP
What does PAgP stand for?
Port Aggregation Protocol
What does LACP stand for?
Link Aggregation Control Protocol
What is the IEEE standard for PAgP and LACP?
PAgP is Cisco proprietary
LACP is 802.1ad
Syntax to enable PAgP on a interface
conf t
int gi1/0
channel-group group number mode {desirable | auto}
Syntax to enable LACP on a interface
conf t
int gi1/0
channel-group group number mode {active | passive}
In PAgP configurations, what does the keyword desirable tell the switch to do vs auto?
It tells the switch “use this protocol and begin negotiations”versus “use this protocol and wait for the other switch to begin negotiations.”
In LACP configurations, what does the keyword active tell the switch to do vs passive?
It tells the switch “use this protocol and begin negotiations”versus “use this protocol and wait for the other switch to begin negotiations.”
What happens with an etherchannel where both sides are set to either auto or passive?
It won’t come up, because both sides are waiting for the other to begin negotiations.
What is the IEEE standard for:
STP
PVST
RSTP
802.1D
Cisco Proprietary
802.1w
What does RSTP stand for?
Rapid Spanning Tree Protocol
What STP mode do Cisco switches generally default to?
802.1D with PVST
Command to set a switch to use PVST
spanning-tree mode pvst
What 3 fields make up the BID?
- Priority
- System ID Extension
- System ID
What is the range for priority?
0-65535
What is unusual about the priority value?
It’s in multiples of 4096.
What is the value of an all 1’s priority field?
61140
What are the values of each bit in the priority field?
32768 16384 8192 4096
What is normally stored in the System ID extension field?
VLAN ID
How many bits in the System ID extension field?
12
How many bits in the priority field?
4
How many bits in the System ID field?
6 bytes
Command to set the priority for a given VLAN
spanning-tree vlan vlan id priority priority
Command to set a port cost.
Conf t
interface gi1/0
spanning-tree [vlan vlan id] cost cost
What is the default BID priority?
32768
Is portfast or bpduguard enabled by default?
No
What are the 3 port types in STP?
- Root port
- Designated port
- Blocking port
What is a Designated port vs other port types?
The Designated Port is the one that advertises lowest-cost hello onto the LAN segment.
What 4 fields are shown in a “show mac address-table” output?
- VLAN
- MAC address
- Type (dynamic or static)
- Output port to get to that MAC
What does “show interfaces status” show us (7 fields)?
- Port
- Description
- Status (connect / notconnect/ disabled)
- VLAN
- Duplex
- Speed
- Type (10/100/1000 TX etc)
If a frame came into a switch and was either an unknown destination MAC or a broadcast mac, what ports would the switch forward it out of?
All forwarding ports for that VLAN, except the one on which it was received.
What makes a switch a designated switch for a given ethernet segment?
It’s the switch (and therefor the port) that is forwarding the root’s BPDU.
4 important fields in a Hello BPDU
- Root BID
- Sender’s BID
- Sender’s root cost
- Timers on the root switch
What are 3 of the timers on the root switch?
- Hello timer
- MaxAge timer
- Forward Delay timer
What is the most common type of BPDU?
Hello BPDU
What does STA stand for?
Spanning Tree Algorithm
What is the root cost in a BPDU received directly from the root bridge?
- The root bridge has a 0 cost to reach itself.
If a switch receives a BPDU with a root cost of 25 on a 1 gig port with default costing, what will it rewrite the root cost to be?
29
25 + 4 for the gig port
Which switch’s BID would win?
A: 32769:0200.0002.0002
B: 32769:0200.0003.0003
A, since it has the numerically lower System ID
If a switch is connected to a hub and hear’s it’s own BPDU’s on multiple ports, what are the other 2 tiebreaker values?
- Lowest interface STP priority
2. If all interfaces are the same priority, lowest interface number.
What 2 items will a non-root switch change before forwarding out the hello BPDU received from the root’s direction?
- Root cost
2. Sender ID
What is the default value of the 3 primary STP timers?
- Hello - 2 seconds
- MaxAge - 20 seconds
- Forward Delay - 15 seconds
What is the calculation to get the MaxAge time?
MaxAge = 10*(Hello timer)
What does the forward delay timer control?
How long a port will transition through Listening and Learning before going to Forwarding. Each phase will take (fwddelay value) seconds.
What does the MaxAge timer control?
How long a switch will wait for a Hello BPDU before declaring the neighbor down and sending out a TCN BPDU.
How many interfaces can be included in an Etherchannel?
Up to 8.
What does PortFast do?
Allows a port to go immediately into Forwarding, without the normal interim stages of Listening and Learning.
What kinds of ports must PortFast be restricted to?
Access ports facing stubs only, never anything that could be cabled up to form a loop.
What does BPDUguard do?
When a port has it configured, it will immediately become disabled if a BPDU is received on that port.
In RSTP, what is the blocking state called?
Discarding
What is STP’s convergence time vs RSTP?
STP - ~50 seconds
RSTP - max 10 seconds, usually much less
What does the command “spanning-tree vlan vlan-id root {primary | secondary}” do?
The switch on which this is configured will lower it’s own priority to beat out any other switch to become the root bridge.
Command to enable portfast on gi1/0.
conf t
int gi1/0
spanning-tree portfast
Command to enable BPDUguard on gi1/0
conf t
int gi1/0
spanning-tree bpduguard enable
Command to make a switch root or secondary root.
spanning-tree vlan vlan-id root {primary | secondary}
Command to see the root BID.
show spanning-tree [vlan vlan id]
Command to list the root switches for all vlans.
show spanning-tree root
Command to show the BID broken out into it’s component parts.
show spanning-tree vlan vlan id bridge
Command to debug STP
debug spanning-tree events
When using the root primary command, what is the value that the switch’s priority will be set to if the current root is at 32768?
24576
When using the root primary command, what is the value that the switch’s priority will be set to if the current root is less than 24576?
The highest multiple of 4096 that is still less than the priority of the current root.
What are the 3 port states of 802.1w?
- Learning
- Forwarding
- Discarding
2 commands to see if a switch is in PVST or RPVST mode
show spanning-tree
show spanning-tree summary
Command to set either PVST or RPVST
conf t
spanning-tree mode [pvst | rapid-pvst]
If a switch has a root port, is it the root switch?
No. The root switch only has designated ports.
How many root ports will a switch have?
1 per vlan
What are the stable states in STP?
- Forwarding
2. Blocking
What are the states in STP that only occur during convergence?
- Listening
2. Learning
What is used to create the BID?
2 byte priority field + 6 byte system ID (BIA)