Uploaded by vishalpratap2468

CN-2024-V1

advertisement

Network Performance
Network Performance
Bandwidth: Bits per second. It refers to the speed of bit transmission
in a channel or link.
Throughput(Tp): Successful transmission of bits per second. The
difference is Bandwidth is a potential measurement of a link and
throughput is an actual measurement of how fast we can send data.
Example: Let a link has bandwidth 1 Mbps but the throughput is 200
Kbps, I.e., we can not send more than 200 kbps through this link.
Example: Let bandwidth is 10 Mbps(data rate). We can pass average
of 200 frames per second and each frame size is 10,000 bits. What is
the throughput of the network?
Ans: Tp is 200 * 10,000 bits = 2 Mbps. Tp is the 20% of bandwidth
Cont..
Latency (Delay):
The time required, arrival of
entire message from source to destination.
Latency = Propagation time + transmission time +
queuing time + processing time.

Propagation time = Distance/propagation speed
Transmission time = Message size / Bandwidth
Jitter: The average delay between two frames
Cont..
Example:
What are the propagation time and transmission
time for a 2.5 Kbyte message. If the bandwidth of the network is
1Gbps? Assume that the distance between the sender and the
receiver is 12,000 Km and that light travels at 2.4 *10^8 m/s.
Propagation delay = 12,000 * 1,000 / 2.4 *108 = 50 millisecond
Transmission time = 2500 * 8 / 109 bits = 0.02 millisecond
Here, the message size is short and high data rate. So, the
transmission delay is negligible as compare to propagation
delay.
Cont..
Example:
What are the propagation time and
transmission time for a 5 Mbyte message. If the bandwidth
of the network is 1Mbps? Assume that the distance
between the sender and the receiver is 12,000 Km and that
light travels at 2.4 *108 m/s.
Propagation delay = 12,000 * 1,000 / 2.4 * 108 = 50
millisecond
Transmission time = 5000000 * 8 / 106 bits = 40 second
Here, the propagation delay is negligible as compare to
transmission delay
Bandwidth-delay product
It defines the number of bits that can fill the link/channel,
i.e., the volume of the channel.
Example: Let Latency = 50 millisecond
Bandwidth = 45 Mbps
Bandwidth * Delay product = 50 * 0.0001 * 45 * 106
= 2.25 Mbits
We can transmit 2.25 Mbits data before the first bit
reaches the other end of the channel.
Note: How many bits can the user transmit before he
expects to have an ACK?
Example:
Suppose a 128 Kbps P2P link is setup between earth
and a rover on Mars. The minimum distance from Mars to the
earth is app. 55Gm, and data travels over the link at the speed of
light 3 * 108 m/s
a.
Calculate the Delay X Bandwidth product of the link.
b.
A camera on the rover takes pictures of its surrounding and
sends these to the earth. How quickly can it reach Mission
control on earth? Assume that each image is 5 Mb in size
Example:
Calculate the latency, i.e., from first bit sent to the
last bit received for the following:
a.
1 Gbps Ethernet with a single store and forward switch in the
path, and a packet size of 5000 bits. Assume that each link
introduces a propagation delay of 10 micro second and that the
switch begins retransmitting immediately after it has finished
receiving the packet.
b.
Same as the above point (a) but with 3 switches.
Flow Control
11.9
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.
Aka: Don’t overwhelm the receiver!
11.10
Note
Error control in the data link layer is
based on automatic repeat request
(ARQ), which is the retransmission of
data.
11.11
Automatic Repeat Request (ARQ)






Error control =
Error detection + Error correction
(retransmission)
Protocols based on receiver feedback (ACK) and
retransmission.
ACK carries sequence number of data packets
If channel error and losses, the sender gets “No
ACK”
How long the sender needs to wait to retransmit the
packet?
Ans: use “Time out” mechanism.
PROTOCOLS
Now let us see how the data link layer can combine flow control , and
error control to achieve the delivery of data from one node to another .
Stop-and-Wait ARQ
PROTOCOLS
Go-Back-N ARQ
Selective Repeat ARQ
Stop-n-Wait ARQ
•
•
•
•
Sender waits for
acknowledgement (ACK) after
transmitting each frame; keeps
copy of last frame.
Receiver sends ACK if received
frame is error free.
Sender retransmits frame if ACK
not received before timer expires.
To avoid confusion caused by
delayed or duplicated ACKs,
"stop-n-wait" sends each packets
with unique sequence numbers
and receives that numbers in each
ACKs.
In Stop-and-Wait ARQ, the acknowledgment number always announces
in modulo-2 arithmetic the sequence number of the next frame
expected.
14
Stop-and-Wait ARQ Overview

Sender waits “reasonable” amount of time for ACK
Thus Sender needs a countdown timer
 Start the timer when a packet is sent
 retransmits if no ACK received within the timeout period
if pkt (or ACK) just delayed (not lost):
 retransmission will create duplicate packet
 Thus, it requires packet sequence number and ack
number to be used
 Only two numbers are used: 0, 1



Receiver’s Ack number is what he is expected next


After receiving Pkt 0, sends back ACK 1
After receiving Pkt 1, sends back ACK 0
Transport Layer
3-16
Stop and Wait ARQ
Cases of Operations:
1.
2.
3.
4.
Normal operation
The frame is lost
The Acknowledgment (ACK) is lost
The Ack is delayed
1. Stop and Wait ARQ
Lost or damaged frame


A damage or lost frame treated by the
same manner by the receiver.
No ACK when frame is corrupted /
duplicate
Stop-and-Wait ARQ
Lost ACK frame

Importance of frame numbering
Lost of frame and ACK
11.20
Stop-and-Wait ARQ
Delayed ACK and lost frame

Importance of frame numbering
Stop-and-wait operation
sender
receiver
first packet bit
transmitted, t = 0
RTT
first packet bit arrives
last packet bit arrives, send
ACK
ACK arrives, send next
packet, t = RTT + L / R
L: packet bit length
R: link bandwidth (bps)
Utilization = L/R / (RTT+L/R)
= transmission time / End-to-End Delay
Stop and Wait ARQ
•
Frames and ACKs need to be numbered for
identifying duplicate transmissions
–
•
alternating 0 or 1.
Simple to implement but may waste bandwidth;
Example: 1.5Mbps link 45ms RTT
– RTT * Bandwidth = 67.5Kb (8KB). (Channel capacity)
– Assuming frame size of 1KB,
– stop-and-wait uses one-eighth of the link's capacity.
– Utilization: 1/8 = 0.125%
Note: Sender should be able to transmit up to 8 frames
before having to wait for an ACK.
–
26
Example 11.4
Assume that, 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. If the system data frames are 1000 bits
in length, what is the utilization percentage of the link?
Solution
Packet size = 1000 bits, R = 1Mbps, RTT = 20ms
Utilization = ?? %
For this reason, for a link with a high bandwidth or long delay, the use of Stopand-Wait ARQ wastes the capacity of the link.
Pipelining: increased utilization
sender
receiver
first packet bit transmitted, t = 0
last bit transmitted, t = L / R
RTT
first packet bit arrives
last packet bit arrives, send ACK
nd
last bit of 2 packet arrives, send ACK
rd
last bit of 3 packet arrives, send ACK
ACK arrives, send next
packet, t = RTT + L / R
Increase utilization
by a factor of 3!
Utilization = 3*L/R / (RTT+L/R)
Transport Layer
Example 11.5
What is the utilization percentage of the link in
Example 11.4 if we have a protocol that can send up to
15 frames before stopping and worrying about the
acknowledgments?
Solution
11.29
Stop-and-Wait ARQ
After each frame sent the host must wait for an ACK
inefficient use of bandwidth
To improve efficiency ACK should be sent after multiple frames
Alternatives: Sliding Window protocol
Go-back-N ARQ
Selective Repeat ARQ
Pipelined protocols
Pipelining: sender allows multiple, “in-flight”, yet-tobe-acknowledged pkts



range of sequence numbers must be increased
buffering at sender and/or receiver
Two generic forms of pipelined protocols:

go-Back-N, selective repeat
Transport Layer
3-31
Figure 11.12 Send window for Go-Back-N ARQ
11.32
Note
The send window is an abstract concept defining an
imaginary box of size 2m − 1 with three variables: Sf,
Sn, and Ssize.
The send window can slide one
or more slots when a valid acknowledgment arrives.
Cumulative ACK
 ACK(n): ACKs all pkts up to and include seq # n-1 have been
received may receive duplicate ACKs (see receiver)
 A single timer for the oldest transmitted but un-acked pkt
 timeout: retransmit all pkts in window (up to N packets)
11.33
Figure 11.13 Receive window for Go-Back-N ARQ
11.34
Note
The receive window is an abstract concept defining an
imaginary box of size 1 with one single variable Rn.
The window slides when a correct frame has arrived;
sliding occurs one slot at a time.
out-of-order pkt:
discard (don’t buffer) -> no receiver buffering!
Re-ACK pkt with highest in-order seq #
11.35
Note
Stop-and-Wait ARQ is a special case of
Go-Back-N ARQ in which the size of the
send window is 1.
11.36
StopTimer
StartTimer
Cumulative acknowledgments can help if acknowledgments are delayed or lost
11.40
StopTimer
StartTimer
11.41
In previous figure, it shows what happens when a frame is lost.
Frames 0, 1, 2, and 3 are sent. However, frame 1 is lost. The
receiver receives frames 2 and 3, but they are discarded because
they are received out of order. The sender receives no
acknowledgment about frames 1, 2, or 3. Its timer finally expires.
The sender sends all outstanding frames (1, 2, and 3) because it
does not know what is wrong. Note that the resending of frames 1,
2, and 3 is the response to one single event. When the sender is
responding to this event, it cannot accept the triggering of other
events. This means that when ACK 2 arrives, the sender is still busy
with sending frame 3.
11.42
Example 11.7 (continued)
The physical layer must wait until this event is completed and the
data link layer goes back to its sleeping state. We have shown a
vertical line to indicate the delay. It is the same story with ACK 3;
but when ACK 3 arrives, the sender is busy responding to ACK 2. It
happens again when ACK 4 arrives. Note that before the second
timer expires, all outstanding frames have been sent and the timer
is stopped.
11.43
It is observed that because of one packet lost, all following
packets will need to be retransmitted, even if they have arrived at
the destination  A great waste of bandwidth
Better protocol: selective repeat ARQ
11.44
Selective Repeat ARQ

Problem with Go-back-N:




Solution: Receiver individually acknowledges all correctly
received pkts


buffers pkts, as needed, for eventual in-order delivery to upper
layer
sender only resends pkts for which ACK not received


Sender: resend many packets with a single lose
Receiver: discard many good received (out-of-order) packets
Very inefficient when N becomes bigger (in high-speed network)
sender keeps timer for each unACKed pkt
sender window


N consecutive seq #’s
again limits seq #s of sent, unACKed pkts
Figure 11.18 Send window for Selective Repeat ARQ
Figure 11.19 Receive window for Selective Repeat ARQ
11.46
Figure 11.23 Flow diagram for Example 11.8
11.47
Download