Transport ProtocolsSlide 2TCPTCP Header FormatTCP HeaderTCP Header (Cont)Slide 7TCP OptionsTCP ChecksumTCP Service RequestsTCP Service ResponsesTCP MechanismsData TransferImplementation Policies (Choices)Implementation Policies (Cont)Slow Start Flow ControlSlow Start (Cont)Slide 18Fast Retransmit and RecoveryFRR (Cont)User Datagram Protocol (UDP)SummaryHomeworkRaj JainThe Ohio State University1Transport ProtocolsTransport ProtocolsRaj JainProfessor of CIS The Ohio State UniversityColumbus, OH [email protected]://www.cse.ohio-state.edu/~jain/cis677-98Raj JainThe Ohio State University2TCP Key featuresHeader formatMechanismsImplementation choicesSlow start congestion avoidanceUDPOverviewRaj JainThe Ohio State University3TCPTCPTransport Control ProtocolKey Services:Send: Please send when convenient Data stream push: Please send it all now, if possible.Urgent data signaling: Destination TCP! please give this urgent data to the user(Urgent data is delivered in sequence. Push at the should be explicit if needed.)Note: Push has no effect on delivery. Urgent requests quick deliveryRaj JainThe Ohio State University4TCP Header FormatTCP Header Format16 16 32 32 6SourcePortDestPortSeqNoAckNoDataOffsetControl WindowResvd4 6 1616 16 x y Size in bitsCheck-sumUrgent Options Pad DataRaj JainThe Ohio State University5TCP HeaderTCP HeaderSource Port (16 bits): Identifies source user process20 = FTP, 23 = Telnet, 53 = DNS, 80 = HTTP, ...Destination Port (16 bits)Sequence Number (32 bits): Sequence number of the first byte in the segment. If SYN is present, this is the initial sequence number (ISN) and the first data byte is ISN+1.Ack number (32 bits): Next byte expectedData offset (4 bits): Number of 32-bit words in the headerReserved (6 bits)Raj JainThe Ohio State University6TCP Header (Cont)TCP Header (Cont)Control (6 bits): Urgent pointer field significant, Ack field significant, Push function, Reset the connection, Synchronize the sequence numbers, No more data from senderACKURG PSH RST SYN FINWindow (16 bits): Will accept [Ack] to [Ack]+[window]Raj JainThe Ohio State University7TCP Header (Cont)TCP Header (Cont)Checksum (16 bits): covers the segment plus a pseudo header. Includes the following fields from IP header: source and dest adr, protocol, segment length. Protects from IP misdelivery.Urgent pointer (16 bits): Points to the byte following urgent data. Lets receiver know how much data it should deliver right away.Options (variable): Max segment size (does not include TCP header, default 536 bytes), Window scale factor, Selective Ack permitted, Timestamp, No-Op, End-of-optionsRaj JainThe Ohio State University8TCP OptionsTCP OptionsEnd of Options: Stop looking for further optionNo-op: Ignore this byte. Used to align the next option on a 4-byte word boundaryMSS: Does not include TCP headerKind Length Meaning0 1 End of Valid options in header1 1 No-op2 4 Maximum Segment Size3 3 Window Scale Factor8 10 TimestampRaj JainThe Ohio State University9TCP ChecksumTCP ChecksumChecksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the TCP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.Checksum field is filled with zeros initiallyTCP length (in octet) is not transmitted but used in calculations. Efficient implementation in RFC1071.Source Adr Dest. Adr Zeros Protocol TCP LengthTCP HeaderTCP data32 32 8 8 16Raj JainThe Ohio State University10TCP Service RequestsTCP Service RequestsUnspecified passive open: Listen for connection requests from any user (port)Full passive open: Listen for connection requests from specified portActive open: Request connectionActive open with data: Request connection and transmit dataSend: Send dataAllocate: Issue incremental allocation for receive dataClose: Close the connection gracefullyAbort: Close the connection abruptlyStatus: Report connection statusRaj JainThe Ohio State University11TCP Service ResponsesTCP Service ResponsesOpen ID: Informs the name assigned to the pending requestOpen Failure: Your open request failedOpen Success: Your open request succeededDeliver: Reports arrival of dataClosing: Remote TCP has issued a close requestTerminate: Connection has been terminatedStatus Response: Here is the connection statusError: Reports service request or internal errorRaj JainThe Ohio State University12TCP MechanismsTCP MechanismsConnection EstablishmentThree way handshakeSYN flag set Request for connectionSYN, ISN = 100SYN, ISN = 350, Ack 101Ack 351Connection TerminationClose with FIN flag setAbortRaj JainThe Ohio State University13Data TransferData TransferStream: Every byte is numbered modulo 232.Header contains the sequence number of the first byteFlow control: Credit = number of bytesData transmitted at intervals determined by TCPPush Send nowUrgent: Send this data in ordinary data stream with urgent pointerIf TPDU not intended for this connection is received, the “reset” flag is set in the outgoing segmentRaj JainThe Ohio State University14Implementation Policies (Choices)Implementation Policies (Choices)Send Policy: Too little More overhead. Too large DelayPush Send now, if possible.Delivery Policy: May store or deliver each in-order segment.Urgent Deliver now, if possible.Accept Policy: May or May not discard out-of-order segmentsRaj JainThe Ohio State University15Implementation Policies (Cont)Implementation Policies (Cont)Retransmit Policy: First onlyRetransmit all Retransmit individual (maintain separate timer for each segment)Ack Policy: Immediate (no piggybacking)Cumulative (wait for outgoing data or timeout)Raj JainThe Ohio State University16Slow Start Flow ControlSlow Start Flow ControlWindow = Flow Control Avoids receiver overrunNeed congestion control to avoid network overrunThe sender maintains two windows: Credits from the receiverCongestion window from the networkCongestion window is always less than the receiver windowStarts with a congestion window (CWND) of 1 segment (one max segment size) Do not disturb existing connections too much.Increase CWND by 1 every time an ack is receivedRaj JainThe Ohio State University17Slow Start (Cont)Slow Start (Cont)If packets
View Full Document