Flow Control
Flow control is one of the important function of
DLL
e.g. A smart phone requests a Web page from a far more
powerful server, which then turns on the fire hose and blasts the
data at the poor helpless phone until it is completely swamped
To overcome above problem DLL uses feedback-based
flow control, the receiver sends back information to the sender
giving it permission to send more data, or at least telling the
sender how the receiver is doing.
The protocol based on feedback-based flow control
contains well-defined rules about when a sender may transmit
the next frame. These rules often prohibit frames from being
sent until the receiver has granted permission, either implicitly
or explicitly.
Stop-and-Wait Protocol for an Error-Free Channel
Preventing the sender from flooding the receiver with
frames faster than the latter is able to process them
• Solution :-> have the receiver provide feedback to
the sender.
Protocols in which the
sender sends one frame
and then waits for an
acknowledgement
before proceeding are
called stop-and-wait
Error Free Channel – No Frame loss
• Transmitter (Station A) sends a frame over the
communication line and then waits for a positive or
negative acknowledgement from the receiver (station
B).
• If no error occurs in the transmission, station B sends a
positive acknowledgement (ACK) to station A.
• Now, the transmitter starts to send the next frame. If
frame is received at station B with errors, then a
negative acknowledgement(NAK) is sent to station A.
In this case, station 'A' must retransmit the old frame.
• There is also a possibility that the information frames
or ACKs may get lost.
• Then, the sender is equipped with a timer. If no
recognizable acknowledgement is received when the
timer expires at the end of time out interval, the same
frame is sent again. ( Problem of duplication of Frames
)
sender
Receiver
Frame
ACK
Frame
ACK
Time Time
Noisy Channel
Stop-and-wait ARQ protocol
Working
1) Sender A sends a data frame or packet with
sequence number 0.
2) Receiver B, after receiving data frame, sends
and acknowledgement with sequence number 1
(sequence number of next expected data frame
or packet)
There is only one bit sequence number that
implies that both sender and receiver have
buffer for one frame or packet only.
Go Back n ARQ
It is Sliding window protocol wherein multiple
frames can be sent at a time.
In Go-Back-N ARQ, N is the sender's window
size.
If n=3, Go-Back-3, it means three frames can be
sent at a time before expecting the
acknowledgment from the receiver.
It uses the principle of protocol pipelining in
which the multiple frames can be sent before
receiving the acknowledgment of the first
frame.
In Go-Back-N ARQ, the frames are numbered
sequentially
The number of frames that can be sent at a time
totally depends on the size of the sender's
window.
If the acknowledgment of a frame is not
received within an agreed-upon time period,
then all the frames available in the current
window will be retransmitted.
Example : Assume that there are 11 frames to be
sent 0,1,2,3,4,5,6,7,8,9,10
Suppose window size i.e. n=4 (four frames can
be sent at a time before expecting the
acknowledgment of the first frame.)
When ack for frame 0 will be received , window will be shifted
by 1 frame position towards left to cover 1-4 frames
Now if ack for frame 1 is received then window will slide left to
cover 2-5 frames as shown below
Now suppose due to some reason ack for frame 2 does not received by sender and it
times out. Now sender will send all frames available in window i.e. 2-5 frames.
Receiver will discard previously received same
frames and accepts latest received frames
Selective Repeat ARQ
The Go-back-N ARQ protocol works well if it has
fewer errors. But if there are lot of errors in the
frames, lots of bandwidth loss in sending the
frames again.
If the receiver receives a corrupt frame, it does
not directly discard it. It sends a negative
acknowledgment to the sender. The sender
sends that frame again as soon as on the
receiving negative acknowledgment. There is no
waiting for any time-out to send that frame.
In SR protocol, sender window size is always same
as receiver window size.
Selective retransmission of frames is much more
efficient than retransmitting all the frames
SR protocol accepts the out of order frames.
SR protocol requires sorting at the receiver’s side.
If received frames are out of order, receiver
performs the sorting.
SR protocol leads to retransmission of lost frames
after expiry of time out timer.
Go-Back-N ARQ Selective Repeat ARQ
If a frame is corrupted or lost in
it,all subsequent frames have to
be sent again.
In this, only the frame is sent
again, which is corrupted or lost.
If it has a high error rate,it
wastes a lot of bandwidth.
There is a loss of low bandwidth.
It is less complex. It is more complex because it has
to do sorting and searching as
well. And it also requires more
storage.
It does not require sorting. In this, sorting is done to get the
frames in the correct order.
It does not require searching. The search operation is performed
in it.
It is used more. It is used less because it is more
complex.
Point to point protocol
Services provided by PPP
PPP defines the format of the frame to be
exchanged between the devices
It defines link control protocol (LCP) for:-
(a) Establishing the link between two devices.
(b) Maintaining this established link.
(c) Configuring this link.
(d) Terminating this link after the transfer.
It defines how network layer data are
encapsulated in data link frame.
PPP provides error detection.
Point to Point Protocol
• PPP uses several other protocols to establish link,
authenticate users and to carry the network layer data.
The various protocols used are:
1. Link Control Protocol
2. Authentication Protocol
3. Network Control Protocol
It is a byte oriented protocol (i.e. it simply views frame as
collection of bytes)
It is a WAN protocol widely used for broadband
communication having heavy loads and high speeds.
Transition Phases in PPP

Unit IV_Flow.pptx

  • 1.
  • 2.
    Flow control isone of the important function of DLL e.g. A smart phone requests a Web page from a far more powerful server, which then turns on the fire hose and blasts the data at the poor helpless phone until it is completely swamped To overcome above problem DLL uses feedback-based flow control, the receiver sends back information to the sender giving it permission to send more data, or at least telling the sender how the receiver is doing. The protocol based on feedback-based flow control contains well-defined rules about when a sender may transmit the next frame. These rules often prohibit frames from being sent until the receiver has granted permission, either implicitly or explicitly.
  • 6.
    Stop-and-Wait Protocol foran Error-Free Channel Preventing the sender from flooding the receiver with frames faster than the latter is able to process them • Solution :-> have the receiver provide feedback to the sender. Protocols in which the sender sends one frame and then waits for an acknowledgement before proceeding are called stop-and-wait Error Free Channel – No Frame loss
  • 7.
    • Transmitter (StationA) sends a frame over the communication line and then waits for a positive or negative acknowledgement from the receiver (station B). • If no error occurs in the transmission, station B sends a positive acknowledgement (ACK) to station A. • Now, the transmitter starts to send the next frame. If frame is received at station B with errors, then a negative acknowledgement(NAK) is sent to station A. In this case, station 'A' must retransmit the old frame. • There is also a possibility that the information frames or ACKs may get lost. • Then, the sender is equipped with a timer. If no recognizable acknowledgement is received when the timer expires at the end of time out interval, the same frame is sent again. ( Problem of duplication of Frames )
  • 10.
  • 11.
  • 13.
  • 14.
    Working 1) Sender Asends a data frame or packet with sequence number 0. 2) Receiver B, after receiving data frame, sends and acknowledgement with sequence number 1 (sequence number of next expected data frame or packet) There is only one bit sequence number that implies that both sender and receiver have buffer for one frame or packet only.
  • 15.
    Go Back nARQ It is Sliding window protocol wherein multiple frames can be sent at a time. In Go-Back-N ARQ, N is the sender's window size. If n=3, Go-Back-3, it means three frames can be sent at a time before expecting the acknowledgment from the receiver. It uses the principle of protocol pipelining in which the multiple frames can be sent before receiving the acknowledgment of the first frame.
  • 16.
    In Go-Back-N ARQ,the frames are numbered sequentially The number of frames that can be sent at a time totally depends on the size of the sender's window. If the acknowledgment of a frame is not received within an agreed-upon time period, then all the frames available in the current window will be retransmitted.
  • 17.
    Example : Assumethat there are 11 frames to be sent 0,1,2,3,4,5,6,7,8,9,10 Suppose window size i.e. n=4 (four frames can be sent at a time before expecting the acknowledgment of the first frame.)
  • 18.
    When ack forframe 0 will be received , window will be shifted by 1 frame position towards left to cover 1-4 frames
  • 19.
    Now if ackfor frame 1 is received then window will slide left to cover 2-5 frames as shown below Now suppose due to some reason ack for frame 2 does not received by sender and it times out. Now sender will send all frames available in window i.e. 2-5 frames.
  • 20.
    Receiver will discardpreviously received same frames and accepts latest received frames
  • 21.
    Selective Repeat ARQ TheGo-back-N ARQ protocol works well if it has fewer errors. But if there are lot of errors in the frames, lots of bandwidth loss in sending the frames again. If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative acknowledgment to the sender. The sender sends that frame again as soon as on the receiving negative acknowledgment. There is no waiting for any time-out to send that frame.
  • 23.
    In SR protocol,sender window size is always same as receiver window size. Selective retransmission of frames is much more efficient than retransmitting all the frames SR protocol accepts the out of order frames. SR protocol requires sorting at the receiver’s side. If received frames are out of order, receiver performs the sorting. SR protocol leads to retransmission of lost frames after expiry of time out timer.
  • 24.
    Go-Back-N ARQ SelectiveRepeat ARQ If a frame is corrupted or lost in it,all subsequent frames have to be sent again. In this, only the frame is sent again, which is corrupted or lost. If it has a high error rate,it wastes a lot of bandwidth. There is a loss of low bandwidth. It is less complex. It is more complex because it has to do sorting and searching as well. And it also requires more storage. It does not require sorting. In this, sorting is done to get the frames in the correct order. It does not require searching. The search operation is performed in it. It is used more. It is used less because it is more complex.
  • 25.
    Point to pointprotocol Services provided by PPP PPP defines the format of the frame to be exchanged between the devices It defines link control protocol (LCP) for:- (a) Establishing the link between two devices. (b) Maintaining this established link. (c) Configuring this link. (d) Terminating this link after the transfer. It defines how network layer data are encapsulated in data link frame. PPP provides error detection.
  • 26.
    Point to PointProtocol • PPP uses several other protocols to establish link, authenticate users and to carry the network layer data. The various protocols used are: 1. Link Control Protocol 2. Authentication Protocol 3. Network Control Protocol It is a byte oriented protocol (i.e. it simply views frame as collection of bytes) It is a WAN protocol widely used for broadband communication having heavy loads and high speeds.
  • 28.