Logical Link Control (LLC)
IEEE 802.2 standard providing interface between MAC layer and network protocols.
Introduction: The Network's Diplomatic Translator
In the world of networking, the Data Link Layer (Layer 2) has a complex job. Its lower half, the , is concerned with the raw, physical aspects of a specific network technology like Ethernet or Wi-Fi. It's like a technician who knows how to physically put signals on a copper wire or transmit them through the air, but doesn't care what those signals mean. Above it, the speaks a universal, logical language like IP, focused on end-to-end global delivery.
The Logical Link Control (LLC) sublayer sits right between them, acting as a crucial diplomatic translator. Defined by the IEEE 802.2 standard, its primary purpose is to provide a single, consistent interface that hides the complexities of the underlying physical network from the Network Layer. No matter if the data is traveling over an Ethernet cable, a Wi-Fi signal, or an old Token Ring network, the LLC ensures the Network Layer sees a standardized, predictable service. This abstraction was vital in the 1980s and 90s when multiple LAN technologies were competing for dominance.
Core Functions and Identity
The genius of the LLC is its ability to remain consistent regardless of the physical medium. It offers a set of high-level services that manage the logical connection between two devices.
- Multiplexing Network Protocols:
Perhaps its most important function, the LLC acts as a traffic director. It allows multiple Network Layer protocols (like IPv4, IPv6, or legacy protocols like Novell's IPX) to coexist on the same physical network. It uses special identifiers to ensure a packet arriving at a destination machine is delivered to the correct protocol stack for processing.
- Flow Control (Optional):
In its more complex modes, LLC can manage the rate of data transmission between two devices to prevent a fast sender from overwhelming a slow receiver. It can signal the sender to pause and wait.
- Error Control (Optional):
LLC can also provide a reliable service by using sequence numbers and acknowledgments to ensure that frames arrive in order and without corruption. If a frame is lost or damaged, the LLC protocol can manage its retransmission.
- Media Independence:
This is the key design principle. The LLC protocol itself is identical whether it's running over Ethernet, Wi-Fi (802.11), or Token Ring (802.5). The Network Layer simply communicates with the LLC, and the LLC takes care of passing the data down to the appropriate MAC sublayer for that specific technology.
The Anatomy of the LLC Header (IEEE 802.2)
When an Ethernet or Wi-Fi frame uses the LLC protocol, an LLC header is inserted between the MAC header and the Network Layer data. This header is the key to LLC's functionality.
The standard LLC header consists of three fields:
DSAP (1 byte)
The Destination Service Access Point acts like an "inbox" number for the destination machine. It tells the receiving LLC sublayer which Network Layer protocol or application should receive this frame's data. For example, a DSAP value of 0x06 signifies an IP packet, while 0xE0 would be for a legacy Novell NetWare (IPX) packet. A value of 0x42 would be for the Spanning Tree Protocol (STP).
SSAP (1 byte)
The Source Service Access Point is the corresponding "outbox" number for the sending machine. It identifies the protocol that originated the frame. Typically, for requests and responses, the SSAP and DSAP values are swapped in the return frame.
Control (1 or 2 bytes)
This field defines the type of service and carries the sequence and acknowledgment numbers needed for reliable communication. Its structure is heavily based on the HDLC Control field and determines whether the frame is an Information (I-frame), Supervisory (S-frame), or Unnumbered (U-frame).
LLC's Three Service Types: A Spectrum of Reliability
The LLC standard defines three distinct modes of operation, allowing applications and protocols to choose the level of service that best fits their needs. The choice is made based on the value used in the Control field of the LLC frame.
- Type 1: Unacknowledged Connectionless Service
This is the most basic, lightweight, and common service type. It's often called a "send and forget" or datagram service.
- How it works: Frames are sent to the destination without establishing a prior connection and without expecting any acknowledgment of receipt.
- No Reliability: There is no flow control, no error correction, and no retransmission of lost or damaged frames. The LLC simply hands the frame to the MAC sublayer and assumes it will get there. If it doesn't, it's up to higher-layer protocols (like TCP) to notice and fix the problem.
- Use Case: This is the default mode for almost all TCP/IP traffic over LANs. The overhead of establishing a connection at Layer 2 is unnecessary when TCP is already providing a reliable, connection-oriented service at Layer 4. It's also used for broadcast and multicast traffic where acknowledgments would be impractical.
- Type 2: Connection-Oriented Service
This is the heavyweight, full-featured service that provides complete reliability over the link, essentially mimicking the functionality of a protocol like HDLC or TCP at Layer 2.
- How it works: Before data is exchanged, a logical connection is established between the source and destination SAPs. All frames are sequentially numbered. The receiver sends acknowledgments for correctly received frames. Flow control is managed using a sliding window mechanism. Damaged or lost frames are automatically retransmitted by the LLC.
- High Reliability: It guarantees that all data arrives correctly and in the proper order.
- Use Case: This mode is rarely used in modern IP networks due to its high overhead. It was more relevant in older network architectures like IBM's SNA, where reliability at the link layer was a primary requirement. It can be thought of as a "registered mail with delivery confirmation" service for frames.
- Type 3: Acknowledged Connectionless Service
This service offers a middle ground between the speed of Type 1 and the reliability of Type 2.
- How it works: No logical connection is established beforehand. Each individual data frame is sent and must be individually acknowledged by the receiver. If an acknowledgment is not received within a certain time, the sender retransmits the frame.
- Moderate Reliability: It confirms delivery of each frame but does not guarantee the order of arrival (though this is rarely an issue on a single LAN link).
- Use Case: This is a niche service, sometimes used in industrial control or automation networks where it's critical to know that each command was received, but the overhead of establishing a full connection for infrequent commands is undesirable. It's like sending an email and getting an automatic "read receipt" for that specific message.
LLC vs. Ethernet II Framing: The Modern Reality
It's crucial to understand that while IEEE 802.3 (Ethernet) with an LLC header is the official standard, another, slightly different frame format dominates the modern internet: Ethernet II (also known as a DIX frame).
In an IP-centric world, the primary job of the Data Link Layer is to indicate that its payload is an IP packet. The LLC accomplishes this using SAP codes. The Ethernet II frame achieves the same goal more directly.
- IEEE 802.3 Frame with LLC: The two bytes following the source MAC address represent the Length of the data field. The LLC header then follows, containing the DSAP and SSAP fields which identify the Network Layer protocol.
- Ethernet II Frame: The two bytes following the source MAC address represent the EtherType. This single field directly identifies the Network Layer protocol. For example, an EtherType value of
0x0800indicates an IPv4 packet, while0x86DDindicates an IPv6 packet.
Because over 99% of LAN traffic is IP-based, the simpler and more direct EtherType field of the Ethernet II frame has become the de-facto standard. Network devices distinguish between the two frame types by examining the value in this two-byte field:
- If the value is (hex ), it's interpreted as a Length field, and the device expects an IEEE 802.3 frame with an LLC header.
- If the value is (hex ), it's interpreted as an EtherType field, and the device processes an Ethernet II frame.
So, while LLC is a fundamentally important standard for understanding link layer services, its direct use in frame headers for user data has been largely superseded by the efficiency of the Ethernet II format in modern networks. However, LLC is still actively used "under the hood" for many crucial Layer 2 control protocols like the Spanning Tree Protocol (STP), which uses LLC to communicate between switches and prevent network loops.