Layer 1 and Layer 2 WiFi Basics

By George Stafanick, Blog Contributor
Share Post

Many years ago reading my first networking book, the first chapter was about the OSI model. At first it was a little confusing. Remembering the layers took on a variety of memorizing techniques. As I developed my craft the OSI model was very important. It gave a foundation to a rather complex communication. It was also a foreign language to some as they overheard us talking and using comments like, "It must be a layer 3 issue" or "Did you check Layer 2 because layer 1 looks good".

A wired engineer lives in layers 1 - 4, typically. Although today we are finding ourselves supporting all layers including layer 8 (People)!





Each layer has a role to play in passing data communication up and down the OSI stack. Understanding each layer is very important when troubleshooting and designing. Lets look at a few 802.3 (wired) examples.

LAYER 1 - The physical layer in the wired world consist of connectors, cables, fiber, and gbics. This is also the layer where data gets transmitted / received into bits, 0's and 1's using complex coding and modulations.

LAYER 2 - The data layer is where upper layer information (Layers 3-7) is encapsulated into a frame. This is also where the MAC address information is added. To be clear, at this layer your data is referenced as a frame and not an IP packet.

LAYER 3 - The network layer is where upper layer information (Layers 4 -7) is encapsulated into a IP packet. This is also where your IP header is added.

LAYER 4 - The transport layer is where TCP or UDP information is added.

A wireless engineer lives in layers 1 - 2. Although we are expected and should know all layers! As you know, when wireless doesn't work, its a wireless problem regardless if it's routing or something else! The 802.11 protocol operates in two very specific layers of the OSI model; LAYER 1 and LAYER 2. Lets look closely at those layers and detail what happens at each layer.

LAYER 1 - Layer 1 has 2 sub layers  (PLCP) Physical Layer Convergence Procedure and (PMD) Physical Medium Dependent. 

PLCP - The PLCP role is to add the preamble and PHY header. A preamble is a series of 0's and 1's modulated on the channel before a pending frame. The preamble is used to synchronize radios that a pending frame is on its way. The PHY rate at which the (MPDU/PSDU) will be transmitted is determined at this layer.

PMD - The PMD layer is where data is converted into bits 0's and 1's. This layer uses very complex coding techniques (DBPSK, DQPSK, BPSK, QPSK, CCK, QAM, (WHAT IS QAM?)). Think of coding as how many bits can be packed into a transmission. The more bits per transmission the more data that can be sent. The more complex coding mechanism like QAM256 used in 802.11ac require cleaner RF environments and a higher signal / SNR. This is why you'll see higher power output with  802.11ac radios. As you gain distance between you and the transmitter you might notice your client down shifting to less complex coding mechanisms. Because the radios cant understand the more complex coding mechanisms at distance because of noise and free space path loss. Another way of thinking about it. If you're close to someone you can talk normal. Say you're now 50 feet away, you may find yourself talking a bit slower so the recipient of your message can better understand you.

The PMD layer uses complex modulations to deliver the coded bits. The modulations used with 802.11 are (DSSS, OFDM, MIMO-ODFM). You might be familiar with these modulations. If you've ever used a spectrum analyzer the modulations have very unique signatures.

Spectrum analyzers play an important role in layer 1.  "Spectrum Analysis - basics on terminology and graphs"


LAYER 2 - This layer has 2 sub layers (LLC) Logical Link Control and (MAC) Mac Access Control. 

LLC - The LLC receives the upper layer information, also called an MSDU (Mac Service Data Unit) from layer 3. An MSDU is all the information from layers 3-7 and is handed down to the MAC layer.

MAC - The Mac layers role is to add layer 2 information like the mac address source, destination, BSSID, receiver or transmitter. In fact, 802.3 has two mac address fields source and destination. While most 802.11 frames use three mac address fields source, destination and BSSID. In mesh and WDS solutions you will find four mac address fields in use. At this layer the data is referenced as a MPDU.

802.11 sniffers play an important role in layer 2. A sniffer listens on channel much like a client waiting for a frame. The wireless NIC will synchronize with the preamble, demodulate the frame and display the frame details and payload in your sniffer window.