Unit IV Transport Layer
Unit IV Transport Layer
Unit IV Transport Layer
b. Ack Lost
6-14, c,d
(c) Response lost. (d) Response lost and subsequent DRs lost.
Flow Control and Buffering
Flow Control and Buffering
• Introduction to UDP
• Remote Procedure Call (RPC)
• The Real-Time Transport Protocol(RTP)
UDP
UDP
UDP: It supports a connectionless transport protocol. UDP transmits segments
Packing the parameters is called Marshaling. Client Server RPC is one area in
which UDP is widely used.
(a) The position of RTP in the protocol stack. (b) Packet nesting.
Why does DNS use UDP and not
TCP?
There are following interesting facts about TCP and UDP on the
transport layer that justify the above.
1) UDP is much faster. TCP is slow as it requires 3-way
handshake. The load on DNS servers is also an important
factor. DNS servers (since they use UDP) don’t have to keep
connections.
2) DNS requests are generally very small and fit well within UDP
segments.
3) UDP is not reliable, but reliability can added on application
layer. An application can use UDP and can be reliable by using
a timeout and resend at the application layer.
The Internet Transport Protocols: TCP
• Introduction to TCP
• The TCP Service Model
• The TCP Protocol
• The TCP Segment Header
• TCP Connection Establishment
• TCP Connection Release
• TCP Connection Management Modeling
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management
The TCP Service Model
The TCP Service Model
6-31
Timers
Retransmission
Timer- Persistence Keep Alive Time Wait
RTO (Retransmission
Timer Timer Timer
TimeOut).
RTO
The solution is to use a dynamic algorithm that constantly adapts the timeout
interval, based on continuous measurements of network performance. The
algorithm generally used by TCP is due to Jacobson (1988) and works as follows.
For each connection, TCP maintains a variable, SRTT (Smoothed Round-Trip
Time), that is the best current estimate of the round-trip time to the destination in
question. When a segment is sent, a timer is started, both to see how long the
acknowledgement takes and also to trigger a retransmission if it takes too long. If
the acknowledgement gets back before the timer expires, TCP measures how long
the acknowledgement took, say, R. It then updates SRTT according to the formula
SRTT = α SRTT + (1 − α) R
where α is a smoothing factor that determines how quickly the old values are
forgotten. Typically, α = 7/8. This kind of formula is an EWMA (Exponentially
Weighted Moving Average) or low-pass filter that discards noise in the samples.
RTO=2*SRTT
But experience showed that a constant value was too inflexible because it failed
to respond when the variance went up.
RTO
To fix this problem previous problem ,Jacobson proposed
making the timeout value sensitive to the variance in round-
trip times as well as the smoothed round-trip time. This
change requires keeping track of another smoothed variable,
RTTVAR (Round- Trip Time VARiation) that is updated using
the formula
The last timer used on each TCP connection is the one used in the TIME
WAIT state while closing. It runs for twice the maximum packet lifetime to
make sure that when a connection is closed, all packets created by it have
died off.
TCP Congestion Control
What happens when a sender on a fast network (the 1-Gbps link) sends a small
burst of four packets to a receiver on a slow network (the 1- Mbps link) that is the
bottleneck or slowest part of the path.
The maximum segment size here is 1 KB. Initially, the congestion window was 64
KB, but a timeout occurred, so the threshold is set to 32 KB and the congestion
window to 1 KB for transmission 0. The congestion window grows exponentially
until it hits the threshold (32 KB). The window is increased every time a new
acknowledgement arrives rather than continuously, which leads to the discrete
staircase pattern. After the threshold is passed, the window grows linearly. It is
increased by one segment every RTT.
TCP Reno- Congestion Control
After an initial slow start, the congestion window climbs linearly until a packet loss is
detected by duplicate acknowledgements. The lost packet is retransmitted and fast
recovery is used to keep the ack clock running until the retransmission is
acknowledged. At that time, the congestion window is resumed from the new slow
start threshold, rather than from 1. This behavior continues indefinitely, and the
connection spends most of the time with its congestion window close to the
optimum value of the bandwidth- delay product.
SACK (Selective ACKnowledgements)
By the time packet 6 is received, two SACK byte ranges are used to
indicate that packet 6 and packets 3 to 4 have been received, in addition to
all packets up to packet 1. From the information in each SACK option that it
receives, the sender can decide which packets to retransmit. In this case,
retransmitting packets 2 and 5 would be a good idea. SACK is strictly
advisory information. The actual detection of loss using duplicate
acknowledgements and adjustments to the congestion window proceed
just as before.
Cumulative ack doesn’t tell which segment lost