Link Control Protocols
LLC, LAPB, LAPD and other data link control mechanisms.
Introduction: The Rules of Conversation for Networks
Imagine making a phone call. The conversation involves more than just the words you speak. You need to establish the call ("Hello?"), ensure the other person can hear you clearly, manage the pace so you don't talk over each other, and finally, end the call gracefully ("Goodbye."). Link Control Protocols serve this exact purpose for network devices.
Operating at the Data Link Layer (Layer 2), these protocols are a set of rules that manage the conversation over a single, direct physical connection: a single "hop" between two devices. They are the grammar and etiquette that transform a raw, chaotic stream of bits from the Physical Layer into an orderly and reliable flow of data. These protocols are responsible for everything from initiating the connection and checking for errors to managing the flow of data and terminating the link when it's no longer needed.
Protocols like HDLC, LAPB, and LAPD form the foundation of modern networking, and understanding their principles is key to understanding how reliability is achieved in complex systems.
Core Functions of a Link Control Protocol
A robust link control protocol is a master multitasker. It juggles several critical responsibilities to ensure smooth communication over a single link.
- Framing:This is the most basic function. The protocol takes packets from the Network Layer and encapsulates them into a standardized format called a . This process provides the necessary structure for addressing, control, and error detection.
- Link Management:This function handles the lifecycle of the connection. It includes procedures for:
- Establishment: Actively setting up a logical connection before any data is exchanged (the "handshake").
- Maintenance: Keeping the link active and monitoring its health.
- Termination: Gracefully closing the connection when the communication is finished.
- :Imagine a fast speaker talking to someone trying to take notes. The speaker must pause occasionally to let the note-taker catch up. Flow control is the network equivalent. It ensures that a sending device doesn't transmit data faster than the receiving device can process it, preventing buffer overflows and data loss.
- Error Control:This is about ensuring data integrity. It's a two-step process:
- Error Detection: Almost all link control protocols use a Frame Check Sequence (FCS) field, typically calculated with a CRC, to detect if a frame was corrupted by noise or interference during transmission.
- Error Correction: Upon detecting an error, reliable protocols use a mechanism of acknowledgments (ACKs) and negative acknowledgments (NAKs) combined with sequence numbers to request the retransmission of lost or damaged frames.
The Progenitor: High-Level Data Link Control (HDLC)
Many of the most important link control protocols are direct descendants or standardized subsets of one influential protocol: HDLC. It established the core concepts of framing, operational modes, and the different frame types that were adapted by later protocols. Its key characteristics serve as a blueprint for understanding others.
Key HDLC-derived Protocols
- LAPB (Link Access Procedure, Balanced): The workhorse protocol for X.25 networks. It is a strict subset of HDLC's Asynchronous Balanced Mode (ABM), designed for reliable, point-to-point connections over potentially noisy links.
- LAPD (Link Access Procedure on the D-channel): The signaling protocol for ISDN networks. It's based on LAPB but adds more sophisticated addressing to handle multiple devices and services on a single ISDN line.
- PPP (Point-to-Point Protocol): While not a strict subset, PPP borrows its framing and many control principles directly from HDLC, adapting them for the flexible and multi-protocol environment of the internet.
Focus on LAPD: Signaling in ISDN Networks
LAPD is a fascinating example of a link control protocol tailored for a specific, sophisticated environment: the . In ISDN, the communication link is separated into B-channels (Bearer channels) for user data (like voice or internet traffic) and a D-channel (Delta channel) exclusively for signaling. LAPD is the protocol that runs on this D-channel.
This separation is a prime example of Common Channel Signaling (CCS), where control information travels on a separate path from the user's data. This makes the connection process faster and more efficient. LAPD's primary job is to reliably carry all the messages needed to set up, maintain, and tear down calls.
LAPD's Smart Addressing
The most significant enhancement in LAPD compared to its predecessor, LAPB, is its two-part addressing scheme within the Address field. This allows multiple devices and services to share the single D-channel.
SAPI (Service Access Point Identifier)
The SAPI tells the network what type of service the message is for. It acts like a subject line in an email, allowing the receiver to direct the message to the correct software process. For example:
- A SAPI of 0 is used for call control signaling (e.g., SETUP, CONNECT, DISCONNECT messages).
- A SAPI of 16 is used for X.25 packet data communication.
- A SAPI of 63 is for management functions.
TEI (Terminal Equipment Identifier)
The TEI identifies a specific physical device at the user's end. An ISDN line can support up to eight devices. The TEI is like a unique extension number for each device (phone, fax, computer). It can be assigned statically or, more commonly, dynamically by the network when a device is first plugged in. This allows the network to send a ringing signal only to a specific phone, even if multiple phones are connected to the same line.
Logical Link Control (LLC): The LAN Diplomat
Logical Link Control, defined in the IEEE 802.2 standard, is the upper sublayer of the Data Link Layer, but its philosophy and function are essential to understanding link control. While LAPB/LAPD are for point-to-point links, LLC operates in the multi-access world of Local Area Networks (LANs) like Ethernet.
LLC's main purpose is to provide a single, consistent interface for the Network Layer, regardless of what specific MAC technology (Ethernet, Wi-Fi, Token Ring) is being used underneath. It uses in its header to multiplex and demultiplex packets for different network protocols.
Three Types of LLC Service
LLC defines three distinct types of communication services, allowing for a choice between speed and reliability:
- Type 1: Unacknowledged Connectionless Service
This is the most basic, "send and pray" service. Data frames are sent without requiring any acknowledgment. There is no flow control and no error recovery. It's fast and has minimal overhead, making it ideal for broadcast messages or for higher-layer protocols like TCP that implement their own robust reliability mechanisms. - Type 2: Connection-Oriented Service
This is the full-service, reliable option. It establishes a logical connection, provides sequencing of frames, uses acknowledgments for error control, and performs flow control. It essentially provides a reliable, HDLC-like connection on top of an unreliable LAN medium. This service adds significant overhead and is less commonly used today. - Type 3: Acknowledged Connectionless Service
This service offers a compromise. It does not establish a formal connection, but each individual data frame must be acknowledged by the receiver. This provides a measure of reliability without the setup and teardown overhead of a full connection.