chapter 3 transport layer chapter 3 transport layer
play

Chapter 3 Transport Layer Chapter 3: Transport Layer Our goals: - PowerPoint PPT Presentation

Chapter 3 Transport Layer Chapter 3: Transport Layer Our goals: learn about transport l n b t t nsp t understand principles d t d i i l layer protocols in the behind transport Internet: layer services: y UDP:


  1. Chapter 3 Transport Layer Chapter 3: Transport Layer Our goals:  learn about transport  l n b t t nsp t  understand principles d t d i i l  layer protocols in the behind transport Internet: layer services: y  UDP: connectionless  multiplexing/ transport, unreliable demultiplexing delivery of segments  reliable data transfer  reliable data transfer  TCP: connection-oriented  flow control transport, reliable delivery  congestion control of byte stream 10/17/2017 Transport Layer (SSL) 3-1 1

  2. Chapter 3 outline Chapter 3 outl ne  3.1 Transport-layer p y  3.5 Connection-oriented services transport: TCP  3.2 Multiplexing and  segment structure demultiplexing d lti l i  reliable data transfer  reliable data transfer  flow control  3.3 Connectionless  connection management transport: UDP tran p rt D  3.6 Principles of  3.4 Principles of congestion control reliable data transfer  3 7 TCP congestion  3.7 TCP congestion (my slides for Section control 3.4 do not follow Kurose & Ross) Kurose & Ross) 10/17/2017 Transport Layer (SSL) 3-2 2

  3. Transport services and protocols Transport serv ces and protocols application transport  provide logical communication network data link between app processes on between app processes on phys cal physical different hosts  transport protocol runs in end systems (primarily) end systems (primarily)  send side: breaks app messages into segments , passes to network layer passes to network layer  rcv side: reassembles application transport segments into messages, network data link passes to app layer passes to app layer physical 10/17/2017 Transport Layer (SSL) 3-3 3

  4. Internet transport-layer protocols  unreliable, unordered application transport network datagram delivery by UDP datagram delivery by UDP d data link li k physical network  no-frills extension of “best- data link network physical effort” IP data link physical  reliable, in-order byte delivery by TCP network data link physical  connection setup  connection setup network d data link li k physical  flow control network data link  congestion control application physical network transport data link network  services not available: i il bl physical h i l data link physical  delay guarantees  bandwidth guarantees g 10/17/2017 Transport Layer (SSL) 3-4 4

  5. Chapter 3 outline Chapter 3 outl ne  3.1 Transport-layer p y  3.5 Connection-oriented services transport: TCP  3.2 Multiplexing and  segment structure d demultiplexing lti l i  reliable data transfer  reliable data transfer  flow control  3.3 Connectionless  connection management transport: UDP tran p rt D  3.6 Principles of  3.4 Principles of congestion control reliable data transfer  3 7 TCP congestion  3.7 TCP congestion control 10/17/2017 Transport Layer (SSL) 3-5 5

  6. Multiplexing/demultiplexing Multiplexing/demultiplexing Multiplexing at send host: Demultiplexing at rcv host: gather data from multiple deliver received segments deliver received segments sockets, encapsulate data with to correct sockets header (later used for demultiplexing) socket k t process/thread /th d P4 application P1 P2 P3 application P1 application transport transport transport network network network link link link physical physical physical host 3 host 2 host 1 10/17/2017 Transport Layer (SSL) 3-6 6

  7. How demultiplexing works m p g 32 bits  host receives IP datagrams source port # dest port #  It uses IP addresses in layer- y other header fields 3 header & port numbers in layer-4 header to direct segment to appropriate socket application data (message) ( g ) TCP/UDP segment format 10/17/2017 Transport Layer (SSL) 3-7 7

  8. Connectionless demultiplexing Connect onless demult plex ng  UDP socket identified by  UDP socket identified by  IP datagrams from  IP datagrams from two-tuple: different sources directed to same UDP ( dest IP address, dest port number) socket k t  When host receives UDP segment: segment:  directs UDP segment to socket with destination port number number 10/17/2017 Transport Layer (SSL) 3-8 8

  9. Connect on or ented demux Connection-oriented demux  Server has welcome and  Server may support y pp connection sockets many simultaneous TCP connection sockets with  welcome socket is clients: identified by server’s IP address and a port dd d  each connection socket number and the welcome socket  TCP connection socket have the same port number in server host b i s h st identified by 4-tuple: id tifi d b 4 t l  receiving host uses all  source IP address four values to direct  source port number segment to appropriate segment to appropriate  dest IP address connection socket  dest port number 10/17/2017 Transport Layer (SSL) 3-9 9

  10. Connection-oriented demux ( (cont) t) P4 P1 P2 P1 P3 SP: 5775 DP: 80 S-IP: B D IP C D-IP:C SP: 9157 SP: 9157 client client DP: 80 DP: 80 DP: 80 DP: 80 Client Client server IP: A IP:B S-IP: A S-IP: B IP: C D-IP:C D-IP:C 10/17/2017 Transport Layer (SSL) 3-10 10

  11. Chapter 3 outline Chapter 3 outl ne  3.1 Transport-layer p y  3.5 Connection-oriented services transport: TCP  3.2 Multiplexing and  segment structure d demultiplexing lti l i  reliable data transfer  reliable data transfer  flow control  3.3 Connectionless  connection management transport: UDP tran p rt D  3.6 Principles of  3.4 Principles of congestion control reliable data transfer  3 7 TCP congestion  3.7 TCP congestion control 10/17/2017 Transport Layer (SSL) 3-11 11

  12. UDP: User Datagram Protocol [RFC 768] g [ ]  “best effort” service, UDP Length, in bytes of UDP segments (aka datagrams) segment including header g g may be: b 32 bits  lost source port # dest. port #  delivered out of order to appl checksum length  connectionless:  no handshaking between no handshak ng between UDP sender, receiver  each UDP segment Application handled independently p y data data of others (message) UDP segment format 10/17/2017 Transport Layer (SSL) 3-12 12

  13. UDP (more)  suitable for interactive streaming multimedia applications pp Advantages of UDP Adv nt s f UDP  loss tolerant  no congestion control: UDP  min rate required can blast away as fast as  other UDP uses e g  other UDP uses, e.g. desired d i d  DNS  small segment header  SNMP  no connection establishment (which can  DHCP add delay)  reliable transfer over  simple: no connection state UDP? at sender, receiver t d i add reliability in application layer  application-specific pp p f error recovery 10/17/2017 Transport Layer (SSL) 3-13 13

  14. Internet checksum S nd Sender: : Receiver:  treat segment as a sequence of 16-bit  compute 1’s complement sum integers (with checksum field i t of received segment (checksum initialized to zero) field included)  add integers using 1’s  check if computed sum equals complement arithmetic complement arithmetic si t sixteen 1’s: 1’s: and take 1’s complement  NO - error detected of the sum  YES - no error detected  put result as checksum  put result as checksum But maybe errors value into checksum field nonetheless? More later  detail: pseudoheader …. consisting of protocol no consisting of protocol no., IP IP addresses, segment length field (again) included in checksum calculation 10/17/2017 Transport Layer (SSL) 3-14 14

  15. Internet Checksum Example  Notes N  In ones complement arithmetic, a negative integer -x is represented as the complement of x , i.e., each bit of x is p p , , inverted  When adding numbers, a carryout from the most significant bit needs to be added to the result g  Example: add two 16-bit integers 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 sum 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 10/17/2017 Transport Layer (SSL) 3-15 15

  16. Chapter 3 outline Chapter 3 outl ne  3.1 Transport-layer p y  3.5 Connection-oriented services transport: TCP  3.2 Multiplexing and  segment structure demultiplexing d lti l i  reliable data transfer  reliable data transfer  flow control  3.3 Connectionless  connection management tran p rt transport: UDP D  3.6 Principles of  3.4 Principles of congestion control reliable data transfer  3 7 TCP congestion  3.7 TCP congestion (my slides do not control follow Kurose & Ross) 10/17/2017 Transport Layer (SSL) 3-16 16

  17. Principles of Reliable data transfer p f f  important in application, transport, link layers  top-10 list of important networking topics!  top-10 list of important networking topics! 10/17/2017 Transport Layer (SSL) 3-17 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend