DOC PREVIEW
USC CSCI 551 - 11_tcpintro-6up

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 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 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS551Basic TCP MechanismsBill Chenghttp://merlot.usc.edu/cs551-f121 Computer Communications - CSCI 551 Copyright © William C. ChengConnection establishment?2What Does TCP Provide? Computer Communications - CSCI 551 Copyright © William C. ChengConnectionless communication?Congestion control?Differentiated services?Duplicate packet detection?Flow control?Loss recovery?Message or record boundaries?Ordered data delivery?Out-of-order data delivery?Quality of service guarantees?Urgent data indication?Does TCP Provide...3What Does TCP Provide? Computer Communications - CSCI 551 Copyright © William C. ChengConnection establishment? YConnectionless communication? NCongestion control? YDifferentiated services? Y (sort of)Duplicate packet detection? YFlow control? YLoss recovery? YMessage or record boundaries? NOrdered data delivery? YOut-of-order data delivery? NQuality of service guarantees? NUrgent data indication? YDoes TCP Provide...file transfer/ftp, http, p2p, DNS (zone transfers), BGP,SMTP, remote login/telnetWhere: anywhere reliable communication is needed4Where And Why Is TCP Used? Computer Communications - CSCI 551 Copyright © William C. Chengconnection oriented (reliability, ordering, ...)Why?has the right features (congestion control, flow control, ...)widely deployed ⇒ interoperability, understood,exhaustively studies, pretty good implementationsdoing your own protocol is a lot of workeverywhere (60-90% of traffic is TCP)5TCP Summary Computer Communications - CSCI 551 Copyright © William C. ChengCommunication abstraction:ReliableOrderedPoint-to-pointByte-streamProtocol implemented entirely at the endsAssumes unreliable, non-sequenced deliveryFate sharingOperationsOPEN/LISTEN, CONNECT, SEND, RECEIVE, ABORT6TCP Reliability Mechanism Computer Communications - CSCI 551 Copyright © William C. ChengSender Receiverdata1234acklost ackSummary or mechanismswindow-based flowcontrolsequence numbers,3-way handshakereliability (ACK,retransmission policies)congestion controlRTT estimationcummulative ack7 Computer Communications - CSCI 551 Copyright © William C. Cheng TCP HeaderSYNFINRESETPUSHURGACK Flags:DataOptions (variable)Checksum Urgent pointerAdvertised windowFlags0Hdr lenAcknowledgementSequence numberSource portDestination port8TCP Header Computer Communications - CSCI 551 Copyright © William C. Cheng 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Port | Destination Port |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Sequence Number |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Acknowledgment Number |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Hdr | |U|A|P|R|S|F| || Len | Reserved |R|C|S|S|Y|I| Advertised Window || | |G|K|H|T|N|N| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Checksum | Urgent Pointer |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Options (variable) | Padding |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| || Data || |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Connection establishment9TCP Mechanisms Computer Communications - CSCI 551 Copyright © William C. ChengSequence number selectionConnection tear-downRound-trip estimationWindow flow controlA and B must agree on initial sequence number selection:Use 3-way handshake10Connection Establishment Computer Communications - CSCI 551 Copyright © William C. ChengMake sure other side is listeningPass window sizesSetup options (such as timestamping)A B<SEQ=x><CTL=SYN><SEQ=y><ACK=x+1><CTL=SYN+ACK><ACK=y+1><CTL=ACK>SYNACK-BSYN+ACK-ASetup initial sequence number11Connection Setup Computer Communications - CSCI 551 Copyright © William C. Cheng +---------+ ---------\ active OPEN | CLOSED | \ ----------- +---------+<---------\ \ create TCB | ^ \ \ snd SYN passive OPEN | | CLOSE \ \ ------------ | | ---------- \ \ create TCB | | delete TCB \ \ V | \ \ +---------+ CLOSE | \ | LISTEN | ---------- | | +---------+ delete TCB | | rcv SYN | | SEND | | ----------- | | ------- | V +---------+ snd SYN,ACK / \ snd SYN +---------+ | |<----------------- ------------------>| | | SYN | rcv SYN | SYN | | RCVD |<-----------------------------------------------| SENT | | | snd ACK | | | |------------------ -------------------| | +---------+ rcv ACK of SYN \ / rcv SYN,ACK +---------+ | -------------- | | ----------- | x | | snd ACK | V V | CLOSE +---------+ | ------- | ESTAB | | snd FIN +---------+ +---------+ ---------\ active OPEN | CLOSED | \ ----------- +---------+<---------\ \ create TCB | ^ \ \ snd SYN passive OPEN | | CLOSE \ \ ------------ | | ---------- \ \ create TCB | | delete TCB \ \ V | \ \


View Full Document

USC CSCI 551 - 11_tcpintro-6up

Download 11_tcpintro-6up
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 11_tcpintro-6up 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 11_tcpintro-6up 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?