Data link layer is divided into two sub layer:
1)
DLC
2)
MAC
DLC: it stands for
data link control. It deals with the procedure for communication between node
to node communications. It includes flow control, error control and framing.
1)
Framing: Framing
in the data link layer separate the message from source to destination by
adding a sender address. The destination address defines where the packet has
to go.
Frame
size: frame can be of fixed or
variable size. In fixed size frame there
is no need to defining the boundary of frame, the size itself can be used as
delimiter. In variable size there is need of a way for defining the end of one
frame and the beginning of next frame. For this [purpose two approaches are
used:
1) Character oriented 2) Bit oriented.
Character oriented: in character oriented framing data to be
carried are 8-bit character forming a code system such as ASCII. It has two parts: header and trailer. Header
contains the source and destination address and other control information. The
trailer part contains error detection redundant bits. To separate frame flag is
used which is also of 8-bit. It is useful only fro sending character. Byte stuffing technique is used in this. In
byte stuffing a special byte is added to the frame .the data section is stuffed
with an extra byte. This byte is usually called the Escape sequence and has a predefined pattern. Whenever the receiver
encounters the ESC character, it removes it from the data section and treats
the next character as data not as delimiting flag.
Bit Oriented:
In character oriented, flag pattern is used in order to tell
the receiver that frame Is not ended here. For this problem bit stuffing is
used. In this single bit is stuffed instead of byte.
2) Flow and error control: Sender sends the
data in the form of frame and receiver receive the data. The rate of sender and
receiver is not same. May be the rater sender is greater than receiver. Due to
that reason data item may lost at the receiver end. So it is necessary to
control the flow.
A) Buffer: Flow control can be implemented with the use
of two buffers; one at the sending data link layer and the other at receiver
end. When the buffer of the receiving data link layer is full, it informs the
sending data link layer to stop pushing frames.
Error control: error control at the data link layer is
normally very simple and implemented using one of the following two methods. In
both methods a CRC is added to the header by the sender and checked by the
receiver.
a)
In first method if the frame is corrupted it is
silently discarded. If it is not corrupted it is delivered to the network
layer.
b)
In second method if frame is not corrupted it is
silently discarded, if it corrupted than an acknowledgement is send to the sender.
Connection oriented
protocol and connectionless protocol:
In DLC protocol may be connection oriented or
connectionless. In connectionless protocols, frames are sending to the next
without any relationship between the frames; each frame is independent.
Connectionless does not means that there is no physical connection between the
nodes; it means there is no connection between frames.
In connection oriented protocol a logical connection should
first be established between the two nodes. In this the frames are numbered and
send in order. If they are not received in that order the receiver wait until
all frames belonging to the sender set are received and then delivered to the
network layer.
Comments
Post a Comment