mid-point discussion lecture tdts06 computer...

45
Mid-point discussion lecture … TDTS06 Computer Networking Niklas Carlsson, Associate Professor http://www.ida.liu.se/~nikca/

Upload: others

Post on 14-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Mid-point discussion lecture hellip

TDTS06 Computer Networking

Niklas Carlsson Associate Professor httpwwwidaliuse~nikca

Kick starting science

hellip well cable into wall hellip

What happens there

Hosts the Internet architecture and the E2E arguments hellip

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Kick starting science

hellip well cable into wall hellip

What happens there

Hosts the Internet architecture and the E2E arguments hellip

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

hellip well cable into wall hellip

What happens there

Hosts the Internet architecture and the E2E arguments hellip

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

What happens there

Hosts the Internet architecture and the E2E arguments hellip

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Hosts the Internet architecture and the E2E arguments hellip

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Network Stack in Practice

8

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Application

Presentation

Session

Transport

Network

Data Link

Physical

Host 1 Switch Host 2

Physical

Video Client

UDP

Video Server

UDP

FTP Client

TCP

IP

Ethernet

IP

Ethernet

FTP Server

TCP

IP

Ethernet 80211n 80211n 80211n

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Encapsulation Revisited

9

Web Server

TCP

IP

Ethernet

HTTP Header

TCP Header

IP Header

Ethernet Header

Ethernet Trailer

Web Page

HTTP Header

Web Page

TCP Header

HTTP Header

Web Page

IP Header

TCP Header

HTTP Header

Web Page

TCP Segment

IP Datagram

Ethernet Frame

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

The Hourglass

10

IPv4

TCP UDP ICMP

HTTP FTP RTP IMAP Jabber hellip

Ethernet 80211x DOCSIS hellip

Fiber Coax Twisted Pair Radio hellip

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Holding the Internet Together

bull Distributed cooperation for resource allocation

ndash BGP what end-to-end paths to take (for ~50K ASes)

ndash TCP what rate to send over each path (for ~3B hosts)

12

AS 1

AS 2

AS 3

AS 4

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

How do we find a path

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Routing on a Graph

bull Goal determine a ldquogoodrdquo path through the network from source to destination

bull What is a good path ndash Usually means the shortest path

ndash Load balanced

ndash Lowest $$$ cost

bull Network modeled as a graph ndash Routers nodes

ndash Link edges bull Edge cost delay congestion level etc

A

B C

D E

F

5

2

3 5

2 1

1

2 3

1

14

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Intra-domain Routing Protocols bull Distance vector

ndash Routing Information Protocol (RIP) based on Bellman-Ford

ndash Routers periodically exchange reachability info with neighbors

bull Link state

ndash Open Shortest Path First (OSPF) based on Dijkstra

ndash Each network periodically floods neighbor information to all routers

ndash Routers locally compute routes

15

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

16

Hierarchical addressing route aggregation

ldquoSend me anything with addresses beginning 2002316020rdquo

2002316023

2002318023

2002330023

Fly-By-Night-ISP

Organization 0

Organization 7 Internet

Organization 1

ISPs-R-Us ldquoSend me anything with addresses beginning 199310016rdquo

2002320023 Organization 2

ISP has an address block it can further divide this block into sub blocks and assign them to subscriber organizations

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Example CIDR Routing Table

17

Address Netmask Third Byte Byte Range

2074600 19 000xxxxx 0 ndash 31

20746320 19 001xxxxx 32 ndash 63

20746640 19 010xxxxx 64 ndash 95

207461280 18 10xxxxxx 128 ndash 191

207461920 18 11xxxxxx 192 ndash 255

Hole in the Routing Table No coverage for 96 ndash 127 2074696019

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Network of networks BGP and ASes 18

AS-1

AS-2

AS-3

Interior Routers

BGP Routers

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

BGP Relationships 19

Customer

Provider

Customer pays provider

Peer 1 Peer 2 Peer 3

Peers do not pay each other

Peer 2 has no incentive to route 1 3

Customer Customer

Provider

$

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

20

Importing Routes

From Provider

From Peer

From Peer

From Customer

ISP Routes

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

21

Exporting Routes

To Customer

To Peer

To Peer

To Provider

Customers get all routes

Customer and ISP routes only

$$$ generating routes

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

A new Internet model

22

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

How do we avoid sending too much for the receiver and network to handle

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

25

TCP Tahoe Summary bull Basic ideas

ndash Gently probe network for spare capacity ndash Drastically reduce rate on congestion ndash Windowing self-clocking ndash Other functions round trip time estimation error

recovery for every ACK if (W lt ssthresh) then W++ (SS) else W += 1W (CA) for every loss ssthresh = W2 W = 1

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Congestion Avoidance Example

26

0

2

4

6

8

10

12

14

t=0

t=2

t=4

t=6

Round Trip Times

cwn

d (

in s

egm

en

ts)

Slow Start

cwnd gt= ssthresh

cwnd = 1

cwnd = 2

cwnd = 4

cwnd = 8

cwnd = 9

ssthresh = 8

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

27

TCP Tahoe

Window

Time

W1

W12

W2

W22

ssthresh=W12

ssthresh=W22

Slow Start

Reached initial ssthresh value switch to CA mode

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

28

bull Can we do better than TCP Tahoe

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

29

TCP Reno

Window

Time Slow Start

Reached initial ssthresh value switch to CA mode

Note how there is ldquoFast Recoveryrdquo after cutting Window in half

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

30

TCP Reno Fast Recovery bull Objective prevent `pipersquo from emptying after

fast retransmit ndash each dup ACK represents a packet having left the

pipe (successfully received)

ndash Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKs

ssthresh W2 retransmit lost packet W ssthresh + ndup (window inflation) Wait till W is large enough transmit new packet(s) On non-dup ACK (1 RTT later) W ssthresh (window deflation) enter CA mode

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

31

TCP Reno Summary

bull Fast Recovery along with Fast Retransmit used to avoid slow start

bull On 3 duplicate ACKs

ndash Fast retransmit and fast recovery

bull On timeout

ndash Fast retransmit and slow start

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

Fast Retransmit and Fast Recovery

bull At steady state cwnd oscillates around the optimal window size

bull TCP always forces packet drops

32

Time

cwn

d

Timeout

Slow Start

Congestion Avoidance Fast RetransmitRecovery

ssthresh

Timeout

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

34

TCP Throughput

bull Whatrsquos the average throughout ot TCP as a function of window size and RTT

ndash Ignore slow start

bull Let W be the window size when loss occurs

bull When window is W throughput is WRTT

bull Just after loss window drops to W2 throughput to W2RTT

bull Average throughout 75 WRTT

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

35

TCP Futures

bull Example 1500 byte segments 100ms RTT want 10 Gbps throughput

bull Requires window size W = 83333 in-flight segments

bull Throughput in terms of loss rate

bull L = 210-10 Wow

bull New versions of TCP for high-speed needed

LRTT

MSS221

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

36

Fairness goal if K TCP sessions share same bottleneck link of bandwidth R each should have average rate of RK

TCP connection 1

bottleneck router

capacity R

TCP connection 2

TCP Fairness

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

37

Fairness (more)

bull TCP fairness dependency on RTT

ndash Connections with long RTT get less throughput

bull Parallel TCP connections

bull TCP friendliness for UDP streams

ndash Similar throughput (and behavior) as TCP eg

LRTTthroughput

1

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

39

TCP+HTTP refresher

bull TCP is a connection-oriented protocol

SYN

SYNACK

ACK GET URL

YOUR DATA HERE

FIN FINACK

ACK

Web Client Web Server

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

40

Example Web Page

Harry Potter Movies

As you all know the new HP book will be out in June and then there will be a new movie shortly after thathellip ldquoHarry Potter and the Bathtub Ringrdquo

pagehtml

hpfacejpg

castlegif

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

41

Client Server

The ldquoclassicrdquo approach in HTTP10 is to use one HTTP request per TCP connection serially

TCP SYN

TCP FIN

pagehtml G

TCP SYN

TCP FIN

hpfacejpg G

TCP SYN

TCP FIN

castlegif G

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

42

Client Server Concurrent (parallel) TCP connections can be used to make things faster

TCP SYN

TCP FIN

pagehtml G

castlegif G

F

S

G hpfacejpg

S

F

C S C S

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

43

Client Server

The ldquopersistent HTTPrdquo approach can re-use the same TCP connection for Multiple HTTP transfers one after another serially Amortizes TCP overhead but maintains TCP state longer at server

TCP FIN

Timeout

TCP SYN

pagehtml G

hpfacejpg G

castlegif G

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG

44

Client Server

The ldquopipeliningrdquo feature in HTTP11 allows requests to be issued asynchronously on a persistent connection Requests must be processed in proper order Can do clever packaging

TCP FIN

Timeout

TCP SYN

pagehtml G

castlegif

hpfacejpg GG