Chapter 3 Transport Layer computer networking third edition James F.Kurose Keith W.Ross A note on the use of these ppt slides: We're making these slides freely available to all(faculty,students,readers). They're in PowerPoint form so you can add,modify,and delete slides Computer Networking: (including this one)and slide content to suit your needs.They obviously A Top Down Approach represent a lot of work on our part.In return for use,we only ask the following: Featuring the Internet, If you use these slides(e.g.,in a class)in substantially unaltered form, 3rd edition. that you mention their source (after all,we'd like people to use our book!) If you post any slides in substantially unaltered form on a ww site,that Jim Kurose,Keith Ross you note that they are adapted from(or perhaps identical to)our slides,and Addison-Wesley,July note our copyright of this material. 2004. Thanks and enjoy!JFK/KWR All material copyright 1996-2006 J.F Kurose and K.W.Ross,All Rights Reserved Transport Layer 3-1
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: q If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) q If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2006 J.F Kurose and K.W. Ross, All Rights Reserved
Chapter 3:Transport Layer Our goals: r understand principles r learn about transport behind transport layer protocols in the layer services: Internet: m multiplexing/demultipl m UDP:connectionless exing transport m reliable data transfer m TCP:connection-oriented m flow control transport m congestion control m TCP congestion control Transport Layer 3-2
Transport Layer 3-2 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow control m congestion control r learn about transport layer protocols in the Internet: m UDP: connectionless transport m TCP: connection-oriented transport m TCP congestion control
Chapter 3 outline r 3.1 Transport-layer r 3.5 Connection-oriented services transport:TCP r 3.2 Multiplexing and m segment structure demultiplexing m reliable data transfer r 3.3 Connectionless m flow control transport:UDP m connection management r 3.4 Principles of r 3.6 Principles of reliable data transfer congestion control r 3.7 TCP congestion control Transport Layer 3-3
Transport Layer 3-3 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles of reliable data transfer r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management r 3.6 Principles of congestion control r 3.7 TCP congestion control
Transport services and protocols r provide logical communication application between app processes transport network running on different hosts data link network physical data link work r transport protocols run in end physical systems m send side:breaks app ogical end-er network data link physical network data link messages into segments, ransport physical passes to network layer etwork a link m rcy side:reassembles segments into messages, application fransport passes to app layer network data link more than one transport physical protocol available to apps m Internet:TCP and UDP Transport Layer 3-4
Transport Layer 3-4 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end systems m send side: breaks app messages into segments, passes to network layer m rcv side: reassembles segments into messages, passes to app layer r more than one transport protocol available to apps m Internet: TCP and UDP application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link network physical data link physical logical end-end transport
Transport vs.network layer r network layer:logical Household analogy: communication 12 kids sending letters between hosts to 12 kids r transport layer:logical r processes kids communication r app messages letters between processes in envelopes m relies on,enhances, r hosts houses network layer services r transport protocol Ann and Bill r i network-layer protocol postal service Transport Layer 3-5
Transport Layer 3-5 Transport vs. network layer r network layer: logical communication between hosts r transport layer: logical communication between processes m relies on, enhances, network layer services Household analogy: 12 kids sending letters to 12 kids r processes = kids r app messages = letters in envelopes r hosts = houses r transport protocol = Ann and Bill r network-layer protocol = postal service
Internet transport-layer protocols r reliable,in-order application transport delivery (TCP) network data link network physical m congestion control data link work physical m flow control network m connection setup data link physical network data link r unreliable,unordered physical delivery:UDP end-end transpor etwork a link m no-frills extension of "best-effort"IP application fransport network r services not available: data link physical m delay guarantees m bandwidth guarantees Transport Layer 3-6
Transport Layer 3-6 Internet transport-layer protocols r reliable, in-order delivery (TCP) m congestion control m flow control m connection setup r unreliable, unordered delivery: UDP m no-frills extension of “best-effort” IP r services not available: m delay guarantees m bandwidth guarantees application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link network physical data link physical logical end-end transport
Chapter 3 outline r 3.1 Transport-layer r 3.5 Connection-oriented services transport:TCP r 3.2 Multiplexing and m segment structure demultiplexing m reliable data transfer r 3.3 Connectionless m flow control transport:UDP m connection management r 3.4 Principles of r 3.6 Principles of reliable data transfer congestion control r 3.7 TCP congestion control Transport Layer 3-7
Transport Layer 3-7 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles of reliable data transfer r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management r 3.6 Principles of congestion control r 3.7 TCP congestion control
Multiplexing/demultiplexing Demultiplexing at rcy host: Multiplexing at send host: delivering received segments gathering data from multiple to correct socket sockets,enveloping data with header (later used for demultiplexing) socket process application P3 P1 application P2 P4 application transport transport transport network network network link k link physical physical physical host 1 host 2 host 3 Transport Layer 3-8
Transport Layer 3-8 Multiplexing/demultiplexing application transport network link physical P1 application transport network link physical application transport network link physical P3 P2 P4 P1 host 1 host 2 host 3 = socket = process delivering received segments to correct socket Demultiplexing at rcv host: gathering data from multiple sockets, enveloping data with header (later used for demultiplexing) Multiplexing at send host:
How demultiplexing works r host receives IP datagrams m each datagram has source 32 bits IP address,destination IP address source port dest port m each datagram carries 1 transport-layer segment other header fields m each segment has source, destination port number r l host uses IP addresses port application numbers to direct segment to data appropriate socket (message) TCP/UDP segment format Transport Layer 3-9
Transport Layer 3-9 How demultiplexing works r host receives IP datagrams m each datagram has source IP address, destination IP address m each datagram carries 1 transport-layer segment m each segment has source, destination port number r host uses IP addresses & port numbers to direct segment to appropriate socket source port # dest port # 32 bits application data (message) other header fields TCP/UDP segment format
Connectionless demultiplexing r Create sockets with port r When host receives UDP numbers: segment: DatagramSocket mySocketl new m checks destination port DatagramSocket(12534); number in segment DatagramSocket mySocket2 new m directs UDP segment to DatagramSocket (12535); socket with that port r UDP socket identified by number two-tuple: r IP datagrams with different source IP (dest IP address,dest port number) addresses and/or source port numbers directed to same socket Transport Layer 3-10
Transport Layer 3-10 Connectionless demultiplexing r Create sockets with port numbers: DatagramSocket mySocket1 = new DatagramSocket(12534); DatagramSocket mySocket2 = new DatagramSocket(12535); r UDP socket identified by two-tuple: (dest IP address, dest port number) r When host receives UDP segment: m checks destination port number in segment m directs UDP segment to socket with that port number r IP datagrams with different source IP addresses and/or source port numbers directed to same socket