Cisco switches do this automatically for new VLANs when you have exceeded the platform's maximum spanning-tree instance limit. With Cisco PVST+, the switch will run one spanning-tree instance on each VLAN on each active interface.
If you do a show spanning-tree summary
at the CLI, you will likely find that the STP Active count will be at or near 128 or 256 for the platforms you mention (depending on platform, older platforms may be lower).
To reduce the number of active spanning-tree instances, you have a several options:
- If your switches are all Cisco and running in VTP server or client mode, then you can enable VLAN pruning on the VTP server(s) with the
vtp pruning
command. This will prune unnecessary VLANs from your trunk links automatically.
- If any of your switches are in VTP transparent mode or you use multiple vendors, you may need to manually prune unnecessary VLANs by using
switchport trunk allowed vlan <VLAN list>
command to the trunk interfaces.
- Reduce the number of active trunk ports or access ports. Trunk ports will make the largest difference. For instance, if you have multiple trunk ports between the same two switches, converting them to a single link aggregation group will reduce the number of logical connections.
- Remove unnecessary VLANs. Maybe you have some old unused VLANs that are no longer needed? Remove them.