High-level data link control
High-Level Data Link Control ( HDLC ) is an ISO standardized network protocol ISO / IEC 13239: 2002. It is within the ISO / OSI model Layer 2, the data link layer to integrate. The basic structure of HDLC is based on the SDLC protocol from IBM; there is also the proprietary Cisco HDLC.
properties
The HDLC standard consists of:
- Control of the transmission section
- Detection of transmission errors and sequence errors by block check (CRC-16) and sequence number control
- Error correction through block repetition
- Flow control with window mechanism
- Forwarding of uncorrectable errors and protocol errors to the next higher layer ( switching layer , network layer)
Cisco HDLC:
- Like HDLC, but by inserting a proprietary field (2 bytes between the "Control" and "Information" fields) the Layer 3 protocol of the following data is specified and a multi-protocol environment is possible.
- Communication between Cisco HDLC and other HDLC devices is not possible.
The HDLC data format is typical for a bit-oriented protocol without the possibility of authentication . It enables point-to-point connections and point-to-multipoint connections.
Block structure
It consists of the opening flag (block delimitation) '01111110' (hexadecimal 0x7E), which is represented with 8 bits. This is followed by the address field with another 8 bits or, alternatively, an extended address field with a multiple of 8 bits, identified by a 0 in bit position 1. In third place is the control field with 8 or 16 bits. Then follows the information field (data field), which has a variable length (multiple of 8 bits). The frame check sequence field (Block test) consists of 16 bits and contains a checksum of the data transmitted ( CCITT CRC-16 ) whose binary digits after the calculation and prior to the transmission at the transmitter with 0xFFFF XOR be ORed. Alternatively, the shift register, which is used for the CRC calculation, can also be filled with ones before the calculation. This modification creates a more robust checksum, which also protects against adding and deleting zeros. After division, the receiver compares with 0001 1101 0000 1111 instead of 0. Finally, the closing flag (block delimitation) follows with another 8 bits ('01111110').
Flag | Address | Control | information | Frame check sequence | Flag | |
01111110 | XXXXXXXX | XXXXXXXX | ... | XXXXXXXX | XXXXXXXX | 01111110 |
In order to avoid that within the data area or the checksum, the flag Opening or Closing flag occurs, bit stuffing ( bit stuffing ) or zero insertion applied. This means that after the '1' appears five times, a '0' is inserted within the frame in order to prevent confusion with a flag. On the recipient side, a '0' is simply deleted again after the '1' has occurred five times.
However, there are two special characters that can be used:
Coding | meaning |
01111111 | frame abortion |
111111111111111 | channel not active |
Block types
There are three different data units that differ in the structure of the control field :
I-frames ( information frames ) - for data transmission
Bit 1 | 2 | 3 | 4th | 5 | 6th | 7th | 8th |
0 | Send sequence number | Poll / final bit | Receive sequence number |
S-frames ( supervisory frames ) - to control the data flow
Bit 1 | 2 | 3 | 4th | 5 | 6th | 7th | 8th |
1 | 0 | Function bits | Poll / final bit | Receive sequence number |
The function bits of the S-frame are coded as follows:
Coding | command | meaning |
00 | Receive-ready | ready to receive further data; acknowledges successful receipt of the previous packets |
01 | Receive-Not-Ready | do not send any further data |
10 | Reject | repeat all data from the specified sequence number |
11 | Selective reject | repeat the data frame with the specified sequence number |
U-frames ( Unnumbered frames ) - to control the connection
Bit 1 | 2 | 3 | 4th | 5 | 6th | 7th | 8th |
1 | 1 | Function bits | Poll / final bit | Function bits |
The first 2 and the following 3 function bits are combined to form a command / reply code.
Functional
Bits |
command |
Command (C) /
Reply Code (R) |
meaning | command |
Command (C) /
Reply Code (R) |
meaning |
10,000 | SIM | C / - | Set Init.Mode | RIM | - / R | Request Init.Mode |
11,000 | SARM | C / - | Set async. Response mode | DM | - / R | Disconnected mode |
00 010 | DISC | C / - | Disconnect | RD | - / R | Request disconnect |
10 001 | CMDR | - / R | Command Reject | FRMR | - / R | Frame reject |
00 000 | UI | C / R | Unnumbered information | |||
00 100 | UP | C / - | Unnumbered poll | |||
00 110 | UA | - / R | Unnumbered Ack. | |||
11 100 | SABM | C / - | Set async. Balanced mode | |||
00 001 | SNRM | C / - | Set Normal Response Mode | |||
11 101 | XID | C / R | Exchange identification |
Operating modes
HDLC knows three different operating modes:
- Normal Response Mode (NRM)
- Primary station → secondary station ( half duplex )
- Asynchronous Response Mode (ARM)
- Primary station → secondary station ( full duplex )
- Asynchronous Balanced Mode (ABM)
- Both stations equivalent ( full duplex )
In the NRM, a control station sends to one or more subsequent stations. The following stations only send the control station on request ( polling ). A set final bit in the message of a subsequent station signals the end of its transmission. In the ARM, which is rarely used in practice, the following stations also have the option of sending data to the control station without polling it. The prerequisite for this is that the line is free. Finally, in the ABM only point-to-point connections between exactly two stations are possible. In contrast to the first two cases, the data exchange takes place symmetrically.
HDLC and variants are used with X.25 , GSM , ISDN , Frame Relay and PPP .
Related protocols and variants
Based on HDLC, a transmission can be divided over several physical lines to increase the data throughput. While the individual connections are each secured via an HDLC, the coordination of these is carried out using the multilink procedure (MLP) . A comparable application is channel bundling in ISDN .
See also
- Logical Link Control (LLC)
- Synchronous Data Link Control (SDLC)
Specifications
- RFC 4349 High-Level Data Link Control (HDLC)