KEMBAR78
flow control pptx for computer networking | PPTX
Flow Control
1) Stop & Wait
This flow control mechanism forces the sender after transmitting a data frame to
stop and wait until the acknowledgement of the data-frame sent is received.
Flow Control
2) Sliding Window
In this flow control mechanism, both sender and
receiver agree on the number of data-frames after
which the acknowledgement should be sent.
As we learnt, stop and wait flow control mechanism wastes resources, this
protocol tries to make use of underlying resources as much as possible.
Flow Control
2) Sliding Window-Sender
Window
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Frames
This wall moves to the right when a Frame is received
This wall moves to the right when an Ack is sent
Flow Control
2) Sliding Window-Sender
Window
o At the beginning of a transmission, the sender window contains n-1 frames, and
when they are sent out, the left boundary moves inward shrinking the size of the
window. For example, if the size of the window is w if three frames are sent out,
then the number of frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number which
will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been sent
out and no acknowledgement has arrived, then the sender window contains only
two frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that
0 through 3 frames have arrived undamaged and the sender window is expanded
to include the next four frames. Therefore, the sender window contains six frames
(5,6,7,0,1,2).
Flow Control
2) Sliding Window-Receiver
Window
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Flow Control
2) Sliding Window-Receiver
Window
o At the beginning of transmission, the receiver window does not contain n
frames, but it contains n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received,
but it represents the number of frames that can be received before an
ACK is sent. For example, the size of the window is w, if three frames are
received then the number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the
number equal to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window
contains seven spaces for seven frames. If the one frame is received, then
the receiver window shrinks and moving the boundary from 0 to 1. In this
way, window shrinks one by one, so window now contains the six spaces.
If frames from 0 through 4 have sent, then the window contains two
spaces before an acknowledgement is sent.
Error Control
When data-frame is transmitted, there is a probability that data-frame may
be lost in the transit or it is received corrupted. In both cases, the receiver
does not receive the correct data-frame and sender does not know anything
about any loss.In such case, both sender and receiver are equipped with
some protocols which helps them to detect transit errors such as loss of data-
frame. Hence, either the sender retransmits the data-frame or the receiver
may request to resend the previous data-frame.
Requirements for error control mechanism:
∙ Error detection - The sender and receiver, either both or any, must
ascertain that there is some error in the transit.
∙ Positive ACK - When the receiver receives a correct frame, it should
acknowledge it.
∙ Negative ACK - When the receiver receives a damaged frame or a
duplicate frame, it sends a NACK back to the sender and the sender must
retransmit the correct frame.
∙ Retransmission: The sender maintains a clock and sets a timeout period.
If an acknowledgement of a data-frame previously transmitted does not
arrive before the timeout the sender retransmits the frame, thinking that
the frame or it’s acknowledgement is lost in transit.
There are three types of techniques available which Data-link layer may
Error Control
1) Stop and Wait ARQ
The following transition may occur in Stop-
and-Wait ARQ:
o The sender maintains a timeout
counter.
o When a frame is sent, the sender starts
the timeout counter.
o If acknowledgement of frame comes in
time, the sender transmits the next
frame in queue.
o If acknowledgement does not come in
time, the sender assumes that either the
frame or its acknowledgement is lost in
transit. Sender retransmits the frame and
starts the timeout counter.
o If a negative acknowledgement is
received, the sender retransmits the
frame.
Error Control
2) Go-Back-N ARQ
Stop and wait ARQ mechanism does not utilize
the resources at their best. When the
acknowledgement is received, the sender sits idle
and does nothing. In Go-Back-N ARQ method,
both sender and receiver maintain a window.
The sending-window size enables the sender to
send multiple frames without receiving the
acknowledgement of the previous ones. The
receiving-window enables the receiver to receive
multiple frames and acknowledge them. The
receiver keeps track of incoming frame’s
sequence number.
When the sender sends all the frames in window,
it checks up to what sequence number it has
received positive acknowledgement. If all frames
are positively acknowledged, the sender sends
next set of frames. If sender finds that it has
received 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.
Error Control
2) Go-Back-N ARQ
Error Control
3) Selective Repeat ARQ
In Go-back-N ARQ, it is assumed that the
receiver does not have any buffer space for
its window size and has to process each
frame as it comes. This enforces the sender
to retransmit all the frames which are not
acknowledged.
In Selective-Repeat ARQ, the receiver while
keeping track of sequence numbers, buffers
the frames in memory and sends NACK for
only frame which is missing or damaged.
The sender in this case, sends only packet
for which NACK is received.
Error Control
3) Selective Repeat ARQ

flow control pptx for computer networking

  • 1.
    Flow Control 1) Stop& Wait This flow control mechanism forces the sender after transmitting a data frame to stop and wait until the acknowledgement of the data-frame sent is received.
  • 2.
    Flow Control 2) SlidingWindow In this flow control mechanism, both sender and receiver agree on the number of data-frames after which the acknowledgement should be sent. As we learnt, stop and wait flow control mechanism wastes resources, this protocol tries to make use of underlying resources as much as possible.
  • 3.
    Flow Control 2) SlidingWindow-Sender Window 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Frames This wall moves to the right when a Frame is received This wall moves to the right when an Ack is sent
  • 4.
    Flow Control 2) SlidingWindow-Sender Window o At the beginning of a transmission, the sender window contains n-1 frames, and when they are sent out, the left boundary moves inward shrinking the size of the window. For example, if the size of the window is w if three frames are sent out, then the number of frames left out in the sender window is w-3. o Once the ACK has arrived, then the sender window expands to the number which will be equal to the number of frames acknowledged by ACK. o For example, the size of the window is 7, and if frames 0 through 4 have been sent out and no acknowledgement has arrived, then the sender window contains only two frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0 through 3 frames have arrived undamaged and the sender window is expanded to include the next four frames. Therefore, the sender window contains six frames (5,6,7,0,1,2).
  • 5.
    Flow Control 2) SlidingWindow-Receiver Window 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
  • 6.
    Flow Control 2) SlidingWindow-Receiver Window o At the beginning of transmission, the receiver window does not contain n frames, but it contains n-1 spaces for frames. o When the new frame arrives, the size of the window shrinks. o The receiver window does not represent the number of frames received, but it represents the number of frames that can be received before an ACK is sent. For example, the size of the window is w, if three frames are received then the number of spaces available in the window is (w-3). o Once the acknowledgement is sent, the receiver window expands by the number equal to the number of frames acknowledged. o Suppose the size of the window is 7 means that the receiver window contains seven spaces for seven frames. If the one frame is received, then the receiver window shrinks and moving the boundary from 0 to 1. In this way, window shrinks one by one, so window now contains the six spaces. If frames from 0 through 4 have sent, then the window contains two spaces before an acknowledgement is sent.
  • 7.
    Error Control When data-frameis transmitted, there is a probability that data-frame may be lost in the transit or it is received corrupted. In both cases, the receiver does not receive the correct data-frame and sender does not know anything about any loss.In such case, both sender and receiver are equipped with some protocols which helps them to detect transit errors such as loss of data- frame. Hence, either the sender retransmits the data-frame or the receiver may request to resend the previous data-frame. Requirements for error control mechanism: ∙ Error detection - The sender and receiver, either both or any, must ascertain that there is some error in the transit. ∙ Positive ACK - When the receiver receives a correct frame, it should acknowledge it. ∙ Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it sends a NACK back to the sender and the sender must retransmit the correct frame. ∙ Retransmission: The sender maintains a clock and sets a timeout period. If an acknowledgement of a data-frame previously transmitted does not arrive before the timeout the sender retransmits the frame, thinking that the frame or it’s acknowledgement is lost in transit. There are three types of techniques available which Data-link layer may
  • 8.
    Error Control 1) Stopand Wait ARQ The following transition may occur in Stop- and-Wait ARQ: o The sender maintains a timeout counter. o When a frame is sent, the sender starts the timeout counter. o If acknowledgement of frame comes in time, the sender transmits the next frame in queue. o If acknowledgement does not come in time, the sender assumes that either the frame or its acknowledgement is lost in transit. Sender retransmits the frame and starts the timeout counter. o If a negative acknowledgement is received, the sender retransmits the frame.
  • 9.
    Error Control 2) Go-Back-NARQ Stop and wait ARQ mechanism does not utilize the resources at their best. When the acknowledgement is received, the sender sits idle and does nothing. In Go-Back-N ARQ method, both sender and receiver maintain a window. The sending-window size enables the sender to send multiple frames without receiving the acknowledgement of the previous ones. The receiving-window enables the receiver to receive multiple frames and acknowledge them. The receiver keeps track of incoming frame’s sequence number. When the sender sends all the frames in window, it checks up to what sequence number it has received positive acknowledgement. If all frames are positively acknowledged, the sender sends next set of frames. If sender finds that it has received 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.
  • 10.
  • 11.
    Error Control 3) SelectiveRepeat ARQ In Go-back-N ARQ, it is assumed that the receiver does not have any buffer space for its window size and has to process each frame as it comes. This enforces the sender to retransmit all the frames which are not acknowledged. In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers, buffers the frames in memory and sends NACK for only frame which is missing or damaged. The sender in this case, sends only packet for which NACK is received.
  • 12.