How big can an ethernet network be?
Switched ethernet is magic. You buy relatively cheap devices, plug everything into them, and packets get where they’re supposed to go without any complication. Well that’s the simple version at least; modern networks with managed switches and VLANs can get complicated. But the basic system is simple. My question is how big does that scale? How many switches and ports can I have on a switched ethernet network?
The classic folklore answer is apparently 7 hops. The network can be no bigger than 7 hops in diameter. That’s pretty big though. Assuming you had 8 port switches in a tree configuration, I think that’s 8^7 = 2,097,152 devices. But IIRC each switch has to maintain a state table of the MAC address of every one of those 2M devices; I imagine in practice there’s not enough RAM for anywhere near that much.
The 7 hops number apparently comes from IEEE 802.1d which formally defines the Spanning Tree Protocol that underlies Ethernet switch routing. Basically magical elves run around your network and divine its topology, then construct a minimal spanning tree so everyone can reach everyone. From what I’ve read it’s not clear that 7 hops is a hard limit so much as it is guidance about practical limits. I suspect it’s mostly governed by latency.
802.1d is very old though and has been superseded. 802.1Q codifies VLANs and the multiple spanning tree protocol. 802.1aq adds Shortest Path Bridging, which I think is a way to let an ethernet use multiple physical routes to increase bandwidth. I’ve never used any of this stuff, but I suspect it changes the assumptions that underlie that 7 hops rule of thumb. OTOH I wonder in practice. With VLANs and managed switches it’s logically reasonable to consider much larger networks working on layer 2, without IP routing involved.