L2-based attacks
With Layer 2 attacks, we are referring to attacks that interfere with the normal operation of the OSI Layer-2 network protocols. When in this category, we have LAN switching that includes MAC learning, VLANs, STP/RSTP, MAC security, and other attacks on the Layer-2 functionality of the network. Let's examine some examples and learn how to protect against them.
MAC flooding
LAN switches contain a MAC table that holds all of the MAC addresses that were learned by the switch. In Chapter 2, Network Protocol Structures and Operations, we learned about the way switches operate, and we discovered that a LAN switch learns all of the MAC addresses that are connected to it, and forwards frames to these destination MAC addresses only to the physical ports the devices with these MAC addresses are connected to. Since every switch has a limitation in terms of the number of MAC addresses that it can learn, when the MAC address table is filled, the switch will not be able...