Switch – I have a single ethernet switch. Should I use spanning tree

redundancyspanning treeswitch

I have a single ethernet switch. Should I use spanning tree?

If there is a redundant link, definitely need to enable STP.
In a single switch, how is it possible to have a redundant link?
Any other possible scenarios?

Best Answer

To add to Zac67's and JFL's answers:

In case you decide to enable spanning-tree on the single switch, don't forget to configure the client's and server's switchports as Edge Ports (Cisco speak; spanning-tree portfast [trunk], spanning-tree portfast edge [trunk] or spanning-tree port type egde [trunk] , depending on platform and software generation).

This avoids having [edited after comment] STP's Listening and Learning phases on the switchport (15 sec each) or RSTP's Learning phase (sending 16 "proposals" every 2 seconds and waiting/timeouting for an "agreement"), after line protocol has come 'up'.

DHCP client software (and other things, too) on the end systems is usually not very happy with the ~30 seconds of silence after - from their point of view - the NIC's line protocol has come up. Usually, clients and servers and the software they run are not aware that it the takes the (portfast-less) switchport 30 seconds to go into forwarding mode.

In short: A sanely done STP configuration - even on a single switch - is a good safety net for your network. A badly executed STP configuration however (classic examples: Bridge priorities not set, "wild" topology with various/random link speeds, forgot portfast) can be worse than none.

EDIT:

To answer the second part of your question:

In a single switch, how is it possible to have a redundant link?

Yes, that's where "Link Aggregation", "Ethernet Trunking" (not be confused with VLAN trunking), "EtherChannel" or "PortChannel" (depending on how the vendor calls it) come into play.

It's the thing two devices with multiple Ethernet ports can do to consider a set of ports/links (usually 2-8) as one single logical link, in terms of addressing, presentation towards the upper layers in the network stack, but also in spanning-tree logic (in extenso: The virtual port aggregate becomes a single port, and VLAN, Spanning-Tree, and IP configuration elements are applied to the aggregate, not the member ports forming the aggregate). The protocol used to negotiate link aggregation is called LACP (Link Aggregation Control Protocol), the whole thing also known as IEEE 802.3ad.

LACP can provide some redundancy (even more so if the switch is a multichassis setup [1]), but also performance scaling, especially for inter-switch links, but also for attaching powerful servers to the network. When used as inter switch link, it can make sure that all links are being utilized, while none is being blocked by STP.

Keeping STP running as a safety net is even more recommended when LACP links are present.


[1] Cisco Catalyst StackWise, Cisco VSS and Cisco Nexus VPC, Juniper MC-MLAG, Arista MLAG, HP-Aruba Distributed Trunking etc.. most Vendors have something like this in their portfolio.
However, some of these may not fulfill the "single switch" premise you gave in your question. Not all of them tie multiple switches into "one single switch" in terms of configuration logic. StackWise does certainly, VSS does somewhat, VPC doesn't. I can't tell for the others.

Related Topic