Data Link Protocols Overview
Data Link Protocols Overview
While the data circuit transmits binary elements, the link protocol
data works on blocks of binary elements called frames. The frame is therefore
the unit of data it manages. It carries user data and also contains,
order information, necessary for the protocol to ensure the smooth running of the
dialogue (some frameworks, the supervisory frameworks, are in fact limited to only
order information). A frame contains different fields.
Each of them is a block of binary elements whose meaning and interpretation
are specified in the protocol definition.
The protocol must also define the rules of dialogue and specify how to
correct the detected errors. Finally, we must be able to detect equipment failures or
complete disconnections to alert the user of the unavailability of the service.
Remark
Defining a data link protocol involves specifying: the format of the frames
exchanged, the conditions for delimiting the frameworks (start and end) and their validity, the position
and the meaning of the different fields of a frame, the error detection technique
used, the rules of dialogue (supervision of the connection) and the procedures to be followed afterwards
detection of errors or failure of the connection.
DATA FORMATTING
In theory, the start and end frame delimiters are independent of the
transmission technique used. In practice, some processes use specific features
online coding to delimit the frames. The most common solutions are the
delimitation by a special binary sequence or the explicit indication of the length of the
frame.
ISTAG, LIG
1
Cours : Architectures et réseaux informatiques Chapter 2
find this sequence within a frame: in the broadcast, we insert into the body of the
bring me a binary element 0 after encountering five consecutive binary elements of value
1.
In reception, the binary element with value 0 must be removed after encountering five.
consecutive binary elements of value 1. Such a mechanism (bit stuffing) prohibits
the emission of more than five binary elements of value 1 in the body of the frame, since
this configuration is reserved for its delimitation. This method allows for the transmission of
frames of any length without particular constraints.
Example: Let's take the following useful data: 0110 1111 1110 1001. Preceded and followed
of flags, they will actually be issued in the form: 01111110 0110 1111 10110 1001
01111110. In this sequence, the flags are underlined and the inserted bit for transparency
is in bold and underlined.
ISTAG, LIG
2
Course: Computer Architectures and Networks Chapter 2
Residual errors must be as low as possible, but they can never be zero in a
real data link.
Protection at the code level consists of organizing an internal redundancy within it.
: parmi toutes les combinaisons possibles, certaines sont retenues comme valides. Ce type de
protection is possible when data transmission is done character by character (we introduce a
redundancy for each transmitted character). For example, a bit is added to each character.
of parity said vertical parity or VRC (Vertical Redundancy Check)1, calculated as follows:
for each character, we take the modulo 2 sum of its bits. If the number of 1 bits is even,
we add 0 at the end of the character, and if the number of 1 bits is odd, we add 1.
Le contrôle de validité par VRC est fréquemment utilisé sur les liaisons asynchrones.
For example, for the character M encoded by 1001101, the parity bit is 0. It is transmitted in
this order 10110010 (the 7 data bits starting from the least significant then the bit of
Parity). The general disadvantage of parity checks is that errors are not detected.
doubles.
The sequence of emitted binary elements is therefore 0011 0011 0100 1101 1011 0010 1100
1100, if we transmit the characters one after the other, starting with the weights
weaknesses of each character.
ISTAG, LIG
3
Course: Architectures and Computer Networks Chapter 2
Let us suppose that A is a computer and B is a slow printer, equipped with a capacity
limited memory, requiring him to remember all the information sent by A
as long as they are not printed. If the pace of sending information is significantly
above its printing speed, there is quickly saturation of memory and loss
information by B. A control mechanism for the pace of sending must be put in place.
information to the receiver, called flow control
To perform flow control, we introduce two supervision frames, RR
(Receiver Ready) and RNR (Receiver Not Ready). These frames carry no
useful information and are only used for managing the dialogue. They are generated and utilized
by the binding protocol and are invisible to the user. The mechanism is as follows: to
For each frame reception, equipment B sends an RR frame if it is ready to accept.
ISTAG, LIG
4
Course: Computer Architectures and Networks Chapter 2
other templates or an RNR template if he no longer wants to receive new ones. In this last
cas, Benvoie RR as soon as he is ready to accept new frames.
Let's now assume that the circuit is not completely reliable and introduces some
errors. To the flow control mechanism described above, a process must be added.
of the acknowledgment of the information frames received.
In data link protocols, a strategy is rather used.
of positive acquittal, using the previous supervision frameworks (RR and RNR). The
the operational strategy of B becomes:
If B receives a correct frame, the equipment sends an acknowledgment (RR frame or
RNR), according to its memory state to ensure flow control.
If it receives an erroneous frame, it does not memorize it and does not send anything back, as if it
had received nothing.
In order to increase the effectiveness of the dialogue, we introduce the notion of anticipation, which is to...
say the possibility of sending multiple frames in succession, without having received the acknowledgment of
previous frames. Thus, a supervision frame no longer acknowledges a single frame but a
a set of frames that follow one another without error. The number of successive frames that can be
sending without receipt of acknowledgment is limited by a noted value, called window.
3.5PROTOCOLGO-BACK-N
3.6 PIGGY-BACKING
ISTAG, LIG
5
Course: Computer Architectures and Networks Chapter 2
to convey both the information to be sent and the acknowledgments of the received frames
previously.
Each frame I has two numbers: a number N(S) [the sequence number of the
frame I], and a number N(R) acknowledging the frames issued in the opposite direction. This mechanism
is called piggy-backing. Finally, when a station has no frame I to transmit, it can
always use RR frames to acknowledge the traffic it receives.
A data link protocol can provide several services depending on the quality of the
transmission
Service without receipt, connection, or flow control when one wishes to use it.
a very simple protocol where the data circuit is of excellent quality.
Service with acknowledgment but without connection or flow control that allows
to improve the reliability of the connection a little but does not guarantee the non-duplication of the
messages.
Service with acknowledgment, connection, and flow control that includes numbering
frames and acknowledgments. This service, the only one to offer a real guarantee of reliability,
is also the most complex to implement. Several strategies can be distinguished in the
acknowledgement management: Stop-and-Wait (use of a look-ahead window)
equal to 1), the Go-back-Net the Selective Reject. The Stop-and-Wait is not very effective, the
Go-back-N is the most commonly used; Selective Reject does not bring any obvious gain.
performances in the majority of cases.
The frame is the unique structure of any length that carries all the
Flags mark the beginning and the end; a single flag marks the end of a
frame and the beginning of the next one when two frames are emitted consecutively. The
The table below describes the different fields of the frame, in their order of appearance:
The address field spans one byte and identifies one end of the link.
The 'fieldControl' describes the type of the frame: it spans 1 byte (over 2 bytes in the
extended mode.
The field Information is optional. It contains any number of elements.
binaries representing the user's data.
The FCS (Frame Control Sequence) field is the frame control sequence,
obtained by a polynomial check whose generating polynomial is x16 + x12 + x5
1. This generator polynomial is the one recommended by ITU recommendation V41.
ISTAG, LIG
6
Course: Computer Architectures and Networks Chapter 2
We start by emitting the low-weight bits (from bit 1 to bit 8 of each field).
The transmission of binary elements is continuous; in the absence of specific emission, the
equipment emits flag sequences to maintain synchronization between the
two ends of the data link.
There are three types of frames identified by the Control field: the frames
Information or frames allow the transmission of user data. The
supervision frames or S frames allow for acknowledgment and flow control; they
do not carry data, just like unnumbered frames or U frames
These are used to control the link: initialization, release,
notification of unrecoverable errors... Only a frame I can transmit data;
it is numbered by the variable N(S) and also contains the acknowledgment of the frames
received in reverse order (piggy-backing process), thanks to the number N(R).
The value 0 of bit 1 is specific to frame I. The value of the P/F bit depends on the status of
the equipment (primary or secondary) and the nature of the framework (request or response).
The frames release the frames and indicate the availability status of the stations (suitability
or not to receive new frames I). Containing a number N(R), they are used for control
of errors and flow control. The three supervision frames are:
The RR frame indicates that the equipment is ready to receive new frames.
numéroN(R) gives the number of the next expected frame. It means that all the
Frames with number(s) strictly less than N(R) have been received. A device
can also send RR frames to indicate its status or to request the status of the
station located at the other end.
The RNR frame acknowledges the received frames and furthermore indicates that the equipment is not
not able to receive new frames. The number N(R) is the same
meaning only in the framework.
The REJ framework is used to request the immediate cessation of current broadcasts and a
retransmission from the frame important the number indicated in N(R).
ISTAG, LIG
7
Course: Computer Architectures and Networks Chapter 2
Frames are used for the additional control functions of the link. Let's mention
the main ones:
SABM (Set Asynchronous Balanced Mode) to initialize operation in mode
balanced.
DISC (DISConnect) to logically break the connection between the two stations.
UA (Unnumbered Acknowledgement) to acknowledge orders like SABM
or DISC.
FRMR (FRaMe Reject) to reject an invalid order (correct from the perspective
from the detection of errors but inconsistent with the state of the dialogue).
DM (Disconnect Mode) to indicate the disconnection status of a station. It
is used, in particular, to respond negatively to a request for initialization by
SABM.
The PPP protocol is the point-to-point link protocol used on the Internet. It uses the
subscriber's telephone lines to access the network (the connection typically concerns a
personal computer and the Internet service provider). This is a very
simplified HDLC that does not include -except for options- neither flow control nor mechanism of
review on errors. The format of a PPP frame is as follows:
The 8 bits of the Address field are set to 1 (the connection being point-to-point, a single value)
just the address is enough).
The Control field has the same meaning as in HDLC. The PPP Data field
starts with two bytes (the protocol field), which identify the level protocol
superior to which the frame is intended; it ends with a FCS field whose calculation method
is identical to that of an HDLC frame.
ISTAG, LIG
8
Course: Architectures and Computer Networks Chapter 2
Let the sequence of binary data located in the information field of a frame
HDLC : 011110111110011111100011.
1. What is the actual suite provided for the transmission support (for this data
only) ?
What happens if the twelfth bit of the actually transmitted sequence was misrecognized?
of the receiver?
Exercise 2:
Write the sequence of bits actually transmitted for an SABM frame sent by a device
from address A (03 in hexadecimal) to a device with address B (01 in hexadecimal).
1. Bit number 5 (bitP) is set to 1. It will be assumed that the FCS of this frame is worth in binary.
1101011111111011.
2. By which frame does the equipment B respond?
Exercise 3:
Calculate the CRC and the LRC of the message HELLO using even parity, knowing that H is coded by
0001001Epar1010001,Lpar0011001etOpar1111001Specify the order of transmission of the message.
built.
Exercise 4:
We want to transmit the sequence of 16 bits of data: 2BE3 (in hexadecimal), the first bit
transmission corresponding to the least significant bit of the number 2. Error protection is
made by vertical parity (of even parity) and longitudinal.
1. Give the bit sequence of the four characters and the complete binary sequence transmitted to
receiver for this data block.
ISTAG, LIG
9
Course: Computer Architectures and Networks Chapter 2
2. Assuming that, due to a transmission error, on the 19ebit of the found sequence
To the question, modify it, calculate the value of the remainder found by the receiver.
Exercise 5:
We want to check the data block consisting of the two bytes encoded with even parity.
00110011 and 11110011.
What is the LRC corresponding to this block of data?
2. Represent the LRC in polynomial form.
3. We want to verify this block of data by a polynomial check of polynomial
generators8+ 1. Give the value of the polynomial LRC(x). What do you observe?
Exercise 6:
Exercise 7:
Exercise 8:
The first bits to be transmitted in a data frame managed by the HDLC protocol
are as follows: 10101110. The generator polynomial used is the normalized polynomial by the
recommendationV41.
1. Find the remainder of the polynomial division of the message by this polynomial.
2. Assuming that the transmission of the 8 bits was done without error, represent it.
sequence of operations performed by the receiver from the first bit of data to
the reception of the last control bit.
Exercise 9:
A device A dialogue with a device B according to the LAP-B protocol, via a link
satellite. The satellite re-emits the received signals without any processing and is located 200 km away.
of altitude. All delays due to processing are negligible. The equipment communicates
at 9,600 bit/s and limit the size of the data field to 64 bytes.
1. Any equipment receiving a correct information frame processes it immediately.
if he has no information to convey. Assuming that there is none
transmission error, determine what the minimum window size is
anticipation for effective transmission, when Aest is the only equipment
emit data.
ISTAG, LIG
10
Course: Computer Architectures and Networks Chapter 2
Exercise 10:
Exercise 11:
Exercise 12:
We consider two stations A and B using the LAP-B version of the HDLC protocol.
exercise, we assume that the data link is properly initialized and that the
Data transfer can start as soon as possible. The size of the anticipation window is 2.
the data exchange is full-duplex and both stations start simultaneously the
data transfer. It has only one frame of information to emit and its frame is without
error. 3 information frames to emit. We will consider several scenarios for
the data transfer from A:
1. In the first case, the first frame of Aest is incorrect the first time it is
issued but it is broadcast correctly. Provide the corresponding diagram for the
different frames exchanged between A and B.
2. In the second case, the second frame of Aest is incorrect the first time it is
issued but it is transmitted correctly. Provide the corresponding diagram for the
different frames exchanged between A and B.
In the last case, the last two frames of A are erroneous the first time.
They are issued but they are transmitted correctly. Provide the diagram.
corresponding to the different frames exchanged between A and B.
ISTAG, LIG
11
Course: Architectures and Computer Networks Chapter 2
We now consider that the two stations A and B are using the version of the protocol
HDLC requiring the retransmission of erroneous frames using selective reject SREJ.
4. Using the same working assumptions as in question 1, provide the diagram.
corresponding to the different frames exchanged between A and B.
5. Based on the same working assumptions as in question 2, provide the diagram.
corresponding to the different frames exchanged between A and B.
6. By using the same working assumptions as in question 3, provide the diagram.
corresponding to the different frames exchanged between A and B.
Exercise 13:
Let two stations transmitting bidirectionally simultaneously 4 consecutive I frames and using a
HDLC type procedure. It is assumed that the initialization of the data link has been
performed and that the propagation and acknowledgment time of the frames is negligible. We
suppose that the size of the window is sufficient not to block the processes
The numbered frames 0 and 2 are erroneous when both are emitted.
first times in both directions. They are properly reissued the next time.
1. Provide the diagram of the frames exchanged between the two stations with the mode of
simple rejection (REJ).
2. Provide the diagram of the frames exchanged between the two stations when they
use the selective rejection mode (SREJ instead of REJ).
Exercise 14:
A bank manages the data connections of its ATMs using the HDLC protocol.
with simple rejection8. Each automaton has a data link with the following characteristics
following:
binary rate: 14,400 bits/s;
anticipation window equal to 4.
The bank's server uses a data link configured as follows:
binary rate: 2.048 Mbit/s;
anticipation window equal to 7.
The introduction of a customer's bank card initiates a banking operation, which takes place
as follows: after entering the client's data, the automated system sends a frame I describing
the operation requested from the bank server. The latter, after verifying the data
sent by the automated system, launches the customer account management application, then the application
create a receipt and send it to the automaton in a frame I. The automaton will be able to
then print the ticket to be provided to the customer (or display the operation result on the screen of
the automaton).
[Link] the frame exchange between the banking terminal and its network access point.
assuming that data transmission occurs with an error of
transmission in the first frame I sent in each direction (we are not concerned with
the management of bitP/F).
ISTAG, LIG
12
Course: Computer Architectures and Networks Chapter 2
3. This time, the error handling of transmission is done by selective rejection (SREJ) of the
frames (we no longer use the LAP-B protocol). By taking the same assumptions
as previously, provide the diagram describing the exchanges between the automaton and
its network access point.
ISTAG, LIG
13