Unit 3 - Lec 11
Unit 3 - Lec 11
2
Data Link Layer
The frame consists of an embedded packet,
some control information (in the header),
and a checksum (in the trailer).
4
Data Link Layer
As soon as the receiving data link layer has
acquired an undamaged frame, it checks the
control information in the header, and if
everything is all right, passes the packet
portion to the network layer.
5
Frame
A frame is composed of four fields:
kind
seq
ack
info
The first three fields contain control
information and the last field contain actual
data to be transferred.
8
Types of Stop and Wait Protocol:
9
Elementary Data Link Protocols
10
An Unrestricted Simplex Protocol
12
An Unrestricted Simplex Protocol
The sender is in an infinite while loop just
pumping data out onto the line as fast as it
can.
13
An Unrestricted Simplex Protocol
The receiver initially waits the arrival of an
undamaged frame.
15
A Simplex Stop-and-Wait Protocol
After having passed a packet to its network
layer, the receiver sends a little dummy
frame back to the sender which gives the
sender permission to transmit the next
frame.
17
A Simplex Stop-and-Wait Protocol
18
A Simplex Protocol for a Noisy Channel
19
A Simplex Protocol for a Noisy Channel
20
A Simplex Protocol for a Noisy Channel
22
A Simplex Protocol for a Noisy Channel
23
A Simplex Protocol for a Noisy Channel
25
A Simplex Protocol for a Noisy Channel
26
Disadvantage of Stop and Wait
27
Sliding Window Protocol
1. Data is transmitted in both the directions.
2. Requires full duplex communication
channel.
3. No separate ACK sent.
4. The channel is a Noisy channel.
5. Uses the concept of piggybacking
28
Piggybacking
When a data frame
arrives, instead of
immediately sending a
separate control frame,
the receiver restrains
itself and waits until the
network layer passes it
the next packet.
The acknowledgement is
attached to the outgoing 29
Piggybacking
The acknowledgement gets a free ride on the
next outgoing data frame.
30
Advantage of Piggybacking
Better use of the available channel
bandwidth.
The ack field in the frame header costs only a few
bits, whereas a separate frame would need a
header, the acknowledgement, and a checksum.
32
Piggybacking
Solution:
Waiting for a fixed number of milliseconds.
If a new packet arrives quickly, the
acknowledgement is piggybacked onto it;
Otherwise, if no new packet has arrived by the
end of this time period, the data link layer just
sends a separate acknowledgement frame.
33