Layer 2 attacks – how to generate them and how to protect against them
Layer 2 is the layer where the IP fragments from Layer 3 are transferred and are further divided into data frames to fill up the required details such as the MAC address and then transfer those frames to Layer 1, which then carries the data into 10101
format through the connecting wire. In Chapter 1, Data Centers and the Enterprise Network Architecture and its Components, in the Layer 2 protocols: STP, VLANs, and security methods section, we talked about how a LAN works, and we mentioned the types of attacks that can be performed. Dividing these attacks into categories, we talked about the following:
- Attacks on the switching and discovery mechanism
- Attacks on the Virtual LAN (VLAN) mechanism and VLAN flooding
- Broadcast storms and attacks on the spanning tree protocols and loop-prevention mechanisms
Let's see how to generate and protect against these attacks.