Transport protocols UDP provides just integrity and demux TCP adds Connection-oriented Reliable Ordered · Point- to-point Byte-stream Full duplex Flow and congestion controlled Lecture 16: Transport Protocols 6
6 Lecture 16: Transport Protocols Transport Protocols • UDP provides just integrity and demux • TCP adds… • Connection-oriented • Reliable • Ordered • Point-to-point • Byte-stream • Full duplex • Flow and congestion controlled
UDP: User Datagram Protocol [RFC 768 “ No frills,”“ bare bones” nternet transport Why is there a UDP? protocol No connection establishment (which can add delay) Best effort service Simple: no connection state UDP segments may be at sender, receiver ·Lost Small header Delivered out of order to No congestion control UDP can blast away as fast as app desired Connection/ess No handshaking between UDP sender recelver Each UDP segment handled independently of others Lecture 16: Transport Protocols 7
7 Lecture 16: Transport Protocols UDP: User Datagram Protocol [RFC 768] • “No frills,” “bare bones” Internet transport protocol • “Best effort” service, UDP segments may be: • Lost • Delivered out of order to app • Connectionless: • No handshaking between UDP sender, receiver • Each UDP segment handled independently of others Why is there a UDP? • No connection establishment (which can add delay) • Simple: no connection state at sender, receiver • Small header • No congestion control: UDP can blast away as fast as desired
UDP cont · Often used for 32 bits streaming multimedia apps Length, in Source port Dest port Loss tolerant bytes of UDI Length checksum segment Rate sensitive including · Other UdP usesheader (why? DNS SNMP Application data Reliable transfer (message) over UDP Must be at application layer UDP segment format Application-specific error recovery Lecture 16: Transport Protocols
8 Lecture 16: Transport Protocols UDP, cont. • Often used for streaming multimedia apps • Loss tolerant • Rate sensitive • Other UDP uses (why?): • DNS, SNMP • Reliable transfer over UDP • Must be at application layer • Application-specific error recovery Source port # Dest port # 32 bits Application data (message) UDP segment format Length Checksum Length, in bytes of UDP segment, including header
UDP Checksum Goal: detect " errors"(e.g, flipped bits)in transmitted segment -optional use Sender. Receiver. Treat segment contents as Compute checksum of received sequence of 16-bit integers segment Checksum: addition(1s Check if computed checksum complement sum)of segment equals checksum field value contents NO-error detected Sender puts checksum value into udP checksum field YEs-no error detected But maybe errors nonethless? Lecture 16: Transport Protocols
9 Lecture 16: Transport Protocols UDP Checksum • Sender: • Treat segment contents as sequence of 16-bit integers • Checksum: addition (1’s complement sum) of segment contents • Sender puts checksum value into UDP checksum field Receiver: • Compute checksum of received segment • Check if computed checksum equals checksum field value: • NO - error detected • YES - no error detected But maybe errors nonethless? Goal: detect “errors” (e.g., flipped bits) in transmitted segment – optional use!
High-Level TCP Characteristics Protocol implemented entirely at the ends Fate sharing Protocol has evolved over time and will continue to do so Nearly impossible to change the header Use options to add information to the header Change processing at endpoints Backward compatibility is what makes it TCP Lecture 16: Transport Protocols
10 Lecture 16: Transport Protocols High-Level TCP Characteristics • Protocol implemented entirely at the ends • Fate sharing • Protocol has evolved over time and will continue to do so • Nearly impossible to change the header • Use options to add information to the header • Change processing at endpoints • Backward compatibility is what makes it TCP