Escolar Documentos
Profissional Documentos
Cultura Documentos
CONTENTS
5.1 OBJECTIVES
5.2 INTRODUCTION
Chapter 5
DATA LINK CONTROL
5.1OBJECTIVES
The objectives of this chapter is to familiarize with : -
i) The need for data link control
ii) Concept of data link layer
iii) The understanding of data link protocol
iv) The function of data link control
v) Concept of flow control
vi) Concept of data link management
5.2INTRODUCTION
The services provided by the physical layer are limited to conversion of bits
into electrical signals and transmission of these signals over the interconnecting
media. But it is not sufficient for reliable transmission of the bits. Disturbed line
conditions of the media may introduce errors which must be taken care of. The basic
function-error control and other associated functions are carried out by the second
layer of the OSI model, data link layer. In the following sections, we shall discuss in
general the mechanisms used for implementation of these functions in various data
link protocols.
Fig. 5.1
The bits could also be lost if the receiving device is not ready for incoming bit
stream. Therefore, a data flow control mechanism also needs to be implemented. Flow
control also enables error control because an error is detected, the receiver should be
capable halting further incoming flow of bits till the errors have been corrected.
Error control and flow control functions ensure reliable transfer of bits from
one device to the other. These functions are not carried out by the physical layer but
are implemented in the data link layer.
Fig. 5.2
To carry out error and flow control functions, the data link layer receives the
data to be sent to the other device from the next higher layer, adds some control bits to
a block of data bits as a separate field and hands over the data block containing
control bits (called a frame) to the physical layer. The physical layer converts the bits
to an electrical signal for transmission over the interconnecting transmission media
(Fig. 5.3).
At the receiving end, the incoming electrical signal is converted back to bits
by the physical layer and the frame is handed over to the data link layer. The data link
layer removes the control bits and hands over the received data bits to the next layer.
These control bits are used to realise the data link layer functions.
Fig. 5.3
It is essential that the structure of the frame should be known to both the
devices so that control bits could be identified. The devices should also agree on the
set of procedures to be adopted for exchange of the control information. The specified
set of rules and procedures for carrying out data link control functions is called data
link protocol.
5.5 FRAMING
The first and foremost task of the data link layer is to format the user data as
series of frames each having a predefined structure. The frame format, in general,
consists of three components as shown in Fig. 5.4(a).
• Header
• Data
• Trailer
The data field contains the data bits received from the next higher layer and
which are to be transmitted across the data link. The header and the trailer consist of
one or more fields containing data link protocol control information.
Fig. 5.4
It is not necessary that all frames contain all the fields. Some of the frames
contain only the control information. These frames are used for link management,
error and flow control functions.
5.6FRAME FORMAT
A frame consists of number of fields and, therefore, its format is so designed
that the receiver is able to
• locate the beginning of each frame.
• locate various fields in a frame.
• separate the data field.
For this purpose, some field identifiers and frame identifiers, are incorporated.
For example, in the HDLC frame as shown in Fig.4(b), the flags identify the start and
end of the frames of the other fields, address, control and FCS fields have fixed
number of bits, so they can be easily separated once flags have been identified. The
remaining bits of the frame constitute the data field.
5.7TRANSPARENCY
Problems may arise if the data field in a frame contains bit patterns similar to
the bits in the header or trailer. For example, if the data contains a bit pattern same as
the flag in a HDLC frame, the receiver may mistake it for end of the frame. Therefore,
the frame format should be so designed that such situations are taken care of an no
restrictions are placed on the user as to what bit patterns can/cannot be sent.
Fig. 5.5
LINK UTILISATION
In stop-and-wait flow control mechanism, only one frame is sent at a time and
each frame is individually acknowledged. The frame and the acknowledgement take
certain amount of propagation time to travel across the transmission media.
A initiates the transmission with its first frame F1 followed by frames F2, F3,
etc. A can send upto F7 without waiting for an acknowledgement from B.
Fig. 5.6
5.8.3SEQUENCE NUMBERING
In sliding window, all frames are given a sequence number which is a binary
number of fixed number of bits. The number of bits are determined by the window
size. If the sequence number consists of "n" number of bits, the maximum size of the
window can be 2n-1.
LINK UTILISATION
Unlike stop-and-wait mechanism, in sliding window flow control, each frame
is not individually acknowledged and, therefore, the sending end can send number of
frames one after the other without waiting for acknowledgement.
Recovery refers to how the system gets back into normal operating mode after
a correction has been made. Generally, the sending end treats each retransmission
same as the first transmission and continues with the next frame. It keeps a historical
record to detect if the link has become very noisy resulting in very frequent
retransmissions. In such an eventuality, it may initiate recovery procedures which may
involve re-establishment of the link.
For the flow integrity errors, the data link protocols specify the procedures to
be adopted to detect and recover the missing frames and acknowledgements. It must
be remembered that no error method is 100% effective. There will always be some
undetected content and flow integrity errors. Residual Error Rate (RER) refers to the
errors that still exist in the data stream after all error control procedures have been
completed.
The algorithm described above does not cover all contingencies. If a frame is
lost during the transmission, the receiver will have no knowledge of the frame and,
therefore, when it is challenged by the sending end, it shall respond with the
acknowledgement of the previous frame. The sending end will obviously misinterpret
it as acknowledgement for the lost frame. So a frame will be completely lost without
the sender or the receiver being aware of the loss (Fig. 5.7).
Fig. 5.7
Fig. 5.8
Fig. 5.9
Data link protocols define a set of control symbols and procedures to execute
the above mentioned functions. These symbols and procedures are specific to a data
link protocol and, therefore, cannot be generalised.
Fig. 5.10