So what happens when we build networks at layer 2. well the nice thing about switches is they are essentially plug and play you can plug a switch into a switch into another switch power them on and you will get a layer 2 network and there isn't actually any configuration required to make the switches work because of the learning mechanism that i just described and any switch that you buy even an unmanaged switch will have that learning mechanism built in so given that this really easy to build networks at layer 2 and lots of people build their networks that way how far can you go what is it that stops you building a layer 2 network as big as you like why could we not for example build the entire internet across the world as just a big layer 2 switch network where everybody has a switch and they just plug it into the next switch along well there are a number of reasons for this now the first reason is to do with broadcasts so as i mentioned before when a switch receives a broadcast frame which is one that's marked as being a broadcast then it must deliver it out of every port and so what happens is that every time you send a broadcast frame every single port on the network will receive a copy of that broadcast frame now broadcasts are a normal background activity that goes on on a network so if you plug in a windows pc for example every 30 seconds it will generally send a broadcast out announcing that it's a windows pc and what its machine name is if you plug a printer into a network it will do something similar there are broadcasts required for things like arp the address resolution protocol so these broadcasts are part of normal background activity on a network but the more devices you plug into the same switch network the more broadcasts you will have and eventually you will just have a network that's swamped with broadcast traffic and nothing else so that gives one limit as to how big you can build a switch network now the second reason is a little bit more subtle the second reason is that the forwarding tables in the switches have limited space they have limited number of mac addresses that they can store and so if you get a 10 cheap home switch it might have capacity for 64 mac addresses let's say if you buy a more expensive switch it might have a capacity of a thousand mac addresses or 16 000 mac addresses but whatever it is it's still going to be a limit and they'll get a point where if your network becomes too big then these tables will overflow and what happens when the tables overflow is that the switches are forced to kick out entries from their forwarding tables to make space for new ones and that means every time you see a frame that comes in for a mac address that's not in the forwarding table it has to be sent out to all ports like a broadcast so what you get is if you've got too many mac addresses on your network then they will become you will see churn in your forwarding tables which is a lot of work for the switch and you will see lots more traffic effectively being processed as broadcasts when it shouldn't be processed as broadcast and that in turn will lead to a collapse in your network so that's not a point you want to get to you must keep your size of your layer 2 domain so that you have enough mac address space in your switch tables the third reason is a little bit more subtle and it's down to debugging there's very little visibility you get at layer 2 as to how your network is working you can have managed switches and you can look at the forwarding tables but if there's a problem let's say some device on your network generates a broadcast storm which is a fairly common problem so a storm of broadcast traffic appears in your network the switches will happily forward those broadcasts all over the network that will flood across the entire network and your entire network will be full of broadcasts it's then very very hard to pinpoint where the source of that broadcast storm is where it is because the broadcasts are everywhere on your network there's also no equivalent to a layer to trace route to allow you to work out what path packets are choosing to take through the network so it's very hard to debug and manage a large layer 2 network so for that reason alone you should think about keeping your layer two networks small so that they're easy to understand and easy to manage
© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.
Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.