CMU CS 15441 - UDP & TCP: Transport Protocols

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32– 1 –15-441UDP & TCP:Transport ProtocolsOct. 27, 2004TopicsTopics●What's a Transport Protocol?●Internet architectural history reminder•TCP/UDP split●UDP and applications●TCP overviewSlides – Randy Bryant, Hui Zhang, Dave EckhardtL17_UDPTCP15-441Computer Networking– 1 –15-441ReadingsSection 2.5Section 2.5●“Reliable Transmission”•Issues, stop&wait, sliding windowChapter 5Chapter 5●5.1 UDP, 5.2 TCP●5.3 (RPC) will be addressed later (though reading early is ok)●5.4 (Performance) shouldn't be too painful– 1 –15-441Architectural ReminderCerfKahn74CerfKahn74●A Protocol for Packet Network Intercommunication●Lays out fundamental Internet architectural assumptions●Subnets will vary in terms of addressing, size, protocol●Application protocols will be end-to-end•All hosts will speak same application protocols•File-format translation as part of one file-transfer protocol•No “file translation gateways” at campus boundaries●“One protocol to bind them” - IP●Particular “division of labor”•Error control is a host matter•Fragmentation compromise – changed by IPv6– 1 –15-441CerfKahn74 vs. IPv4 Addresses are largerAddresses are larger●Paper•8 network bits•“seems sufficient for the forseeable future”•16 host bits•“seems more than sufficient for any given network”●IPv4 – 32 bits●IPv6 128 bits•“Often” 64 network bits, 64 host bits (MAC address)– 1 –15-441CerfKahn74 vs. IPv4 Layering splitLayering split●Paper presented “Transmission Control Program” protocol•One reliable in-order message-stream protocol•One header, so routers understood everything●Paper's TCP split into•IP – host addressing, data delivery•TCP – reliable in-order byte-stream protocol•(note: “message-stream” got lost)•UDP – unreliable un-ordered packet protocol– 1 –15-441Internet Protocol (IP)IP Delivery ModelIP Delivery Model●Connectionless datagram•Each packet independent entity•Each packet contains source & destination address●Best effort service•Packets may be dropped, duplicated, delivered out of order•No performance guaranteeNetwork technologyNetwork applications email WWW phone...SMTP HTTP RTP...TCP UDP…IP ethernet PPP…CSMA async sonet... copper fiber radio...Steve Deering, CISCO– 1 –15-441Transport ProtocolsLowest level end-to-end Lowest level end-to-end protocol.protocol.●Header generated by sender is interpreted only by the destination●Routers view transport header as part of the payloadAdds functionality to the Adds functionality to the best-effort packet delivery best-effort packet delivery IP service.IP service.●Make up for the “shortcomings” of the core network765765TransportIPDatalinkPhysicalTransportIPDatalinkPhysicalIProuter2 21 1– 1 –15-441(Possible) Transport Protocol FunctionsMultiplexing/demultiplexing for multiple applications.Multiplexing/demultiplexing for multiple applications.●“Port” abstraction abstracts OS notions of “process”Connection establishment.Connection establishment.●Logical end-to-end connection●Connection state to optimize performanceError control.Error control.●Hide unreliability of the network layer from applications●Many types of errors: corruption, loss, duplication, reordering.End-to-end flow control.End-to-end flow control.●Avoid flooding the receiverCongestion control.Congestion control.●Avoid flooding the network– 1 –15-441User Datagram Protocol (UDP)●Transforms IP's connectionless datagram into... connectionless datagram!Addressing used for (de)multiplexing.Addressing used for (de)multiplexing.●Port numbers = connection/application endpointEnd-to-end reliability via end-to-end checksum.End-to-end reliability via end-to-end checksum.●Protects against data corruption errors between source and destination (links, switches/routers, memory bus)●Does not protect against packet loss, duplication or reordering●Checksum chosen to be efficient in software (vs. CRC)•Optional in theory, but you'd better use it in practiceSource Port Dest. Port Length D. Checksum– 1 –15-441Two-Level Multiplexing●How does the protocol stack know which application should receive a particular packet?Each IP datagram contains “protocol ID” (UDP, TCP, ...)Each IP datagram contains “protocol ID” (UDP, TCP, ...)●Specifies transport protocol (kernel module) to get packetTransport layer uses the “port” field of transport Transport layer uses the “port” field of transport header to identify the application socket.header to identify the application socket.●(Destination IP, destination port) mapped to socket●Port numbers 0-1023 are “well-known” port numbersUDP packets delivered to a socket can come from UDP packets delivered to a socket can come from various sources (connectionless)various sources (connectionless)●To reply, we swap source (IP,port) with destination (IP,port)– 1 –15-441Two-Level Multiplexing0 4 8 12 16 19 24 28 31ver-sionHLen TOS LengthIdentFlagsOffsetTTLUDP = 17IP Header ChecksumSource AddressDestination AddressOptions (if any)UDP Data BytesUDP Source PortUDP Destination PortUDP Data Length UDP Data Checksum– 1 –15-441Uses of UDP1. Original motivator1. Original motivator●Experimental packet-voice protocol doesn't want TCP•TCP “helpfully” imposes in-order delivery•Audio-data packets have independent deadlines•Once packet #37 is late, it's late•Don't delay playing packet #38 until #37 is retransmitted2. Architectural role2. Architectural role●Lab for experimental transport protocols•Getting a new IP-level protocol number requires results●Use the port addressing provided by UDP●Implement new & improved reliability, flow control, ordering, congestion control– 1 –15-441Uses of UDP3. Request/Response for vital Internet protocols3. Request/Response for vital Internet protocols●DNS, NTP, DHCP, Kerberos, AFS, Zephyr, TFTP, SNMP●Remote procedure calls●Distributed computing communication libraries●Easy to overlook, but...•Internet depends on UDP-based infrastructure protocolsWhy use UDP?Why use UDP?●TCP connection is impossible●TCP connection is too expensive●TCP


View Full Document

CMU CS 15441 - UDP & TCP: Transport Protocols

Documents in this Course
lecture

lecture

34 pages

lecture

lecture

38 pages

lecture

lecture

18 pages

lecture

lecture

28 pages

lecture

lecture

11 pages

Lecture

Lecture

64 pages

lecture

lecture

10 pages

lecture

lecture

19 pages

Lecture 6

Lecture 6

43 pages

Exam

Exam

14 pages

lecture

lecture

38 pages

Debugging

Debugging

23 pages

lecture

lecture

60 pages

review

review

27 pages

lecture

lecture

12 pages

The Web

The Web

28 pages

Lecture

Lecture

40 pages

lecture

lecture

42 pages

lecture

lecture

9 pages

lecture

lecture

10 pages

lecture

lecture

49 pages

lecture

lecture

26 pages

Project

Project

5 pages

lecture

lecture

40 pages

lecture

lecture

9 pages

lecture

lecture

41 pages

lecture

lecture

32 pages

lecture

lecture

36 pages

lecture

lecture

34 pages

lecture

lecture

45 pages

lecture

lecture

26 pages

lecture

lecture

6 pages

lecture

lecture

51 pages

Project

Project

16 pages

lecture

lecture

44 pages

lecture

lecture

13 pages

lecture

lecture

42 pages

lecture

lecture

36 pages

Project

Project

13 pages

Project

Project

33 pages

lecture

lecture

43 pages

lecture

lecture

49 pages

Load more
Download UDP & TCP: Transport Protocols
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 UDP & TCP: Transport Protocols 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 UDP & TCP: Transport Protocols 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?