0% found this document useful (0 votes)
2 views

8- Data Link Layer

The document discusses the Data Link Layer, detailing its sub-layers, framing techniques, flow control protocols, and error control mechanisms. It covers various protocols such as Stop-and-Wait ARQ, Go-Back-N ARQ, and Selective Repeat ARQ, along with their functionalities and design considerations. Additionally, it introduces High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP), highlighting their roles in data transmission and link management.

Uploaded by

sagarsv.it.23
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

8- Data Link Layer

The document discusses the Data Link Layer, detailing its sub-layers, framing techniques, flow control protocols, and error control mechanisms. It covers various protocols such as Stop-and-Wait ARQ, Go-Back-N ARQ, and Selective Repeat ARQ, along with their functionalities and design considerations. Additionally, it introduces High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP), highlighting their roles in data transmission and link management.

Uploaded by

sagarsv.it.23
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 45

CN(ITDC-208)

Data Link Layer


Framing, Flow Control
Data Link Layer

Data link layer is divided into two sub-layers: Data Link Control
(DLC) and Multiple Access Control (MAC).
The data link control deals with the design and procedures for
communication between two adjacent nodes: node to node
communication.
Data link control functions include framing, flow and error control,
and software implemented protocols that provides smooth and
reliable transmission of frames between nodes.
Can we send the whole message in a frame?

Types of framing:
• Fixed-Size Framing
• Variable-Size Framing

2
A frame in a bit-oriented protocol

In bit stuffing, if a 0 and five consecutive 1 bits are


encountered, an extra 0 is added.

3
Variable-Size Framing: Bit Stuffing and
Unstuffing

4
A frame in a character-oriented
protocol

5
Variable-Size Framing: Byte Stuffing and
Unstuffing

6
Flow control at the data link layer

7
Data Link Layer protocols

8
Simplest Protocol

9
Stop-and-Wait Protocol

10
Sender Site Algorithm of Simplex Stop – and –
Wait Protocol for Noiseless Channel

begin
canSend = True; //Allow the first frame to be sent
while (true) //check repeatedly
do
Wait_For_Event(); //wait for availability of packet
if ( Event(Request_For_Transfer) AND canSend) then
Get_Data_From_Network_Layer();
Make_Frame();
Send_Frame_To_Physical_Layer();
canSend = False;
else if ( Event(Acknowledgement_Arrival)) then
Receive_ACK();
canSend = True;
end if
end while
end

11
Receiver Site Algorithm of Simplex Stop
– and – Wait Protocol for Noiseless
Channel
while (true) //check repeatedly

do

Wait_For_Event(); //wait for arrival of frame

if ( Event(Frame_Arrival) then

Receive_Frame_From_Physical_Layer();

Extract_Data();

Deliver_Data_To_Network_Layer();

Send_ACK();

end if

end while
12
Stop-and-Wait Automatic Repeat
Request
The sender will not send the next frame until it is sure that the current one
is correctly receive
Sequence number is necessary to check for duplicated frames

Figure: Normal Operation


13
Error control in stop and wait ARQ is done by keeping a
copy of the sent frame and retransmitting of the frame
after the timer expires.

ACK frame for this protocol has a seq no field.

Protocol specify that frames need to be numbered.

A field is added to the data frame to hold the sequence


number of that frame.

A filed is added to data frame to hold the sequence number


of that frame.

14
Design of the Stop-and-Wait ARQ
Protocol

15
Stop-and-Wait ARQ

A damage or lost frame treated by the same manner by the receiver.

Figure: Stop-and-Wait ARQ, lost or damaged frame

16
Stop-and-Wait ARQ

Importance of frame numbering: prevents retaining of duplicate frames.

Figure: Stop-and-Wait ARQ, lost ACK frame


17
Stop-and-Wait ARQ

Numbered acknowledgments are needed if an acknowledgment is delayed and


the next frame is lost.

Figure: Stop-and-Wait ARQ, delayed ACK and lost frame

18
Go-Back-N Automatic Repeat
Request

To improve the efficiency of transmission, multiple frame


must be in transition while waiting for acknowledgment.

We can send multiple frames before receiving the


acknowledgment in Go-Back-N ARQ.

We keep a copy of these frames until the acknowledgement


arrive.

The sequence numbers are modulo 2^m, where m is the


size of the sequence number field in bits number field in
bits

19
Send window for Go-Back-N ARQ

20
The size of receive window is always 1.

Any frame arriving out of order is discarded and needs to


be resent.

The window slides when a correct frame has arrived; sliding


occurs one slot at a time.

Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in


which the size of the send window is 1

21
Receive window for Go-Back-N ARQ

22
Design of Go-Back-N ARQ

23
Window size for Go-Back-N ARQ

24
Go-Back-N Automatic Repeat
Request
ACK1 is not necessary if ACK2 is sent: Cumulative ACK

Figure: Normal operation


25
Go-Back-N Automatic Repeat
Request
Correctly received out of order packets are not Buffered

Figure: Damage or Lost Frame


26
Selective Repeat ARQ

27
Send window for Selective Repeat
ARQ

28
Receive window for Selective Repeat
ARQ

29
Design of Selective Repeat ARQ

30
Selective Repeat ARQ, window size

31
Piggybacking ( Bidirectional
transmission)
It is a method to combine a data frame with an acknowledgment.
It can save bandwidth because data frame and an ACK frame can
combined into just one frame

32
High-level Data Link Control (HDLC)

HDLC is a bit-oriented protocol for communication over


point-to-point and multi-point links. It implements the ARQ
mechanisms

Two transfer modes


– Normal Response mode (NRM)
• Primary station can send commands and secondary
stations can only respond
– Asynchronous balanced mode (ABM)
• The link is point-to-point i.e each station can function
as primary and secondary station

33
HDLC transfer modes

Figure: HDLC in point to point and multi-point scenario in NRM

34
HDLC transfer modes

Figure: HDLC in point to point scenario in ABM

35
Frames

Three types of frames:

Information Frames (I-frames): It is used to transport user data and control


information.

Supervisory frames (S-frames):

Unnumbered frames: It is reserved for system management.

Each of frames serves as an envelope for the transmission of a different


type of message.

36
HDLC Frame Format

37
HDLC frames

Information frames (I-frame)


Supervisory frames (S-frame)
Unnumbered frames (U-frame)

38
39
Point-to-Point Protocol (PPP)

Mostly used on internet communication at data-link layer

It is byte oriented protocol

Figure: PPP frame

40
PPP uses set of protocols to establish the link, authenticate the parties
involved, and carry the network layer data.
Three set of protocols are defined to make PPP powerful:
• Link control protocol (LCP): responsible for establishing, maintaining,
configuring, and terminating links.
• Authenticate protocol (APs): it validate the identity of a user who need to
access a set of resources.
• Network control protocols (NCPs): PPP is multiple network layer protocol.
IT can carry a N/w layer data packet from protocols defined by Internet,
OSI, DECnet, Novel, AppleTalk etc.

41
Components of PPP

42
Question 1: Station A uses 32 byte packets to transmit messages to Station B
using a sliding window protocol. The round trip delay between A and B is 80
milliseconds and the bottleneck bandwidth on the path between A and B is 128
kbps. What is the optimal window size that A should use?

43
Host A is sending data to host B over a full duplex link. A
and B are using the sliding window protocol for flow control.
The send and receive window sizes are 5 packets each.
Data packets (sent only from A to B) are all 1000 bytes long
and the transmission time for such a packet is 50 µs.
Acknowledgement packets (sent only from B to A) are very
small and require negligible transmission time. The
propagation delay over the link is 200 us. What is the
maximum achievable throughput in this communication?

44
Consider the sliding window flow-control protocol operating between a sender and a
receiver over a full-duplex error-free link. Assume the following:
• The time taken for processing the data frame by the receiver is negligible.
• The time taken for processing the acknowledgement frame by the sender is
negligible.
• The sender has infinite number of frames available for transmission.
• The size of the data frame is 2,000 bits and the size of the acknowledgement frame
is 10 bits.
• The link data rate in each direction is 1 Mbps (=10^6 bits per second).
• One way propagation delay of the link is 100 milliseconds.
The minimum value of the sender's window size in terms of the number of frames,
(rounded to the nearest integer) needed to achieve a link utilization of 50% is__

45

You might also like