Introduction to link control
Link control protocols define how adjacent devices exchange frames. Depending on the protocol, they may establish a logical connection, detect errors, control flow, retransmit frames, and terminate link operation. Their scope is one link, so they do not replace routing or network-wide congestion control. The protocol can therefore provide local reliability without selecting an end-to-end route.
They operate at the Data Link Layer (layer 2) and usually concern one link, or one hop, between devices. They transform a bit stream from the Physical Layer into frames with address and control fields. Flags, length fields, or physical-layer signals can identify frame boundaries. The available functions depend on the protocol: some manage connections and flow, while others only frame data and detect errors.
HDLC, LAPB, and LAPD illustrate different forms of link control. Studying them shows how acknowledgments and retransmissions can provide reliability over one link.
Core link-control functions
A link control protocol may implement several functions for frame exchange over one link. A given protocol does not necessarily implement all of the mechanisms below.
- Framing:The protocol takes packets from the Network Layer and encapsulates them in a standardized format called a . This provides structure for addressing, control, and error detection. A typical frame has a flag, address, control field, optional information, and FCS, although the exact fields depend on the standard. The address and control fields can identify the peer, frame type, and delivery state.
- Link Management:When a protocol uses a logical connection, this function handles its lifecycle. It includes procedures for:
- Establishment: Setting up a logical connection before data exchange, often with mode negotiation.
- Maintenance: Keeping the link active, monitoring its state, and handling control messages.
- Termination: Closing the connection after communication ends and releasing state held by both sides.
- :Flow control makes the sending device adapt its transmission to the amount of data the receiver can store and process. A sliding window can keep several unacknowledged frames in flight, while acknowledgments release space for later frames. The window size and sequence space determine how many frames may be outstanding. This limits the risk of buffer overflow and data loss.
- Error Control:The goal is to detect corruption and, in reliable protocols, recover the data. It can be described in two steps:
- Error Detection: Many link control protocols use a Frame Check Sequence (FCS), often calculated with a CRC, to detect corruption caused by noise or interference. FCS reports a mismatch; it does not reconstruct the original data.
- Error Recovery: After detecting an error, reliable protocols may use acknowledgments (ACKs), negative acknowledgments (NAKs), and sequence numbers to request retransmission of lost or damaged frames. Such ARQ procedures can reject duplicates and preserve data order.
HDLC and related protocols
HDLC defined frame formats, operational modes, and frame types that became a reference for later procedures. ISO/IEC 13239 describes HDLC structure and procedures, including address, control, information, and check fields. LAPB and LAPD use solutions from the HDLC family, but each has its own scope and application. PPP uses HDLC-like framing defined in a separate specification.
Protocols related to HDLC
- LAPB (Link Access Procedure, Balanced): A data-link procedure for X.25 networks. It uses balanced operation and retransmission on point-to-point links, including potentially noisy links. X.25 variants use modulo-8 or modulo-128 numbering.
- LAPD (Link Access Procedure on the D-channel): The ISDN signaling procedure specified by Q.921. It uses an address composed of SAPI and TEI to distinguish services and devices sharing the D-channel. The two values are carried in the address field and have separate allocation rules.
- PPP (Point-to-Point Protocol): PPP is not a strict HDLC subset. It uses HDLC-like framing and its own control mechanisms for point-to-point and multi-protocol communication.
LAPD: signaling in ISDN networks
LAPD is a link-control procedure for the . ISDN separates B-channels (Bearer channels), which carry user data such as voice, from the D-channel, which carries signaling. LAPD operates on the D-channel.
This separation illustrates Common Channel Signaling (CCS), in which control information uses a path separate from user data. LAPD carries messages needed to set up, maintain, and tear down calls, using the acknowledgment procedures defined for the data-link layer. SAPI identifies the service, while TEI distinguishes an endpoint on the D-channel.
LAPD addressing
LAPD uses a two-part address composed of SAPI and TEI. This allows multiple devices and services to share one D-channel.
SAPI (Service Access Point Identifier)
SAPI identifies the type of service for a message. Q.921 defines values including:
- SAPI value 0 is used for call-control signaling, such as SETUP, CONNECT, and DISCONNECT messages.
- SAPI value 16 is used for X.25 packet-layer data communication.
- SAPI value 63 is used for data-link management.
TEI (Terminal Endpoint Identifier)
TEI identifies an endpoint on the D-channel. The 7-bit TEI field uses values 0-63 for manually assigned identifiers, 64-126 for dynamically assigned identifiers, and 127 for the group value. An ISDN S0 bus can support up to eight devices, but that is a physical-interface limit, not the number of TEI values. TEI assignment lets a message target the correct device.
Logical Link Control (LLC) in LANs
Logical Link Control, defined in IEEE 802.2, is the upper sublayer of the Data Link Layer. It provides services to the Network Layer in multi-access networks such as Ethernet. LAPB and LAPD describe procedures used in other link environments, so their scopes are not identical.
LLC provides an interface for the Network Layer regardless of the MAC technology below it, such as Ethernet, Wi-Fi, or Token Ring. The DSAP and SSAP fields identify the receiver's and sender's services. It uses in its header to multiplex and demultiplex data for different Network Layer protocols.
Three LLC service types
LLC defines three communication service types that differ in acknowledgment, connection state, and error recovery:
- Type 1: Unacknowledged Connectionless Service
Data frames are sent without acknowledgments. The service provides no flow control or error recovery. It has low overhead and can be used for broadcast messages or by higher-layer protocols such as TCP, which implement their own reliability mechanisms. - Type 2: Connection-Oriented Service
This service establishes a logical connection, sequences frames, uses acknowledgments for error control, and performs flow control. It provides an HDLC-like set of mechanisms over an unreliable LAN medium, with additional messages and processing. LLC Type 2 handles ordering, windowing, and retransmission within that service. - Type 3: Acknowledged Connectionless Service
This service does not establish a formal connection, but the receiver acknowledges each data frame. It provides acknowledgment without the setup and teardown procedures of a full connection.