0

I have a network architecture where each of my N switches is connected to two others, making it a perfect loop. For example see the diagram below:

enter image description here

I know that in order to avoid broadcast storms, I should enable STP/RSTP on my switches. However, it is difficult for me to enable it on all switches in my architecture as they do not all support it.

Am I able to only enable STP on a single switch in this case? In the case of the diagram, on switch A. I would like the network to function without issue and for it to be resilient to any one link going down. I am not so concerned about a loss in performance. If a switch needs to send packets across more hops than it really needs to, that is ok.

6
  • 2
    You need to be more specific in the type and model of switches you're using. There's a big difference in switches not supporting STP and filtering it, and switches not supporting it and propagating it. In any way, doing such a setup with switches unable to do loop prevention sounds like asking for problems to me.
    – Teun Vink
    Apr 21, 2020 at 12:17
  • Thanks @TeunVink. My (admittedly naive) thinking was that as long as one switch supported STP, it would be able to make the ring function by disabling a single port at a time. So that the ring becomes a chain. Would this not work?
    – JimR
    Apr 21, 2020 at 12:30
  • To answer your question, the switches that do not support STP are KSZ8794 chips without a processor connected. They will pass STP packets, but do not have any thing running on the processor to support sending/receiving STP packets themselves. The switch that does support STP (switch A) is yet to be determined, but will be an enterprise switch that has RSTP.
    – JimR
    Apr 21, 2020 at 12:38
  • 2
    This is a terrible design. Just don't.
    – JFL
    Apr 21, 2020 at 13:18
  • 3
    Never, ever do that. You should pick a root bridge and a secondary root bridge, then connect each access switch to both. Think Trees, not loops.
    – Ron Maupin
    Apr 21, 2020 at 13:25

2 Answers 2

7

Generally, a ring is a bad design for Ethernet switches. STP blocks one of the ring links, forming a chain. Traffic between switches on opposite sides need to cross the whole chain, potentially causing link congestion. In your diagram with A being the root switch, C-to-D traffic would require four L2 hops.

With 802.1D-compliant switches/bridges, STP BPDUs are transmitted between any two link partners. Each switch needs to make an informed decision which ports are redundant and need to be blocked. If only one switch in your chain doesn't support STP, the bridge loop goes undetected - STP won't/can't block the looping port(s) and the network will die a horrible death in a broadcast storm.

Switches not compliant to 802.1D (sadly many simple ones aren't) actually forward BPDUs and become transparent to STP - that way, even a single STP switch (with the rest being dumb ones) would prevent the bridge loop.

HOWEVER, if you ever replaced one of the dumb switches with an 802.1D-compliant one, you'd suddenly have the situation above, where the loop goes undetected and the network dies. Basically, you shouldn't make your network depend on the dumbness of its switches.

So, if you require a resilient network, use the appropriate equipment. Also, don't form rings or chains but build a tree: a center (root) switch which the other switches connect to. If you need redundancy, use two center switches and two uplinks for the others (with RSTP/MSTP, of course).

2
  • Thank you @Zac67! In my application (IoT sensors) it is unfortunately not possible to form a tree, I can either have a chain or a loop. This is because each switch only has three ports: two external and one internal, to the sensor processor. The only exception is switch A, which is a gateway. I understand this is not a normal usecase but thank you for answering whether it would work or not - it seems like for my usecase it will.
    – JimR
    Apr 22, 2020 at 3:24
  • 1
    You only need one external port to form a tree.
    – Zac67
    Apr 22, 2020 at 6:20
1

If all your switches use STP a loop isn't that bad (it's definitely suboptimal, but there are times when you can't get around it), but then you'll need switches with STP support, and with it enabled and properly configured on each switch.

In your case, the switch connecting to the ring to the outside would have to have it's priority set so that it's most certainly gets elected root bridge, which will make sure that every switch has the shortest path to that switch. It's also a very good idea to add a secondary access switch to the ring and tweaking it's priority so that if the root bridge goes down it'll get elected instead of a random switch in the ring.

Another option is to get switches that support a ring protocol, some vendors, especially on the industrial side, have their own proprietary protocols, and I think at least some Aruba switches have one as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.