0% found this document useful (0 votes)
10 views33 pages

flowcontrol unit2 computer network

Uploaded by

singhhardik4484
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views33 pages

flowcontrol unit2 computer network

Uploaded by

singhhardik4484
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Line Discipline, Flow Control,

Error Control
Faculty Kamna Singh
• Line Discipline is function of Data link layer. It simply determines
and identifies the direction of communication. It is simply process
of coordinating half-duplex transmission i.e. data can be
transmitted in both directions on network of data communication
but not at the same time just by establishing and developing
continuity among sender and receiver stations before transfer of
data.
• It also makes sure that whether or not receiver is ready to accept
or signal sender to start. Line discipline is generally sequence of
various operations of network among devices that usually
transfers and receives data, controls errors occurred during the
transmission, deals with message sets sequence, and also ensures
confirmation that data is being received. It is also used to
determine which of device can transfer or transmit, and when it
can transfer data.
• There are basically two ways of doing Line discipline as given
below –
• 1. ENQ/ACK (Enquiry/Acknowledgement) :
ENQ/ACK is a procedure of line discipline that is generally used to
determine that which of device on network is capable of initiating
or starting transmission of data or message and whether the
receiver is ready and is capable to receive the data or not. If the
hosts have similar and equal ranks, then either of hosts or stations
can initiate process of transmission.
• The initiating device generally establishes session in both
transmission i.e. full and half-duplex. Both of devices can send or
transmit simultaneously once session is established in full-duplex.
But in full-duplex, initiator transmits data whereas responder
simply waits. The responder further might take over link when
initiator is finished or simply has requested for the response.
• 2. Poll/Select :
The Poll/Select method in line discipline basically works with some
topologies where one of devices is considered as primary station
and other devices are considered as secondary stations.
Multipoint connections can be seen rather than two i.e.,
multipoint systems must coordinate several nodes.
• When primary station wants to transmit something to secondary
station i.e. downstream, then Select mode is used. To solicit (ask
for obtaining) transmission from secondary to primary i.e.
upstream, then Poll mode is used. The primary device basically
controls and handles link or connection and on the other hand,
secondary device simply follows its instructions.
FLOW CONTROL
• Flow control is design issue at Data Link Layer.
It is technique that generally observes proper
flow of data from sender to receiver. It is very
essential because it is possible for sender to
transmit data or information at very fast rate
and hence receiver can receive this
information and process it. This can happen
only if receiver has very high load of traffic as
compared to sender, or if receiver has power
of processing less as compared to sender.
• Flow control is basically technique that gives permission to two of
stations that are working and processing at different speeds to
just communicate with one another. Flow control in Data Link
Layer simply restricts and coordinates number of frames or
amount of data sender can send just before it waits for an
acknowledgment from receiver. Flow control is actually set of
procedures that explains sender about how much data or frames
it can transfer or transmit before data overwhelms receiver.
• The receiving device also contains only limited amount of speed
and memory to store data. This is why receiving device should be
able to tell or inform the sender about stopping the transmission
or transferring of data on temporary basis before it reaches limit.
It also needs buffer, large block of memory for just storing data or
frames until they are processed.

1. Stop-and-Wait Flow Control :
This method is the easiest and simplest form of flow
control. In this method, basically message or data is
broken down into various multiple frames, and then
receiver indicates its readiness to receive frame of
data. When acknowledgment is received, then only
sender will send or transfer the next frame.
• This process is continued until sender transmits EOT
(End of Transmission) frame. In this method, only one
of frames can be in transmission at a time. It leads to
inefficiency i.e. less productivity if propagation delay is
very much longer than the transmission delay.
• Advantages –
• This method is very easiest and simple and each of the
frames is checked and acknowledged well.
• It can also be used for noisy channels.
• This method is also very accurate.
• Disadvantages –
• This method is fairly slow.
• In this, only one packet or frame can be sent at a time.
• It is very inefficient and makes the transmission process
very slow.

• 2. Sliding Window Flow Control :
This method is required where reliable in-order delivery of
packets or frames is very much needed like in data link
layer. It is point to point protocol that assumes that none of
the other entity tries to communicate until current data or
frame transfer gets completed. In this method, sender
transmits or sends various frames or packets before
receiving any acknowledgment.
• In this method, both the sender and receiver agree upon
total number of data frames after which acknowledgment is
needed to be transmitted. Data Link Layer requires and uses
this method that simply allows sender to have more than
one unacknowledged packet “in-flight” at a time. This
increases and improves network throughput.
• Advantages –
• It performs much better than stop-and-wait flow
control.
• This method increases efficiency.
• Multiples frames can be sent one after another.
• Disadvantages –
• The main issue is complexity at the sender and
receiver due to the transferring of multiple frames.
• The receiver might receive data frames or packets out
the sequence.
• The sliding window is a technique for sending multiple
frames at a time. It controls the data packets between
the two devices where reliable and gradual delivery of
data frames is needed. It is also used in TCP
(Transmission Control Protocol).
• In this technique, each frame has sent from the
sequence number. The sequence numbers are used to
find the missing data in the receiver end. The purpose
of the sliding window technique is to avoid duplicate
data, so it uses the sequence number.
Error control
• Error control in data link layer is the process of
detecting and correcting data frames that have
been corrupted or lost during transmission.
• In case of lost or corrupted frames, the receiver
does not receive the correct data-frame and
sender is ignorant about the loss. Data link layer
follows a technique to detect transit errors and
take necessary actions, which is retransmission of
frames whenever error is detected or frame is
lost. The process is called Automatic Repeat
Request (ARQ).
Phases in Error Control

• The error control mechanism in data link layer involves the


following phases −
• Detection of Error − Transmission error, if any, is detected by
either the sender or the receiver.
• Acknowledgment − acknowledgment may be positive or negative.
– Positive ACK − On receiving a correct frame, the receiver sends a
positive acknowledge.
– Negative ACK − On receiving a damaged frame or a duplicate frame, the
receiver sends a negative acknowledgment back to the sender.
• Retransmission − The sender maintains a clock and sets a timeout
period. If an acknowledgment of a data-frame previously
transmitted does not arrive before the timeout, or a negative
acknowledgment is received, the sender retransmits the frame.
Error Control Techniques
Stop and Wait ARQ
• This protocol involves the following transitions −
• A timeout counter is maintained by the sender, which is
started when a frame is sent.
• If the sender receives acknowledgment of the sent frame
within time, the sender is confirmed about successful
delivery of the frame. It then transmits the next frame in
queue.
• If the sender does not receive the acknowledgment within
time, the sender assumes that either the frame or its
acknowledgment is lost in transit. It then retransmits the
frame.
• If the sender receives a negative acknowledgment, the
sender retransmits the frame.
Stop and Wait ARQ, damaged frame
Stop and Wait ARQ, lost frame
Stop and Wait ARQ, lost ack frame
Sliding window ARQ
Go-Back-N ARQ
• The working principle of this protocol is −
• The sender has buffers called sending window.
• The sender sends multiple frames based upon the
sending-window size, without receiving the acknowledgment of
the previous ones.
• The receiver receives frames one by one. It keeps track of
incoming frame’s sequence number and sends the corresponding
acknowledgment frames.
• After the sender has sent all the frames in window, it checks up to
what sequence number it has received positive acknowledgment.
• If the sender has received positive acknowledgment for all the
frames, it sends next set of frames.
• If sender receives NACK or has not receive any ACK for a particular
frame, it retransmits all the frames after which it does not receive
any positive ACK.
Go Back n , Damaged Data Frame
Go Back n , Lost Data Frame
Go Back n , Damaged Data Frame
Go Back n , Lost ACK Frame
Selective Reject ARQ
• Both the sender and the receiver have buffers called
sending window and receiving window respectively.
• The sender sends multiple frames based upon the
sending-window size, without receiving the
acknowledgment of the previous ones.
• The receiver also receives multiple frames within the
receiving window size.
• The receiver keeps track of incoming frame’s sequence
numbers, buffers the frames in memory.
• It sends ACK for all successfully received frames and sends
NACK for only frames which are missing or damaged.
• The sender in this case, sends only packet for which NACK is
received.
Selective Reject ARQ, Damaged Data
frame

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