DOC PREVIEW
U of I CS 438 - TCP

This preview shows page 1-2-3-24-25-26 out of 26 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 26 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

TCP 11 12 07 CS ECE 438 UIUC Fall 2007 1 TCP Adaptive Retransmission Algorithm Original Theory Practice Estimate RTT Multiply by 2 to allow for variations Use exponential moving average A 0 1 to 0 2 Estimate A measurement 1 A estimate Problem Did not handle variations well Ambiguity for retransmitted packets 11 12 07 Was ACK in response to first second etc transmission CS ECE 438 UIUC Fall 2007 2 TCP Adaptive Retransmission Algorithm Karn Partridge Algorithm Exclude retransmitted packets from RTT estimate For each retransmission Double RTT estimate Exponential backoff from congestion Problem 11 12 07 Still did not handle variations well Did not solve network congestion problems as well as desired CS ECE 438 UIUC Fall 2007 3 TCP Adaptive Retransmission Algorithm Jacobson Algorithm Estimate variance of RTT Use variance estimate as component of RTT estimate Calculate mean interpacket RTT deviation to approximate variance Use second exponential moving average Deviation B RTT Estimate Measurement 1 B deviation B 0 25 A 0 125 for RTT estimate Next RTT RTT Estimate 4 Deviation Protects against high jitter Notes 11 12 07 Algorithm is only as good as the granularity of the clock Accurate timeout mechanism is important for congestion control CS ECE 438 UIUC Fall 2007 4 TCP Connection Establishment 3 Way Handshake Sequence Numbers 11 12 07 Synchronize SYN Acknowledge ACK Server listens for connection from client Active Open Server Sync hron ize S YN J Passive Open J K Message Types Client Client initiates connection to server CS ECE 438 UIUC Fall 2007 listen K SYN J 1 K C A ledge w o n ack ACK K 1 Time flows down 5 TCP Connection Termination Message Types Client Active Close Finished FIN Acknowledge ACK Sends no more data Passive close Accepts no more data Server Finis hed FIN J J 1 ACK FIN K ACK K 1 Time flows down 11 12 07 CS ECE 438 UIUC Fall 2007 6 TCP Connection Management cont TCP server lifecycle TCP client lifecycle 11 12 07 CS ECE 438 UIUC Fall 2007 7 TCP State Descriptions CLOSED Disconnected LISTEN Waiting for incoming connection SYN RCVD Connection request received SYN SENT Connection request sent ESTABLISHED Connection ready for data transport CLOSE WAIT Connection closed by peer LAST ACK Connection closed by peer closed locally await ACK FIN WAIT 1 Connection closed locally FIN WAIT 2 Connection closed locally and ACK d CLOSING Connection closed by both sides simultaneously TIME WAIT Wait for network to discard related packets 11 12 07 CS ECE 438 UIUC Fall 2007 8 TCP State Transition Diagram Active open SYN CLOSED Passive open Close SYN SYN ACK SYN RCVD ACK Close ACK Close FIN ACK Send SYN SYN SYN ACK ESTABLISHED SYN ACK ACK CLOSE WAIT Close FIN CLOSING FIN WAIT 2 FIN ACK ACK FIN ACK SYN SENT FIN ACK FIN ACK FIN WAIT 1 11 12 07 LISTEN Close ACK LAST ACK TIME WAIT ACK Timeout CS ECE 438 UIUC Fall 2007 CLOSED 9 TCP State Transition Diagram Questions State transitions TIME WAIT state 11 12 07 Describe the path taken by a server under normal conditions Describe the path taken by a client under normal conditions Describe the path taken assuming the client closes the connection first What purpose does this state serve Prove that at least one side of a connection enters this state Explain how both sides might enter this state CS ECE 438 UIUC Fall 2007 10 TCP State Transition Diagram Active open SYN CLOSED Passive open SYN SYN ACK SYN RCVD ACK Close LISTEN 1 2 3 4 5 11 12 07 Send SYN SYN SYN ACK ESTABLISHED TCP A CLOSED SYN SENT ESTABLISHED ESTABLISHED ESTABLISHED Close SYN SENT SYN ACK ACK TCP B LISTEN SEQ 100 CTL SYN SYN RECEIVED SEQ 300 ACK 101 CTL SYN ACK SYN RECEIVED SEQ 101 ACK 301 CTL ACK ESTABLISHED SEQ 101 ACK 301 CTL ACK DATA ESTABLISHED CS ECE 438 UIUC Fall 2007 11 TCP State Transition Diagram Active open SYN CLOSED Passive open Close SYN SYN ACK SYN RCVD ACK Close FIN Close FIN ACK Send SYN SYN SYN ACK ESTABLISHED SYN ACK ACK CLOSE WAIT Close FIN CLOSING FIN WAIT 2 FIN ACK ACK FIN ACK SYN SENT FIN ACK FIN ACK FIN WAIT 1 11 12 07 LISTEN Close ACK LAST ACK TIME WAIT ACK Timeout CS ECE 438 UIUC Fall 2007 CLOSED 12 TCP Sliding Window Protocol Sequence numbers ACK sequence number Enables dynamic receive window size Receive buffers Actually next byte expected as opposed to last byte received Advertised window Indices into byte stream Data ready for delivery to application until requested Out of order data out to maximum buffer capacity Sender buffers 11 12 07 Unacknowledged data Unsent data out to maximum buffer capacity CS ECE 438 UIUC Fall 2007 13 TCP Sliding Window Protocol Sender Side LastByteAcked LastByteSent LastByteSent LastByteWritten Buffer bytes between LastByteAcked and LastByteWritten Maximum buffer size Advertised window Data available but outside window First unacknowledged byte 11 12 07 Last byte sent CS ECE 438 UIUC Fall 2007 14 TCP Sliding Window Protocol Receiver Side LastByteRead NextByteExpected NextByteExpected LastByteRcvd 1 Buffer bytes between NextByteRead and LastByteRcvd Maximum buffer size Advertised window Buffered out of order data Next byte expected ACK value Next byte to be read by application 11 12 07 CS ECE 438 UIUC Fall 2007 15 TCP ACK generation 1 Maximum buffer size Available buffer size Next byte expected ACK value Next byte to be read by application Arrival of in order segment with expected seq All data up to expected seq already ACKed 11 12 07 Delayed ACK Wait up to 500ms for next segment CS ECE 438 UIUC Fall 2007 16 TCP ACK generation 2 Maximum buffer size Available buffer size Next byte expected ACK value Next byte to be read by application Arrival of in order segment with expected seq One other segment has ACK pending 11 12 07 Immediately send single cumulative ACK ACKing both inorder segments CS ECE 438 UIUC Fall 2007 17 TCP ACK generation 3 Maximum buffer size Available buffer size Next byte expected ACK value Next byte to be read by application Arrival of out of order segment higher than expect seq Gap detected 11 12 07 Immediately send duplicate ACK indicating seq of next expected byte CS ECE 438 UIUC Fall 2007 18 TCP ACK generation 4 Maximum buffer size Available buffer size Next byte expected ACK value Next byte to be read by application Arrival of segment that partially or completely fills gap 11 12 07 Immediate send ACK provided that segment starts at lower end of gap CS ECE 438 UIUC Fall 2007 19 TCP ACK generation RFC 1122 RFC 2581 Event at Receiver TCP Receiver action Arrival of in order segment with expected seq All data up


View Full Document

U of I CS 438 - TCP

Documents in this Course
Routing

Routing

5 pages

TROLL

TROLL

3 pages

Load more
Download TCP
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view TCP and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view TCP 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?