Basic Spanning-Tree Configuration

Default priority = 32,768
Lower priority is more desirable.

spanning-tree vlan 10 priority 0
spanning-tree vlan 11 priority 4096

spanning-tree vlan 10 priority 4096
spanning-tree vlan 11 priority 0

Set cost on incoming interface
int gi0/1
spanning-tree cost 20

Set port-priority on outgoing interface. Usually used when one switch has multiple links physically connected to another switch.
int gi0/1
spanning-tree port-priority 32

show spanning-tree root port
show spanning-tree vlan 10
show spanning-tree vlan 11
show spanning-tree int gi0/1 detail
show spanning-tree int gi0/1 portfast
spanning-tree pathcost method long
spanning-tree portfast bpduguard default

int gi1/0
spanning-tree portfast
spanning-tree bpduguard enable (disables port if it receives a bpdu)
errdisable recovery cause bpduguard
errdisable recovery interval 300
spanning-tree portfast trunk

Be the first to comment

Leave a Reply

Your email address will not be published.