Announcements We re soliciting feedback What s not working What s working well Send via email Transport Protocols DNS or if you want to be anonymous put a note in my box in Soda 3rd floor near dept admins EE 122 Intro to Communication Networks Fall 2006 MW 4 5 30 in Donner 155 Vern Paxson TAs Dilip Antony Joseph and Sukun Kim http inst eecs berkeley edu ee122 Materials with thanks to Jennifer Rexford Ion Stoica and colleagues at Princeton and UC Berkeley 1 2 Goals for Today s Lecture Part 1 Goals of Today s Lecture Part 2 Principles underlying transport layer services Concepts principles underlying Domain Name System DNS De multiplexing via port numbers Reliable delivery Performance issues Indirection names in place of addresses Hierarchy in names addresses and servers Caching of mappings from names to from addresses Stop and Wait vs Sliding Window Flow control Inner workings of DNS Service models of Internet transport protocols DNS resolvers and servers Iterative and recursive queries TTL based caching Use of the dig utility User Datagram Protocol UDP Transmission Control Protocol TCP Not a goal for today details of TCP s operation 3 Role of Transport Layer Transport Protocols Application layer Communication for specific applications E g HyperText Transfer Protocol HTTP File Transfer Protocol FTP Network News Transfer Protocol NNTP 5 Run on end hosts Sender breaks application messages into segments and passes to network layer Receiver reassembles segments into messages passes to application layer Multiple transport protocol available to applications Internet TCP and UDP mainly network data link physical network data link physical network data link physical t or sp an tr Network layer application transport network data link physical d en den Communication between processes e g socket Relies on network layer serves the application layer E g TCP and UDP Provide logical communication between application processes running on different hosts l ca gi lo Transport layer Logical communication between nodes Hides details of the link technology E g IP 4 network data link physical network data link physical application transport network data link physical 6 1 Internet Transport Protocols Multiplexing and Demultiplexing Datagram messaging service UDP Host receives IP datagrams Each datagram has source and destination IP address Each datagram carries one transport layer segment Each segment has source and destination port number No frills extension of best effort IP Reliable in order delivery TCP Connection set up Discarding of corrupted packets Retransmission of lost packets Flow control Congestion control Delay guarantees Bandwidth guarantees Sessions that survive change of IP address 7 Finer control over what data is sent and when Avoid overhead and delays of ordered reliable delivery Send messages to and receive them from a socket As soon as an application process writes into the socket UDP will package the data and send the packet User Datagram Protocol UDP RFC 768 1980 No delay for connection establishment IP plus port numbers to support de multiplexing Optional error checking on the packet contents UDP just blasts away without any formal preliminaries which avoids introducing any unnecessary delays checksum field 0 means don t verify checksum length 8 Why Would Anyone Use UDP Lightweight communication between processes checksum application data message TCP UDP segment format Unreliable Message Delivery Service DST port dest port other header fields Host uses IP addresses and port numbers to direct the segment to appropriate socket Services not available SRC port 32 bits source port No connection state No allocation of buffers sequence s timers making it easier to handle many active clients at once Small packet header overhead DATA 9 Popular Applications That Use UDP UDP header is only 8 bytes 10 Transmission Control Protocol TCP Connection oriented Multimedia streaming Retransmitting lost corrupted packets often pointless by the time the packet is retransmitted it s too late E g telephone calls video conferencing gaming Simple query protocols like Domain Name System Connection establishment overhead would double cost Easier to have application retransmit if needed Explicit set up and tear down of TCP session Stream of bytes service Sends and receives a stream of bytes not messages Congestion control Dynamic adaptation to network path s capacity Reliable in order delivery TCP tries very hard to ensure byte stream eventually arrives intact Address for bbc co uk In the presence of corruption and loss Flow control 212 58 228 155 11 Ensure that sender doesn t overwhelm receiver 12 2 Reliable Delivery Reliable Delivery con t How do we design for reliable delivery Timeout One possible model how does it work talking on your cell phone If haven t heard anything from receiver send again Problem for how long do you wait TCP uses function of estimated RTT Positive acknowledgment Ack Problem what if no Ack for retransmission Explicit confirmation by receiver TCP acknowledgments are cumulative I ve received everything up through sequence N TCP and other schemes employs exponential backoff Double timer up to maximum tapers off load during congestion A very different approach to reliability send redundant data With an option for acknowledging individual segments SACK Negative acknowledgment Nack I m missing the following How might the receiver tell something s missing Can they always do this Only used by TCP in implicit fashion fast retransmit 13 Cell phone analogy Meet me at 3PM repeat 3PM Forward error correction Recovers from lost data nearly immediately But only can cope with a limited degree of loss And adds load to the network 14 TCP Support for Reliable Delivery Sequence numbers Efficient Transport Reliability Checksum Used to detect missing data and for putting the data back in order Used to detect corrupted data at the receiver leading the receiver to drop the packet No error signal sent recovery via normal retransmission Retransmission Sender retransmits lost or corrupted data Timeout based on estimates of round trip time RTT Fast retransmit algorithm for rapid retransmission 16 15 Automatic Repeat reQuest ARQ How Fast Can Stop and Wait Go Suppose we re sending from UCB to New York Automatic Repeat Request Receiver sends acknowledgment ACK when it receives packet Sender waits for ACK and times out if does not arrive within some time period Timeout Sender Bandwidth 1 Mbps megabits sec RTT
View Full Document