Lecture 11 - Data Link Layer Protocol: Delivered by Joel Anandraj.E Ap/It

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

LECTURE 11 - DATA LINK LAYER

PROTOCOL
Delivered by
Joel Anandraj.E
AP/IT
Introduction
Traditionally there were four protocols to deal with error
control and flow control.
Simple
Still in use
Stop-and-Wait
Go-Back-N
Disappeared
Selective-Repeat
Finite State Machine (FSM)
An FSM is thought of as a machine with a finite
number of states.

The machine is always in one of the states until an


event occurs.

Each event is associated with two reactions: defining


the list (possibly empty) of actions to be performed
and determining the next state (which can be the same
as the current state).
One of the states must be defined as the initial state, the
state in which the machine starts when it turns on.

We have used rounded-corner rectangles to show states,


colored text to show events, and regular black text to show
actions
Simple Protocol
Our first protocol is a simple protocol with neither
flow nor error control.
We assume that the receiver can immediately handle
any frame it receives.
In other words, the receiver can never be overwhelmed
with incoming frames.
Simple Protocol
FSMs
The sender site should not send a frame until its
network layer has a message to send.
The receiver site cannot deliver a message to its
network layer until a frame arrives.
We can show these requirements using two FSMs.
Each FSM has only one state, the ready state.
FSM for Simple Protocol
Flow Diagram for Simple Protocol
Stop-and-Wait Protocol

This protocol uses both flow and error control.

In this protocol, the sender sends one frame at a time


and waits for an acknowledgment before sending the
next one.

To detect corrupted frames, we need to add a CRC to


each data frame.
In the receiving end if the CRC is incorrect, the frame
is corrupted and silently discarded.

The silence of the receiver is a signal for the sender


that a frame was either corrupted or lost.

Every time the sender sends a frame, it starts a timer.

If acknowledgement arrives within the time the next


frame will be sent otherwise the frame is resent.
Stop and Wait Protocol
FSMs for our primitive Stop-and-Wait protocol.
Sender States

Ready State. When the sender is in this state, it is only


waiting for a packet from the network layer.

Blocking State. When the sender is in this state, three events


can occur:
If a time-out occurs, the sender resends the frame and resets
timer
If a corrupted ACK arrives, it is discarded.
If an error-free ACK arrives, the sender stops the timer and
discards the saved copy of the frame
Receiver
The receiver is always in the ready state.
Two events may occur:
If an error-free frame arrives, the message in the frame is
delivered to the network layer and an ACK is sent.
If a corrupted frame arrives, the frame is discarded.
The network layer at the receiver site receives
two copies of the third packet when ACK is
Example Problem lost.
Sequence and Acknowledgment Numbers
Duplicate packets, as much as corrupted packets, need to be
avoided.

So we need to add sequence numbers to the data frames and


acknowledgment numbers to the ACK frames.

However, numbering in this case is very simple.

Sequence numbers are 0, 1, 0, 1, 0, 1, . . .

The acknowledgment numbers can also be 1, 0, 1, 0, 1, 0, …


Thank You…

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy