# What happens if I connect several switches together in a loop?

Suppose I want to network a stadium and I have 20 switches connected in a loop. My goal is to be able to connect a laptop to any of the switches and connect to the network and limit my TTL going clockwise and counterclockwise. I'm wondering if this will work. Any ever try this or know what will happen? I'm using the network for lighting control, sACN and Artnet. Thanks.

• Sounds like a really bad design. You should never use a ring design with switches. – user36472 Mar 1 '19 at 16:44
• Did any answer help you? If yes, then you should accept one, so that it doesn't keep popping up. Alternatively you could provide your own answer and accept that. – user36472 Mar 4 '19 at 8:41
• Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 14 '19 at 20:54

What happens if I connect several switches together in a loop?

Spanning tree will break the loop by selecting a loop-free path to the root bridge.

My goal is to be able to connect a laptop to any of the switches and connect to the network and limit my TTL going clockwise and counterclockwise.

This really makes no sense. Spanning tree will determine a single, loop-free path toward the root bridge. Also, TTL is an IP header field (layer-3) that plays no part in layer-2 switching, but is used (decremented) by routers at layer-3.

I'm wondering if this will work.

No, not the way you seem to think, for the reason I explained above.

Any ever try this or know what will happen?

Yes, spanning tree will create a single, loop-free path to the root bridge. The best you can do is to determine which switch will be the root.

Properly, you should have a pair of switches that are the root and backup root, connected to each other, and all the other switches should connect to both of those switches, but all the other switches should not be connected to each other. In this way, you build a tree such that each switch is directly connected to the root bridge and backup root bridge, and any traffic from one switch to another switch only needs to pass through one other switch, the root switch.

What happens if I connect several switches together in a loop?

Without STP (or SPB), the switches form a bridge loop, leading to a broadcast storm, taking down your network.

With STP active, the switches elect a root brigdge and (simplified) the link furthest away from the root bridge is blocked, breaking the bridge loop.

However, that ring of 20 creates too large a tree depth to converge with default STP parameters. You'd need to fine tune the parameters or decrease the tree depth (see below).

I have 20 switches connected in a loop.

Don't. A ring is not a reasonable topology with switches.

My goal is to be able to connect a laptop to any of the switches and connect to the network and limit my TTL going clockwise and counterclockwise.

There is no TTL concept in Ethernet. When there's a loop, frames keep circulating forever.

Even with routers instead of switches and IP's TTL, the TTL value does not control the routing. The metric does.

Actually, it doesn't matter too much which way your frames go. Even with a high switch latency of 10 μs a near-circular forwarding takes just 200 μs = .2 ms - while this is high for an L2 network you probably won't notice a thing.

A ring topology is bad for two main reasons:

• bottlenecks: A lot of traffic will need to travel through many switches, putting load on their links. If any one link is congested all traffic across that one link is slowed down and some of it is dropped.
• redundancy: Any one failing switch trips over the currently active STP topology, requiring the network to reconverge. Due to the large tree depth this can take many seconds. For critical applications a ring isn't much better than a simple chain.

Essentially, you always build a tree with switches. Elect a center switch and connect all other switches to that one. Use physical links whereever possible, avoid chained switches. If you need redundancy, use two center switches and connect all the others to each one (requiring STP, of course).

If your network is two large geographically, split it in half and use the center-switch approach in each half. Connect the halves with redundant links.

If you need to create more than two parts, then you can think about using a ring topology between parts. Generally, keep the number of parts low and each part redundant in itself.

If you really insist on using a ring with all its disadvantages and want the frames to use the shortest path you'd need Shortest Path Bridging (IEEE 802.1aq). Note that not even all datacenter switches can do this and be prepared for a hefty price tag.

With routers instead of switches the ring would actually work the way you want it, but without requiring any TTL tweaking.

There are some industrial switches that have proprietary ring protocols that can do that and use both sides of the ring, but from what I've looked at them I struggle to understand the benefits over STP since you shouldn't be using the network at line capacity anyhow, and STP will naturally find the "best" path to the root switch, provided you configure the network properly.

To answer you question however, most switches will create a loop and bring the whole network down due to a broadcast storm. Slightly better switches has STP (Spanning Tree Protocol), which after configuring will keep this from happening, by cutting the loop at some point and turning it into a tree. STP gives you the benefit of having the backup link up and ready to go, in case you get a break somewhere in the ring.

What type of P2P links you are configuring ? If its L2 then there is no TTL as other guy said above. Best thing to do is make one of the switch root by spanning tree priority command and use lower priority for other switches.

If your goal is to increase/decrease TTL values , you should consider having L3 Links between switches, connect all of them in a daisy chain, configure a loopback on the last switch on the chain and ping it from your laptop.

If you source a packet from your laptop it will be with TTL=64 and with 20 L3 links in between it will drop to 44 , is this your goal ?