Spanning tree configuration for Cisco switches
From Notes_Wiki
Spanning-tree configuration for cisco switches
- Configure layer 3 switches as STP root
- Go to global configuration mode and use 'spanning-tree vlan <vlan_id> root primary'. Do this only for VLANs created in that switch (That is VLANs shown when you use 'show run')
- Configure user ports on 2912-2924 switch with portfast and bpdufilter
- Use following commands for each interface
- 'spanning-tree portfast'
- 'spanning-tree bpdufilter enable'
- Configure user ports on 2950+ switches with portfast, bpdufilter and bpduguard
- 'spanning-tree portfast'
- 'spanning-tree bpdufilter enable'
- 'spanning-tree bpduguard enable'
- Configure 2950+ switches to automatically recover from bpduguard after some fixed interval. That is, in global configuration mode use
- 'errdisable detect cause bpduguard'
- 'errdisable recovery interval 300'
- (Note: By default settings are same as being configured by above lines. Hence above lines will not appear in 'show run')
Note: Here by user ports we mean all ports in access mode.