Understanding LLC and MAC: The Powerhouse Sublayers of Data Link Layer

Updated 2 October 2024
4 min read
17 March 2022

Discover what is the Data Link layer and how it is subdivided into Logical Link Control and Media Access Control sublayers.

Logical Link Control and Media Access Control as the sublayers of Data Link layer.

Logical link control (LLC) and media access control (MAC) are the two sublayers that form the data link layer of the OSI (Open Systems Interconnection) model. If that sentence doesn’t make sense to you yet, you’re in the right place. We can help you understand the purpose and function of these crucial sublayers. 

In short, the OSI model is a framework that facilitates the interoperability in computer networks between systems using different software during data transmissions. The International Organization for Standardization developed it in 1984. 

Applying the OSI model to a network characterizes the network’s computing functions into a set of universally applicable rules. It achieves this by splitting the communication between systems into seven layers. These layers include physical, data link, network, transport, session, presentation and application.

Seven layers of the open systems interconnection model - OSI.
Open Systems Interconnection model layers

The layer we’ll zoom in on here is the second of those listed. Before exploring the role of its sublayers – the LLC sublayer and the MAC sublayer – let’s first look at the data link layer itself. 

The first layer of the OSI model is the physical layer. It is concerned with the physical optical or electrical transmission of unstructured data across a network. It is not until the data link layer that structure is introduced to the data. 

At this second layer, the node-to-node transfer takes place between directly connected nodes. They package the previously unstructured data into frames. At this point, the format of the data is defined. Additionally, errors that occur in the lower layer are corrected before the network layer performs its functions. 

To facilitate these operations, the layer splits into two sublayers: the MAC layer and the LLC layer. The MAC layer handles interfacing with the physical layer while the LLC layer multiplexes and manages flow and error control. What exactly does this mean?

The upper of the two data link sublayers is the logical link control sublayer. The main function of the logical link control layer is to act as an interface between the lower MAC sublayer and the network layer within the OSI model during the data transfer. 

If you are familiar with the Synchronous Data Link Control (SDLC) and the High-Level Data Link Control (HDLC) protocols, you will note that logical link control functions in a similar way. 

One important way the LLC carries out this interface function is via multiplexing. In real life scenario, multiplexing would look like this: in a large city, the postal service collects letters from various neighbourhoods, sorts them centrally, and uses a few trucks to deliver mixed batches to multiple locations. Each truck carries letters for different destinations until they reach their specific drop-off points.

This method allows multiple network protocols to exist within a single multiple access point network. 

You can think of multiplexing as the LLC layer chopping data up into smaller packets to save resources. The LLC layer creates frames. Each LLC frame comprises a data packet preceded by an LLC header that includes information about where the data belongs. It is also acceptable to refer to a frame as an LLC protocol data unit

When an LLC layer receives data, it takes each deconstructed LLC protocol data unit and demultiplexes them into larger data packets. 

Multiplexing and demultiplexing actions within the Logical Link Control sublayer.
Multiplexing and demultiplexing

Flow control, acknowledgement and error-checking in the LLC layer

Another key aspect of the LLC layer is its flow control function. Since different computer systems can send and receive data at different rates, the LLC layer makes sure that faster systems do not overrun slower ones. 

It achieves flow control through acknowledgment. In short, the receiving end station acknowledges when it has received a frame so that the sending node and receiving node can stay in sync. 

Errorchecking functions within the LLC sublayer too. When the layer is multiplexing as it sends data or demultiplexing as it receives data, the LLC layer checks to ensure whether there has been any frame loss in the data. 

If the logical link control layer detects frame loss, it simply sends the data back to the source, which retransmits the data again. This error detection ensures that it ends up complete and in the right order. Despite data being chopped up and put back together.  

What is the role of the media access control sublayer?

As the name suggests, the media access control sublayer manages media access to different devices. But let’s dig into what that means. 

To send and receive electrical or optical signals that facilitate the data transfer, signals need access to a hardware medium. For example, cables carrying an internet signal around local area networks. 

While this cable may carry data to and from multiple computers, if multiple signals go out simultaneously, the signals would collide and result in packet loss. This is why the MAC layer’s collision detection is so important. 

By performing multiple access resolutions when the physical medium transmits more than one frame and performing collision resolution, the layer ensures that all signals go out without data loss. The Carrier Sense Multiple Access with Collision Detection (CSMA/CD) mechanism helps with that.

One computer detects transmission, second checks for active transmissions and passes data on to third computer.
Carrier Sense Multiple Access with Collision Detection

Additionally, while the LLC layer acts as an interface between the MAC and network layers, MAC acts as an interface between the LLC and physical layers. This includes encapsulating frames so they are ready for transmission via the physical medium. 

The MAC layer also has an error recovery function. It generates frame checking sequences to ensure there are fewer transmission errors. 

Conclusion

Let’s quickly recap. The data link is the second layer within the Open Systems Interconnection model. It is responsible for formatting unstructured data from the physical layer, formatting it, packaging it into frames and facilitating error-free node-to-node data transfers. 

The logical link control sublayer handles multiplexing, demultiplexing, flow control and error detection. In short, these roles mean that packets of data are sent parceled into frames. This is done at a rate both the sending and receiving systems can handle, without errors in the final data. 

The MAC layer is the lower of the two sublayers. It acts as an interface between the LLC sublayer and the physical layers. It does this by encapsulating data frames to make them suitable for transmission over the physical medium and by governing access to that medium so signals do not collide. 

The standardization of the communications across computer networks, regardless of which devices and software they use, enables these computer networks to communicate with other networks smoothly. 

FAQ

What is the OSI model and why is it important?

The OSI model is a framework developed by the International Organization for Standardization in 1984 to standardize the functions of a telecommunication or computing system into seven layers, facilitating interoperability between different systems and software during data transmissions.

What roles do the LLC and MAC sublayers play in the data link layer?
How does the LLC sublayer ensure reliable data transfer?
What is the function of the MAC sublayer in preventing data collisions?

About the author

Ignas Anfalovas

Platform Engineering Manager

Ignas is a Platform Engineering Manager at IPXO with more than 7 years of experience in the IT sector. His expertise includes network design solutions and infrastructure maintenance. After working hours, you will find Ignas in Lithuanian folk-dance classes.
Table of contents

Related reading

A cloud with a checkmark
22 November 2024   •   Cloud Networking, Network Engineering

Cloud Services ABC: BSO Network 

Discover BSO Network – a seasoned provider of high-performance connectivity solutions, its unique advantages, and its vital role in powering global industries today.

Read more
A magnifying glass on a server

PCAP: Demystifying Network Traffic Analysis 

PCAP empowers network and security professionals to analyze traffic patterns and detect threats, turning raw data into actionable insights that enhance both network performance and security.

Read more
RPKI certificate with a key.

How IPXO Adopted RPKI

The Resource Public Key Infrastructure is an essential security framework that ensures safe routing. Learn how IPXO has implemented RPKI at the IPXO Marketplace.

Read more

Subscribe to the IPXO email and don’t miss any news!