0% found this document useful (0 votes)
66 views20 pages

Transport Layer: Computer Networking: A Top Down Approach

The document summarizes key concepts about the transport layer from the textbook "Computer Networking: A Top Down Approach". It discusses TCP round trip time and timeout calculations, including how TCP estimates round trip time (RTT) and sets timeout intervals. It also covers TCP congestion control mechanisms like slow start, congestion avoidance, fast retransmit, and fast recovery.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views20 pages

Transport Layer: Computer Networking: A Top Down Approach

The document summarizes key concepts about the transport layer from the textbook "Computer Networking: A Top Down Approach". It discusses TCP round trip time and timeout calculations, including how TCP estimates round trip time (RTT) and sets timeout intervals. It also covers TCP congestion control mechanisms like slow start, congestion avoidance, fast retransmit, and fast recovery.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

Chapter 3

Transport Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.

Last Lecture

Retransmission Timer in TCP


TCP Congestion Control

Todays Lecture
Network Layer
IP Header
Fragmentation/Reassembly

TCP Round Trip Time and Timeout


Retransmission Timer larger than the RTT

How much larger? How would RTT be calculated?

Sample RTT
Sample RTT fluctuates from segment to segment

Congestion in routers and varying load on end systems

TCP never computes a Sample RTT for retransmitted segments.


(Why?)

EstimatedRTT
TCP maintains an average of Sample RTT (RFC 2988)
EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT
The new value of Estimated RTT is a weighted combination of
the previous value of Estimated RTT plus new value of Sample
RTT.

TCP Round Trip Time and Timeout


The recommended value of is 0.125 in which case the formula
becomes
EstimatedRTT = 0.875*EstimatedRTT + 0.125*SampleRTT

Setting the Timeout Interval

The timeout interval should be greater than or equal to


EstimatedRTT

Not too large, delay to retransmit packet

Desirable to set the timeout interval plus some safety


margin.

Estimate of how much SampleRTT deviates from


EstimatedRTT

DevRTT = (1-)*DevRTT +*|SampleRTT-EstimatedRTT|


( = 0.25)

Then set timeout interval:


TimeoutInterval = EstimatedRTT + 4*DevRTT
For more details see RFC 2988
V. Jacobson, Congestion Avoidance and Control, in Proc. ACM SIGCOMM, pp. 314329, 1988.

TCP Congestion Control: Details


Congestion Window
Imposes a constraint on the rate at which a TCP sender can send
traffic into the network
The amount of unacknowledged data at a sender may not exceed
the minimum of CongWin and RcvWindow
LastByteSent-LastByteAcked min{CongWin, RcvWindow}
CongWin is dynamic, function of perceived network

congestion
TCP takes arrival of ACKs as successful delivery

Increases Congestion Window

Self Clocking
TCP uses ACKs to trigger its increase in congestion window size

TCP Slow Start


AIMD can take a long time

Host A
RTT

to ramp up to full capacity


from scratch
When connection begins,
CongWin = 1 MSS
Increase rate exponentially
until first loss event:
Double CongWin every RTT
Done by incrementing
CongWin for every ACK
received
Summary: Initial rate is
slow but ramps up
exponentially fast

Host B
one segm
en

two segm
ents

four segm

ents

time

Refinement: Inferring Loss


After timeout event

CongWin instead set to 1 MSS


Window then grows exponentially (enters slow
start)
Till it reaches one half of the value it had before
the timeout
Window then grows linearly (congestion avoidance)
Threshold Value

Determines the window size at which slow start will end

After three duplicate ACKs:

CongWin is cut in half


Window then grows linearly
Fast Retransmit and Fast Recovery

Refinement: Inferring Loss


TCP Tahoe
For either events
Cuts congestion window size to 1 MSS and
enters slow start
TCP Reno
Uses Fast Retransmit and Fast Recovery for
three Dupicate ACKs.
Same as Tahoe for Timeout events.

TCP Congestion Control

Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.

Network layer
Transport segment from sending to receiving host
On sending side encapsulates segments into

datagrams
On receiving side, delivers segments to transport
layer
Network layer protocols in routers
Router examines header fields in all IP datagrams
passing through it

application
transport
network
data link
physical
network
data link
physical

network
data link
physical
network
data link
physical

network
data link
physical
network
data link
physical

network
network
data
link
data link
physical
physical
network
data link
physical

network
data link
physical

network
data link
physical

network
data link
physical

application
transport
network
data link
physical

Two Key Network-Layer Functions


Forwarding: Move packets from routers input

to appropriate routers output

Local action of transferring a packet

Routing: Determine route taken by packets

from source to destination.

Network wide process that determines the end to


end paths

The algorithms that calculate these paths are


referred to as routing algorithms

Routing and Forwarding


routing algorithm

Forwarding Table
o Router Forwards a
packet by examining the
destination address of the
packet

local forwarding table


header value output link

o Routing Algorithm
value in arriving
determines the values
packets header
that are inserted in the
routers forwarding tables

0100
0101
0111
1001

0111

3
2
2
1

1
3 2

Network Layer
Host, router network layer functions:
Transport layer: TCP, UDP

Network
layer

IP protocol
addressing conventions
datagram format
packet handling conventions

Routing protocols
path selection
RIP, OSPF, BGP

forwarding
table

ICMP protocol
error reporting
router signaling

Link layer
physical layer

IPv4 Datagram Format


IP protocol version
number
header length
(bytes)
type of data
max number
remaining hops
(decremented at
each router)
upper layer protocol
to deliver payload to

type of
ver head.
len service

length
fragment
16-bit identifier flgs
offset
time to
header
protocol
live
checksum

total datagram
length (bytes)
for
fragmentation/
reassembly

32 bit source IP address


32 bit destination IP address
Options (if any)

data
(variable length,
a TCP
or UDP segment)

IPV5? Does it exists?

e.g. timestamp,
record route
taken etc
Find other use?

IP Fragmentation & Reassembly


Network links have MTU

(Maximum Transmission Unit)


- largest possible link-level
frame.
o Different link between
sender and destination
Use different MTUs
Large IP datagram is divided
(fragmented)
o One datagram becomes
several datagrams
o Referred as Fragments
o Reassembled only at final
destination
o IP header bits used to
identify, order related
fragments

fragmentation:
in: one large datagram
out: 3 smaller datagrams

reassembly

IP Fragmentation & Reassembly


Identification Number, Flag and Offset fields in the datagram

header

Identification Number
o
o

Sending Host stamps the datagram with an identification number


Destination receives datagram
o Examines the identification number

Flag Bit
o
o

All fragments set to 1


Last fragment set to 0

Offset Field
o

Use to specify where fragment fits in the within the original IP


datagram

IP Fragmentation & Reassembly


Example
Datagram of 4000 bytes
o 20 bytes of IP header, 3980 bytes of payload
o MTU is 1500 bytes
Fragment
Bytes
ID
Offset
0 (beginning)

Flag

1st Fragment

1480 bytes

777

2nd Fragment

1480 bytes

777

185

1 (there is more)

3rd Fragment

1020 bytes

777

370

0 (Last )

Why offset is specified in units of 8byte chunks?

1 (there is more)

You might also like