L2 protocols

Layer 2 (L2) protocols operate at the Data Link Layer of the OSI model. They are primarily responsible for node-to-node data transfer, error detection, flow control, and managing physical addressing (e.g., MAC addresses). Here's a categorized list of the most common Layer 2 protocols:


1. Ethernet-Based Protocols

These are protocols used in Ethernet networks for framing, addressing, and media access control.

  • Ethernet (IEEE 802.3):

    • The most widely used L2 protocol for wired LANs.

    • Defines MAC addressing, frame format, and CSMA/CD for shared media.

  • VLAN Tagging (IEEE 802.1Q):

    • Adds VLAN information to Ethernet frames for network segmentation.

2. Wireless-Based Protocols

These protocols provide data link layer functionality for wireless communication.

  • Wi-Fi (IEEE 802.11):

    • Handles wireless LAN communication, framing, error control, and addressing.
  • WiMAX (IEEE 802.16):

    • Provides L2 connectivity for broadband wireless networks.

3. Address Resolution Protocols

These protocols resolve network layer addresses (IP) to data link layer addresses (MAC).

  • ARP (Address Resolution Protocol):

    • Maps IPv4 addresses to MAC addresses in local networks.
  • NDP (Neighbor Discovery Protocol):

    • IPv6 equivalent of ARP, plus additional features like router discovery.

4. Switching and Bridging Protocols

These protocols manage data forwarding and loop prevention in L2 switches and bridges.

  • STP (Spanning Tree Protocol, IEEE 802.1D):

  • RSTP (Rapid Spanning Tree Protocol, IEEE 802.1w):

    • Faster convergence version of STP.
  • MSTP (Multiple Spanning Tree Protocol, IEEE 802.1s):

    • Extends RSTP for multiple VLANs.
  • LACP (Link Aggregation Control Protocol, IEEE 802.3ad):

    • Combines multiple physical links into a single logical link.

5. Point-to-Point Protocols

These are used for direct communication between two devices.

  • PPP (Point-to-Point Protocol):

    • Used for direct connections, often in WAN links.
  • HDLC (High-Level Data Link Control):

    • Common in WANs for encapsulating Layer 3 protocols.

6. Metro Ethernet and Carrier Ethernet Protocols

Used in provider networks for Ethernet-based connectivity.

  • Q-in-Q (IEEE 802.1ad):

    • Extends VLAN tagging for provider networks.
  • Provider Backbone Bridges (IEEE 802.1ah):

    • Adds hierarchical MAC addressing for scalability.

7. Flow Control and Error Detection Protocols

Protocols that ensure reliable data transmission and manage congestion.

  • PAUSE Frames (IEEE 802.3x):

    • Provides flow control in Ethernet networks.
  • FEC (Forward Error Correction):

    • Corrects errors in frames without retransmission.

8. Virtualization and Overlay Protocols

Used in virtualized environments and overlay networks.

  • VXLAN (Virtual Extensible LAN):

    • Encapsulates Layer 2 frames for communication over Layer 3 networks.
  • NVGRE (Network Virtualization using GRE):

    • Similar to VXLAN, but uses GRE encapsulation.

9. Miscellaneous Layer 2 Protocols

  • LLDP (Link Layer Discovery Protocol, IEEE 802.1AB):

    • Device discovery protocol for network topology mapping.
  • CDP (Cisco Discovery Protocol):

    • Cisco-specific protocol for device discovery.
  • MACsec (IEEE 802.1AE):

    • Provides encryption at Layer 2.

L2 Protocol Examples in Use

ProtocolPurposeExample Use Case
EthernetLAN communicationConnecting devices in a wired LAN
ARPIP-to-MAC address resolutionFinding MAC addresses in IPv4 networks
STPLoop prevention in switchesEnsuring loop-free topology in switches
VLAN (802.1Q)Network segmentationCreating isolated virtual networks
Wi-Fi (802.11)Wireless communicationConnecting laptops to a Wi-Fi network
LACP (802.3ad)Link aggregationBundling multiple Ethernet links
LLDPDevice discoveryMapping network topology automatically