High-level Dated Link Control
HDLC (initials English for H igh-Level D ATA L ink C ontrol ) is a protocol of level 2 (Course binder) of OSI model, derived from SDLC (Synchronous Data Link Control). Its goal is to define a mechanism to delimit packages of various types, by adding a control of error. It is defined by the International organization of standardization under specification ISO3309.
Format of the screenThe unit used is the screen (Frame). Each screen is delimited by two identical flags (in binary notation: 01111110).
Flag ( Flag )
The flag is a delimitor of screen for synchronization. Its value is for HDLC: 01111110 (binary) 7th (hexadecimal)
Screens HDLC can be sent the ones behind the others: in this case, the flag of end of the first screen can be shared and be used as flag of beginning for the following screen.
Addresses ( Address )
The address is that of the recipient to whom is sent the screen. This address was used when the communication was of type Maître-esclave, the address being that of the slave. In communication point-with-point, it is not used.
Order ( Control )This field makes it possible to distinguish 3 types of screens:
- trame of information (given):
- trame of supervision:
 [P/F] NR
- trame not numbered:
The bit P/F means Poll/Final (Invitation to be emitted/Fin). It is known as positioned if it with value 1. By convention, the positioned bit is worth P if the screen is an order and F if the screen is an answer. The emission of an order with P=1 requires an immediate answer (with F = 1). With the reception of a screen with positioned bit P/F, the bit is worth F if one awaits an answer to an order already sent and it is worth P if no order were sent.
In the screens of information (dated), NS is the number of the current screen. NR is the number of the screen of awaited information; he discharges the screens of number lower than NR.
N.B: the bits of the field of order, described above, are written in the order in which they are sent on the physical layer, i.e. the weak bit of weight in first and the bit of strong weight in the last.
DataThis optional field variable length contains the data to be sent. The number of Bit S to be dispatched does not have to be a multiple of 8: as this field does not need to be aligned from the point of view Octet, it is not necessary to add bits of stuffing to the end.
FCSFrame Check Sequence: the FCS is a code added after the data to detect possible errors of transmission. It is usually coded on 16 bits, but after negotiation between the two interlocutors, it can be on 32 bits.
This sequence corresponds to CRC calculated on the fields addresses + order + given .
An example of implementation in C of coding/decoding of the FCS is proposed in the RFC 1662 (PPP in HDLC-like framing).
TransparencySo that the flags are used as delimitors, it is essential that the value of this one is not in the data transported between the beginning and the end. For that, the data will be modified to eliminate the sequences from bits 01111110 (7Eh). There are two methods: method by bit and method by byte.
The first method (called stuffing of bit, Bit stuffing in English) is most current: it is a question of avoiding meeting six consecutive bits of value 1 . At the time of the writing of the screen, if the data contain 5 successive bits with value 1, one 0 is automatically added afterwards.
The second method (called stuffing of byte) uses a character escape , of value hexadecimal THIS . So among the bytes to be sent, one records the value of the flag ( 7th ), then this byte is replaced by the two following bytes: THIS then 5th . Blow, it acts to make sure that the value of the byte of exhaust is not in the data, if it is met, the byte THIS is then replaced by the bytes THIS and 9th .
Thus there is not, before transmission, of confusion possible between data and flags of beginning/fine.
Type of screen
There exist 3 types of screens in HDLC:
- Screens I (Information frames): data
- Screens S (Supervisory frames): supervision of the data.
- Screens U (Unnumbered frames): Not numbered, supervision of the connection.
screens of data: Itransport abundant data by the entities of the layer network .
screens of supervision: Stransport orders or answers related on the control of errors, and the control of flow.
- RR = Receive Ready
1 0 0 0 P/F NR: the receiver is ready with recevoir
- RNR = Receive Not Ready
1 0 1 0 P/F NR: the receiver or the network layer is débordé
- REJ = Reject
1 0 0 1 P/F NR: ask retransmission of the screens of number equal to or higher than Nr
- SREJ = Selective Reject
1 0 1 1 P/F NR: ask retransmission of the screen Nr number
not numbered screens: Utransport orders or answers of the management of the connection (establishment, rupture, choice of a mode of answer…).
- SABM = Set Asynchronous Balanced Mode
1 1 1 1 P/F 1 1 0: ask connection
- SABME = Identical to SABM, but extend mode (numbered in modulo 128).
- DISC = Disconnect
1 1 1 1 P/F 0 1 0: release of connection
- UA = Unnumbered Acknowledgment
1 1 0 0 P/F 1 1 0: payment of screen non-numérotée
- FRMR = FRaMe Reject
1 1 1 1 P/F 0 1 1: rejection of trame
- DM = Disconnect Mode
1 1 1 1 P/F 0 0 0: the terminal is déconnecté
There exist 2 operating processes in HDLC:
the Best-Effort mode: in this mode, one does not guarantee the delivery of all the packages. that is dealt with by the network layer of the ISO protocol.
the Balanced mode: in this mode, one uses mechanisms hardware to ensure the reliability of the transmissions.
Protocol HDLC is the connection layer used for many protocols: H.323, V.120, nominal burnup or X.25.
N.B: there exists a specific alternative of HDLC developed by Cisco, which modifies the use of field Adresse and adds 2 bytes of protocol .
- http://www.urec.cnrs.fr/cours/Liaison/hdlc/sld009.htm: course CNRS.
- http://www.interfacebus.com/Design_HDLC.html#a: with illustrations (in English).
- RFC 1662: PPP in HDLC-like Framing
|Random links:||Orthomyxoviridae | Rhizochromulina | Castle-the Bishop | Louis Visconti | Ducati Supersport | Mesembryanthemum nodiflorum | Cilicia|