Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 107

Error Correction techniques in Datalink and Transport Layers

Related Chapter _ 11 and 23


Related CLO-3

• Differentiate error detection techniques in Datalink,


Network and Transport Layers and error correction
techniques in Datalink and Transport Layers of TCP/IP
Model.
Data Link Layer

3
Flow & Error Control

• The most important responsibilities of the data


link layer are flow control and error control.

4
Note

Flow control refers to a set of procedures


used to restrict the amount of data
that the sender can send before
waiting for acknowledgment.
Error Control

• Error control includes both error detection and


error correction.

• It allows the receiver to inform the sender if a


frame is lost or damaged during transmission
and coordinates the retransmission of those
frames by the sender.
Note

Error control in the data link layer is based


on automatic repeat request, which is
the retransmission of data.
Error Correction Using Retransmission

• Error correction using retransmission follows a very simple


rule.
• If the sender has not received positive news in due time,
the frame is retransmitted.
DATA-LINK LAYER PROTOCOLS

• Traditionally four protocols have been defined for the data-link layer
to deal with flow and error control:
– Simple
– Stop-and-Wait
– Go-Back-N
– Selective-Repeat.

• Although the first two protocols still are used at the data-link layer,
the last two have disappeared .

• But the last two are used in Transport layer.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


Note

• A transport-layer protocol can provide two types of services:


– Connectionless
– and connection-oriented.

• In a connectionless service, the sender sends packets to the receiver without any
connection establishment.
• In a connection-oriented service, the client and the server first need to establish a
connection between themselves.
– The Stop-and-Wait protocol provides both flow and error control, but is inefficient.
– The Go-Back-N protocol is the more efficient version of the Stop-and-Wait protocol and takes
advantage of pipelining.
– The Selective-Repeat protocol, a modification of the Go-Back-N protocol, is better suited to handle
packet loss.

• All of these protocols can be implemented bidirectionally using piggybacking.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


DATA-LINK LAYER PROTOCOLS

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


Simple Protocol

• Simple protocol is 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.

• Figure shows the layout for this protocol.

• The data-link layer at the sender gets a packet from its network layer, makes a
frame out of it, and sends the frame.

• The data-link layer at the receiver receives a frame from the link, extracts the
packet from the frame, and delivers the packet to its network layer.

• The data-link layers of the sender and receiver provide transmission services for
their network layers.
11.12
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Simple Protocol

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


What is finite state machine (FSM).

• The behavior of a data-link-layer protocol can be


better shown as a 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.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


FSMs for the Simple Protocol

• Sender site should not send a frame until its network layer has a message to send.

• 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.

• Sending machine remains in the ready state until a request comes from the process in
the network layer. When this event occurs, the sending machine encapsulates the
message in a frame and sends it to the receiving machine.

• Receiving machine remains in the ready state until a frame arrives from the sending
machine. When this event occurs, the receiving machine decapsulates the message out
of the frame and delivers it to the process at the network layer.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


Figure shows the FSMs for the simple protocol.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Simple Protocol

• It is very simple. The sender sends a sequence of frames without even thinking
about the receiver. To send three frames, three events occur at the sender site and
three events at the receiver site. Note that the data frames are shown by tilted
boxes; the height of the box defines the transmission time difference between the
first bit and the last bit in the frame.

Flow diagram
Algorithm _ Sender-site algorithm for the simplest protocol
Algorithm _ Receiver-site algorithm for the simplest protocol
Example 11.2
1. Stop-and-Wait Protocol
Example

Figure shows an example of communication using this protocol. It is still very


simple. The sender sends one frame and waits for feedback from the receiver. When
the ACK arrives, the sender sends the next frame. Note that sending two frames in
the protocol involves the sender in four events and the receiver in two events.

Flow diagram
Algorithm _ Sender-site algorithm for Stop-and-Wait Protocol
Algorithm _ Receiver-site algorithm for Stop-and-Wait Protocol
2. Stop-and-Wait Automatic Repeat Request

25
Note

Error correction in Stop-and-Wait ARQ


is done by keeping a copy of the sent
frame and retransmitting of the frame
when the timer expires.
Stop-and-Wait Automatic Repeat Request

• Simplest flow and error control mechanism

• The sending device keeps a copy of the last frame transmitted


until it receives an acknowledgement
– identification of duplicate transmission (lost or delayed ACK)

• A damaged or lost frame is treated in the same way

• Timers introduced

• Positive ACK sent only for frames received safe & sound
27
A Simplex Stop-and-Wait ARQ

• Four different Cases :


1. Normal Procedure
2. When a receiver receives a damaged frame
3. Lost ACK frame
4. Delayed ACK frame

28
1. Normal Procedure for Stop-And-Wait ARQ

 Sender keeps a copy of the last frame until it


receives an acknowledgement.
 For identification, both data frames and
acknowledgements (ACK) frames are numbered
alternatively 0 and 1.
 Sender has a control variable (S) that holds the
number of the recently sent frame. (0 or 1)
 Receiver has a control variable ( R ) that holds
the number of the next frame expected (0 or 1).
 Sender starts a timer when it sends a frame. If
an ACK is not received within a allocated time
period, the sender assumes that the frame was
lost or damaged and resends it
 Receiver send only positive ACK if the frame is
intact.
 ACK number always defines the number of the
next expected frame
2. Stop-and-Wait ARQ, When a receiver receives a damaged
frame

• When a receiver
receives a damaged
frame, it discards it
and keeps its value of
R.
• After the timer at the
sender expires,
another copy of frame
1 is sent.
3. Stop-and-Wait, lost ACK frame

• If the sender receives


a damaged ACK, it
discards it.
• When the timer of
the sender expires,
the sender
retransmits frame 1.
• Receiver has already
received frame 1 and
expecting to receive
frame 0 (R=0).
Therefore it discards
the second copy of
frame 1.
4. Stop-and-Wait, delayed ACK frame

• The ACK can be


delayed at the
receiver or due to
some problem
• It is received after the
timer for frame 0 has
expired.
• Sender retransmitted
a copy of frame 0.
However, R =1 means
receiver expects to
see frame 1. Receiver
discards the duplicate
frame 0.
• Sender receives 2
ACKs, it discards the
second ACK.
To detect corrupted frames, we need to add a CRC

• To detect corrupted frames, we need to add a CRC to each data frame.


• When a frame arrives at the receiver site, it is checked.
– If its 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 an acknowledgment arrives before the timer expires, the timer is stopped and
the sender sends the next frame (if it has one to send).
– If the timer expires, the sender resends the previous frame, assuming that the
frame was either lost or corrupted. This means that the sender needs to keep a
copy of the frame until its acknowledgment arrives. When the corresponding
acknowledgment arrives, the sender discards the copy and sends the next frame if
it is ready.
To detect corrupted frames, we need to add a CRC

• The figure shows the outline for the Stop-and-Wait


protocol.

• Note that only one frame and one acknowledgment


can be in the channels at any time
Note:

In Stop-and-Wait ARQ, numbering


frames prevents the retaining of
duplicate frames.
Note:

Numbered acknowledgments are


needed if an acknowledgment for frame
is delayed and the next frame is lost.
Bidirectional Transmission

• The previous protocol is unidirectional (data is transmitted in one


direction)

• For bidirectional both nodes can send data

• To save bandwidth data frame to be sent and control information (ACK)


of the received frame are combined into one frame (Piggybacking)

• If a node receive a frame and does not have data to be sent then an ACK
frame is sent alone
Piggybacking

• A method to combine
a data frame with
ACK.
• Station A and B both
have data to send.
• Instead of sending
separately, station A
sends a data frame
that includes an ACK.
• Station B does the
same thing.
• Piggybacking saves
bandwidth.
Disadvantage of Stop-and-Wait

• In stop-and-wait, at any point in time, there is only one


frame that is sent and waiting to be acknowledged.

• This is not a good use of transmission medium.

• To improve efficiency, multiple frames should be in


transition while waiting for ACK.

• Two protocol use the above concept,


– Go-Back-N ARQ
– Selective Repeat ARQ
Pipelining
Pipelining

• In networking and in other areas, a task is often begun before the previous task has ended. This is
known as pipelining.

• There is no pipelining in the Stop-and-Wait protocol because a sender must wait for a packet to
reach the destination and be acknowledged before the next packet can be sent.

• However, pipelining does apply to our next two protocols because several packets can be sent
before a sender receives feedback about the previous packets.

• Pipelining improves the efficiency of the transmission if the number of bits in transition is large
with respect to the “bandwidth delay product”.

• Two generic forms of pipelined (or sliding window) protocols:


1. Go-Back -N ARQ
2. Selective-Repeat ARQ
Note

A sliding window protocol is a feature of


packet-based data transmission protocols.
Sliding window protocols are used where
reliable in-order delivery of packets is
required, such as in the Data Link Layer as well
as in the Transmission Control Protocol (TCP).
Window-based ARQs

Idea:
Allow Sender to keep
transmitting a “window” of
packets while waiting for
ACKs
Window-based ARQs

• To improve the efficiency of transmission (to fill the pipe), multiple


packets must be in transition while the sender is waiting for
acknowledgment.

• In other words, we need to let more than one packet be outstanding to


keep the channel busy while the sender is waiting for acknowledgment

• Another function of sliding window protocols => Flow Control


– What happens if the sender tries to transmit faster than the receiver can accept?
– Data will be lost unless flow control is implemented

• Think about TCP ?????????


Sliding Window Protocols: Some Definitions

• Sequence Number (SN):


– Each frame is assigned a SN that is incremented as each frame is transmitted
• Sender Window:
– Keeps track of SNs for frames that have been sent but not yet acknowledged.
• Receiver Window:
– Keeps track of sequence numbers for frames that the receiver is allowed to accept
• Maximum Sender Window Size (WS):
– The maximum number of frames the sender can transmit without receiving any ACKs
• Maximum Receiver Window Size (WR):
– The maximum number of frames the receiver may receive before returning an ACK
to the sender
Maximum Sender Window Size

• With maximum window size of 1, the sender waits for an ACK


before sending another frame.
• With maximum window size of WS, the sender can transmit up to
WS frames before being blocked.
– allows sender to transmit several frames before receiving an ACK
Maximum Receiver Window Size

• With a maximum window size of 1, the receiver must receive


and process every frame in sequence.
• With a maximum window size of WR, the receiver can receive
and process up to ‘WR’ frames before acknowledging them.
• Allow “piggybacking” of ACK onto the header of an outgoing data frame in the
reverse direction
• Full duplex transmission

• Unlike the sender window, the receiver window always


remains at its maximum size
Window-based ARQs

• Two generic forms of pipelined (or sliding window based )


protocols:
– Go-Back -N ARQ
– Selective-Repeat ARQ

48
3. Go-Back-N ARQ

49
Go-Back-N ARQ _ General Comments
• The first is called Go-Back-N (GBN) (the justification for the name will become clear
later).

• The key to Go-back-N is that we can send up to W frames before worrying about
ACKs.

• We keep a copy of these frames until the ACKs arrive.

• This procedure requires additional features to be added to Stop-and-Wait ARQ.


Go-Back-N ARQ _ outline of the protocol.

• Figure shows the outline of the protocol.


• Several data packets and acknowledgments can be in the
channel at the same time.

Why Transport Layer ………………?????


Attributes of Go-Back-N ARQ

• Ten Important Features of Go-Back-N ARQ


1. Sequence Number
2. Acknowledgment Numbers
3. Send Window
4. Receive Window
5. Control Variables
6. Timer
7. Resending packets
8. Go-Back-N ARQ _normal operation
9. Go-Back-N ARQ _ lost frame
10. Go-Back-N ARQ _Damaged /Lost / Delayed ACK
1. Go-Back-N ARQ _ Sequence Numbering

• As to improve efficiency compared to stop and wait,


go-back N sends several packets without waiting for
individual acknowledgements.

• Since the receiver must be able to distinguish


these packets from each other, a numbering
scheme must be used. Each packet has a sequence
number, which is part of the packet header.
2. Go-Back-N ARQ _ Acknowledgment Numbers

• Cumulative and defines the sequence number of


the next packet expected.
• Example:
– If the acknowledgment number (ackNo) is 7, it means all
packets with sequence number up to 6 have arrived,
safe and sound, and the receiver is expecting the packet
with sequence number 7.
3. Go-Back-N ARQ _ Send Window

• Send window is an imaginary box covering the sequence


numbers of the data packets that can be in transit or can
be sent.
– The maximum size of the window is 2m -1 ( ???) , where m is the number of bits
in the sequence number.

• Here , we let the size be fixed and set to the maximum


value, but we will see later that some protocols may have a
variable window size.
Home work

• The maximum size of the window is 2m -1 ( ???) . Why ?


3. Go-Back-N ARQ _ Send Window
• The send window at any time divides the possible sequence numbers into four regions.
• First region, left of the window, defines the sequence numbers belonging to packets that are already
acknowledged. The sender does not worry about these packets and keeps no copies of them.
• Second region, colored, defines the range of sequence numbers belonging to the packets that have been
sent, but have an unknown status. The sender needs to wait to find out if these packets have been received
or were lost. We call these outstanding packets.
• Third range, white in the figure, defines the range of sequence numbers for packets that can be sent;
however, the corresponding data have not yet been received from the application layer.
• Fourth region, right of the window, defines sequence numbers that cannot be used until the window
slides
3. Go-Back-N ARQ _ Send Window

• Figure shows a sliding window of size 7 (m = 3) for


the Go-Back-N protocol.
3. Go-Back-N ARQ _ Send Window

 Sequence numbers
 Sent frames are numbered sequentially
 Number of frames stored in the header
 if the number of bits in the header is m than
sequence number goes from 0 to 2m -1
sequence
number
 Sliding window frame
 to hold the unacknowledged
outstanding frames
 the receiver window size
always 1

acknowledged
frames

59
3. Go-Back-N ARQ _ Send Window

 The send window can slide one or more slots


when an error-free ACK is received from
Receiver

60
4. Receive
Go-Back-N Window
ARQ _ Receive Window

 The receive window makes sure that the correct data packets are
received and that the correct acknowledgments are sent.

 In Go-Back-N, the size of the receive window is always 1.

 The receiver is always looking for the arrival of a specific packet.

 Any packet arriving out of order is discarded and needs to be


resent.

61
4. Go-Back-N ARQ _ Receive Window
 Note that we need only one variable, Rn (receive window, next packet expected), to
define this abstraction.

 The sequence numbers to the left of the window belong to the packets already
received and acknowledged; the sequence numbers to the right of this window
define the packets that cannot be received.

 Any received packet with a sequence number in these two regions is discarded.
Only a packet with a sequence number matching the value of Rn is accepted and
acknowledged.

 The receive window also slides, but only one slot at a time. When a correct packet is
received, the window slides, Rn (Rn 1)

62
4. Go-Back-N ARQ _ Receive Window

63
5. Go-back-N _Control variables

 S- holds the sequence number of the recently sent frame


 SF – holds sequence number of the first frame in the window
 SL – holds the sequence number of the last frame
 R – sequence number of the frame expected to be received

64
6. Timers

 We resend all outstanding packets when this timer


expires.
7. Resending packets

 When the timer expires, the sender resends all outstanding packets.
 For example
 Suppose the sender has already sent packet 6 (Sn =holds the sequence number
that will be assigned to the next packet to be sent7), but the only timer
expires.

 If First outstanding Frame (Sf ) 3,this means that packets 3, 4, 5, and 6 have not
been acknowledged; the sender goes back and resends packets 3, 4, 5, and 6.
That is why the protocol is called Go-Back-N.

 On a time-out, the machine goes back N locations and resends all packets.

66
Hence the name of Go-back-N: why?

 Re-sending frame
 when the frame is damaged the sender goes back and sends a
set of frames starting from the last one ACKn’d
 the number of retransmitted frames is N

67
8. Go-Back-N ARQ _Normal operation

• The sender keeps track of the outstanding frames and


updates the variables and windows as the ACKs arrive.
• Go back N uses
a window
mechanism
where the
sender can send
packets that are
within a
“window”
(range) of
packets.
• The window
advances as
acknowledgeme
A send window can slide one or more slots nts for earlier
to the right when an acknowledgment packets are
arrives from the other end received
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
8. Go-Back-N ARQ _Normal operation

 How many frames


can be transmitted
without
acknowledgment?

 ACK1 – not
necessary if ACK2
is sent
 Cumulative ACK

The receiver process keeps track of the expected sequence


sequence number of the next frame it number
expects to receive, and sends that number
with every ACK it sends
69
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
9. Go-Back-N ARQ _ lost frame
• Frame 2 is lost

• When the receiver


receives frame 3, it
discards frame 3 as it
is expecting frame 2
(according to
window).

• After the timer for


frame 2 expires at the
sender site, the
sender sends frame 2
and 3. (go back to 2)

• Acknowledgements
are cumulative
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
10_ Go-Back-N ARQ _Damaged /Lost / Delayed ACK

• If an ACK is damaged/lost, we can have two situations:


• If the next ACK arrives before the expiration of any timer, there is
no need for retransmission of frames because ACKs are cumulative
in this protocol.
• If ACK1, ACK2, and ACk3 are lost, ACK4 covers them if it arrives
before the timer expires.
• If ACK4 arrives after time-out, the last frame and all the frames
after that are resent.
• Receiver never resends an ACK.
• A delayed ACK also triggers the resending of frames

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Some More Examples

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Go-Back-n ARQ
Host A Host B

Data 0
Data 1 Lost ACK case
Data 2
Timer expires

ACK 3
Lost
Data 0
Data 1
Data 2

Window Size 3

ECE 766
Winter 2006
Computer Interfacing and
ECE Protocols
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Note

Stop-and-Wait ARQ is a special case of


Go-Back-N ARQ in which the size of the
send window is 1.
Note

In Go-Back-N ARQ, the size of the send


window must be less than 2m;
the size of the receiver window
is always 1.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Algorithm _ Go-Back-N sender algorithm

(continued)
11.77
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Algorithm _ Go-Back-N sender algorithm

11.78
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Algorithm 11.8 Go-Back-N receiver algorithm

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


Problem ???????

 Draw the sender and receiver windows for a system using Go-back-N ARQ, where
a 3 bit field is used and given the following:
 (a) Frame 0 is sent; Frame 0 is acknowledged.
 (b) Frames 1 and 2 are sent; Frames 1 and 2 are acknowledged.
 (c) Frames 3, 4, and 5 are sent; Frames 3 and 4 is acknowledged; Timer for Frame 5
expires.
 (d) Frames 5, 6, and 7 are sent; Frames 5 through 7 are acknowledged.
Go-back-N

 Better than Stop and wait


 because it keeps the sender busy while waiting for acknowledgement
 Wastage of bandwidth
 If the error rate is high because it requests the sender to retransmit the frame
in error and all the subsequently transmitted frames
 Inefficient
 all out of order received packets are discarded
 This is a problem in a noisy link
 many frames must be retransmitted -> bandwidth consuming

 Solution ?

re-send only the damaged frames so Selective Repeat ARQ i.e. avoid
unnecessary retransmissions

81
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Strength and weakness of Go-Back-N ARQ

 Go-Back-N ARQ simplifies the process at the receiver site. The


receiver keeps track of only one variable, and there is no need
to buffer out-of-order frames; they are simply discarded.
However, this protocol is very inefficient for a noisy link.

 In a noisy link a frame has a higher probability of damage,


which means the resending of multiple frames. This resending
uses up the bandwidth and slows down the transmission.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004


4. Selective Repeat ARQ

83
• For noisy links, there is another mechanism that does not resend N
frames when just one frame is damaged; only the damaged frame is
resent. This mechanism is called Selective Repeat ARQ. It is
more efficient for noisy links, but the processing at the receiver is
more complex.
Selective Repeat ARQ

• The Selective Repeat Protocol also uses two windows:


– a send window
– and a receive window.

• Differences between the windows in this protocol and the


ones in Go-Back-N.
– First, the size of the send window is much smaller in case of Go
Back N
– In Selective Repeat ARQ , Receive window is the same size as the
send window.
Selective Repeat ARQ

• Receiver individually acknowledges all correctly received


packets
– buffers all the correct frames that arrive following the bad one,
for eventual in-order delivery to upper layer
– When receiver notices a skipped SN, it keeps acknowledging the
last good SN
• Sender only resends packets for which ACK not received,
but not all its successors
– Sender timer for each unACKed packet
• Sender window
– N consecutive SN’s
– limits SN’s of sent, unACKed pkts
Selective Repeat ARQ

• As in Go-Back-N
– Packet sent when available up to window limit

• Unlike Go-Back-N
– Out-of-order (but otherwise correct) is ACKed
– Receiver: buffers out-of-order packets
– Sender: on timeout of packet k, retransmit just k

• Comments
– More receiver buffering than Go-Back-N
– More complicated buffer management by both sides
– Saves bandwidth

• no need to retransmit correctly received packets


Outline of Selective-Repeat
Selective Repeat ARQ

• Processing at the receiver more complex


• The window size is reduced to one half of 2m
• Both the transmitter and the receiver have the same window size
• Receiver expects frames within the range of the sequence numbers

89
Selective Repeat ARQ, sender and receiver windows
• Go-Back-N ARQ simplifies the process at the receiver site. Receiver only keeps
track of only one variable, and there is no need to buffer out-of-order frames,
they are simply discarded.
• However, Go-Back-N ARQ protocol is inefficient for noisy link. It bandwidth
inefficient and slows down the transmission.
• In Selective Repeat ARQ, only the damaged frame is resent. More bandwidth
efficient but more complex processing at receiver.
• It defines a negative ACK (NAK) to report the sequence number of a damaged
frame before the timer expires.
Selective Repeat ARQ, lost frame

• Frames 0 and 1 are


accepted when
received because
they are in the range
specified by the
receiver window.
Same for frame 3.

• Receiver sends a
NAK2 to show that
frame 2 has not been
received and then
sender resends only
frame 2 and it is
accepted as it is in
the range of the
window.
Protocols Using Go-back N

• Advantage of go-back N over the other sliding window protocol,


selective retransmission, is that no re-ordering of received packets is
ever required.

• This is most useful in high-speed protocols which are often implemented


in hardware for performance reasons.

• One example of such a protocol is High-level Data Link Control (HDLC


and HDLC is used in HDLC is commonly used in leased-line connections ).

• Also in GSM/GPRS ( 2 and 2.5 G Mobile Communication Technology )


Some More Examples
Selective Repeat ARQ
Host A Host B

Data 0 Error in data frame 3


Data 1
Data 2
Data 3
Data 4
Error, discard
NAK 3
Data 5

Data 3
Data 6

Window size 7

Winter 2006 ECE 766


94
ECE
Computer Interfacing and Protocols
Thanks
Some basic definitions

• Bandwidth
• capacity of the system

• Throughput
• No. of bits that can be pushed through

• Latency (Delay)
• Delay incurred by a bit from start to finish
Some basic definitions

 In networking, we use the term bandwidth in two


contexts.
 The first, bandwidth in hertz, refers to the range of frequencies in a
composite signal or the range of frequencies that a channel can pass.
 The second, bandwidth in bits per second, refers to the speed of bit
transmission in a channel or link. Often referred to as Capacity

 Propagation speed
 Speed at which a bit travels though the medium from source to destination.

 Transmission speed
 the speed at which all the bits in a message arrive at the destination.
(difference in arrival time of first and last bit)
Some basic definitions

 Propagation Delay = Distance/Propagation speed

 Transmission Delay = Message size/bandwidth bps

 Latency = Propagation delay + Transmission delay +


Queueing time + Processing time
Some basic definitions

 Bandwidth-Delay Product
 In other words ‘The result of BDP is an amount of data
measured in bits (or bytes), is equivalent to the maximum
amount of data on the network circuit at any given time, i.e.,
data that has been transmitted but not yet acknowledged.’

 The Bandwidth*Delay Product(BDP) determines the amount of data


that can be in transit in the network.

 The BDP simply states that:


 BDP (bits) = total_available_bandwidth (bits/sec) x round_trip_time
(sec)
Concept of bandwidth-delay product

Note

The bandwidth-delay product defines


the number of bits that can fill the link.

3.100
TCP and BD Product

 Bandwidth-delay product
 Capacity of the “pipe” between a TCP sender and a TCP
receiver
 Inadequacy of TCP, as bandwidth-delay product
increases
 Prone to instability
 Inefficient

101
Revision _ Bandwidth*Delay Product

• An important example of a system where the bandwidth-delay product is large is


that of GEO satellite connections (A geosynchronous satellite is a satellite in
geosynchronous orbit, with an orbital period the same as the Earth's rotation period)
, where end-to-end delivery time is very high and link throughput may also be high.
The high end-to-end delivery time makes life difficult for stop-and-wait protocols and
applications that assume rapid end-to-end response.

• A high bandwidth-delay product is an important problem case in the design of


protocols such as TCP in respect of performance tuning, because the protocol can
only achieve optimum throughput if a sender sends a sufficiently large quantity of
data before being required to stop and wait until a confirming message is received
from the receiver, acknowledging successful receipt of that data. If the quantity of
data sent is insufficient compared with the bandwidth-delay product, then the link is
not being kept busy and the protocol is operating below peak efficiency for the link
Example 1
In a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit
takes 20 ms to make a round trip. What is the bandwidth-delay product? If the
system data frames are 1000 bits in length, what is the utilization percentage of
the link?

Solution
The bandwidth-delay product is

1  106  20  10-3 = 20,000 bits

The system can send 20,000 bits during the time it takes for the data to go
from the sender to the receiver and then back again. However, the system
sends only 1000 bits. We can say that the link utilization is only
1000/20,000, or 5%. For this reason, for a link with high bandwidth or long
delay, use of Stop-and-Wait ARQ wastes the capacity of the link.
Example 2
What is the utilization percentage of the link in Example 1 if the link uses Go-
Back-N ARQ with a 15-frame sequence?

Solution
The bandwidth-delay product is still 20,000. The system can send up to 15
frames or 15,000 bits during a round trip. This means the utilization is
15,000/20,000, or 75 percent. Of course, if there are damaged frames, the
utilization percentage is much less because frames have to be resent.
FLOW CONTROL
Note:

Flow control refers to a set of


procedures used to restrict the amount
of data the sender can send before
waiting for acknowledgment.

• The two methods we discussed for error control can actually provide
flow control at the same time.
• Stop and wait ARQ provides flow control because the frames are sent one by
one.
• Sliding-window ARQ provides flow control because the size of the sending
window can be matched to the size of the receiver buffer.
Thanks

You might also like