15-441 Computer Networking ecture 16-Transport Protocols
15-441 Computer Networking Lecture 16 – Transport Protocols
Announcements Mid-semester grades Based on project 1+ midterm HW1+ HW2 42.5% of class If you got a D+, D, D-or F must meet with Dave or me Much of class grade remains! Discussion about the midterm next time One or two people still haven't taken it Lecture 16: Transport Protocols
2 Lecture 16: Transport Protocols Announcements • Mid-semester grades • Based on project1 + midterm + HW1 + HW2 • 42.5% of class • If you got a D+,D, D- or F → must meet with Dave or me • Much of class grade remains! • Discussion about the midterm next time • One or two people still haven’t taken it
Outline Transport introduction Error recovery flow control Lecture 16: Transport Protocols
3 Lecture 16: Transport Protocols Outline • Transport introduction • Error recovery & flow control
Transport protocols Lowest level end-to- end protocol Header generated by 7 7 sender is interpreted 6 6 only by the destination 5 Routers view transport header as part of the Transport Transport payload P P P Datalink 2 2 Datalink Physical Physical router Lecture 16: Transport Protocols
4 Lecture 16: Transport Protocols Transport Protocols • Lowest level end-toend protocol. • Header generated by sender is interpreted only by the destination • Routers view transport header as part of the payload 7 6 5 7 6 5 Transport IP Datalink Physical Transport IP Datalink Physical IP router 2 2 1 1
Functionality Split Network provides best-effort delivery End-systems implement many functions Reliability n-order delIvery · Demultiplexing Message boundaries Connection abstraction ° Congestion control Lecture 16: Transport Protocols
5 Lecture 16: Transport Protocols Functionality Split • Network provides best-effort delivery • End-systems implement many functions • Reliability • In-order delivery • Demultiplexing • Message boundaries • Connection abstraction • Congestion control • …
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