chapter 3 transport layer
play

Chapter 3: Transport Layer Our goals: learn about transport - PDF document

Chapter 3: Transport Layer Our goals: learn about transport understand principles l layer protocols in the t l i th b h behind transport d Internet: layer services: UDP: connectionless multiplexing/ transport, unreliable


  1. Chapter 3: Transport Layer Our goals:  learn about transport  understand principles l layer protocols in the t l i th b h behind transport d Internet: layer services:  UDP: connectionless  multiplexing/ transport, unreliable demultiplexing delivery of segments  reliable data transfer  TCP: connection-oriented  flow control transport, reliable delivery p y  congestion control ti t l of byte stream 10/17/2017 Transport Layer (SSL) 3-1 Chapter 3 outline  3.1 Transport-layer  3.5 Connection-oriented services services transport TCP transport: TCP  3.2 Multiplexing and  segment structure  reliable data transfer demultiplexing  flow control  3.3 Connectionless  connection management transport: UDP  3.6 Principles of  3.4 Principles of congest on control congestion control reliable data transfer reliable data transfer  3.7 TCP congestion (my slides for Section control 3.4 do not follow Kurose & Ross) 10/17/2017 Transport Layer (SSL) 3-2 1

  2. Transport services and protocols application transport  provide logical communication network data link between app processes on physical different hosts different hosts  transport protocol runs in end systems (primarily)  send side: breaks app messages into segments , passes to network layer  rcv side: reassembles application transport segments into messages, segments into messages network data link passes to app layer physical 10/17/2017 Transport Layer (SSL) 3-3 Internet transport-layer protocols  unreliable, unordered application transport datagram delivery by UDP network data link physical network network  no-frills extension of “best- f ll f “b data link network physical effort” IP data link physical  reliable, in-order byte delivery by TCP network data link  connection setup physical network data link physical  flow control network data link  congestion control  congestion control application pp physical physical network transport data link network  services not available: physical data link physical  delay guarantees  bandwidth guarantees 10/17/2017 Transport Layer (SSL) 3-4 2

  3. Chapter 3 outline  3.1 Transport-layer  3.5 Connection-oriented services services transport: TCP transport TCP  3.2 Multiplexing and  segment structure demultiplexing  reliable data transfer  flow control  3.3 Connectionless  connection management transport: UDP  3.6 Principles of  3.4 Principles of congestion control congest on control reliable data transfer reliable data transfer  3.7 TCP congestion control 10/17/2017 Transport Layer (SSL) 3-5 Multiplexing/demultiplexing Multiplexing at send host: Demultiplexing at rcv host: gather data from multiple deliver received segments sockets, encapsulate data with to correct sockets to correct sockets header (later used for h d (l d f demultiplexing) socket process/thread P4 application P1 P2 application P3 P1 application transport transport transport network t k network network link link link physical physical physical host 3 host 2 host 1 10/17/2017 Transport Layer (SSL) 3-6 3

  4. How demultiplexing works 32 bits  host receives IP datagrams source port # source port # dest port # dest port #  It uses IP addresses in layer- other header fields 3 header & port numbers in layer-4 header to direct segment to appropriate socket application data (message) TCP/UDP segment format 10/17/2017 Transport Layer (SSL) 3-7 Connectionless demultiplexing  UDP socket identified by  IP datagrams from two tuple: two-tuple: different sources different sources ( dest IP address, dest port number) directed to same UDP socket  When host receives UDP segment:  directs UDP segment to socket with destination port k t ith d ti ti t number 10/17/2017 Transport Layer (SSL) 3-8 4

  5. Connection-oriented demux  Server has welcome and  Server may support connection sockets many simultaneous TCP y connection sockets with  welcome socket is identified by server’s IP clients: address and a port  each connection socket number and the welcome socket  TCP connection socket have the same port identified by 4-tuple: number in server host  receiving host uses all  source IP address four values to direct four values to direct  source port number segment to appropriate  dest IP address connection socket  dest port number 10/17/2017 Transport Layer (SSL) 3-9 Connection-oriented demux (cont) P4 P1 P1 P2 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 SP: 9157 SP: 9157 client DP: 80 DP: 80 Client server IP: A S-IP: A S-IP: B IP:B IP: C D-IP:C D-IP:C 10/17/2017 Transport Layer (SSL) 3-10 5

  6. Chapter 3 outline  3.1 Transport-layer  3.5 Connection-oriented services services transport TCP transport: TCP  3.2 Multiplexing and  segment structure demultiplexing  reliable data transfer  flow control  3.3 Connectionless  connection management transport: UDP  3.6 Principles of  3.4 Principles of congestion control congest on control reliable data transfer reliable data transfer  3.7 TCP congestion control 10/17/2017 Transport Layer (SSL) 3-11 UDP: User Datagram Protocol [RFC 768]  “best effort” service, UDP Length, in bytes of UDP segments (aka datagrams) segment including header may be: 32 bits 32 bits  lost source port # dest. port #  delivered out of order to appl length checksum  connectionless:  no handshaking between UDP sender, receiver  each UDP segment  each UDP segment Application Application handled independently data of others (message) UDP segment format 10/17/2017 Transport Layer (SSL) 3-12 6

  7. UDP (more)  suitable for interactive streaming multimedia applications Advantages of UDP  loss tolerant  no congestion control: UDP  min rate required can blast away as fast as  other UDP uses, e.g. desired  DNS  small segment header  SNMP  no connection establishment (which can  DHCP add delay)  reliable transfer over  simple: no connection state UDP? at sender, receiver add reliability in application layer  application-specific error recovery 10/17/2017 Transport Layer (SSL) 3-13 Internet checksum Sender: Receiver:  treat segment as a sequence of 16-bit  compute 1’s complement sum integers (with checksum field of received segment (checksum initialized to zero) initialized to zero) field included) fi ld i l d d)  add integers using 1’s  check if computed sum equals complement arithmetic sixteen 1’s: and take 1’s complement  NO - error detected of the sum  YES - no error detected  put result as checksum But maybe errors value into checksum field nonetheless? More later  detail: pseudoheader  detail: s d h d …. consisting of protocol no., IP addresses, segment length field (again) included in checksum calculation 10/17/2017 Transport Layer (SSL) 3-14 7

  8. Internet Checksum Example  Notes  In ones complement arithmetic, a negative integer -x is represented as the complement of x , i.e., each bit of x is inverted  When adding numbers, a carryout from the most significant bit needs to be added to the result  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 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 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 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 Chapter 3 outline  3.1 Transport-layer  3.5 Connection-oriented services services transport: TCP transport TCP  3.2 Multiplexing and  segment structure  reliable data transfer demultiplexing  flow control  3.3 Connectionless  connection management transport: UDP  3.6 Principles of  3.4 Principles of congestion control congest on control reliable data transfer reliable data transfer  3.7 TCP congestion (my slides do not control follow Kurose & Ross) 10/17/2017 Transport Layer (SSL) 3-16 8

  9. Principles of Reliable data transfer  important in application, transport, link layers  top-10 list of important networking topics! 10/17/2017 Transport Layer (SSL) 3-17 Principles of Reliable data transfer  important in app., transport, link layers  top-10 list of important networking topics!  characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt) 10/17/2017 Transport Layer (SSL) 3-18 9

  10. Principles of Reliable data transfer  important in app., transport, link layers  top-10 list of important networking topics!  characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt) 10/17/2017 Transport Layer (SSL) 3-19 Channel Abstractions  Lossy FIFO channel  delivers a subsequence in FIFO order  delivers a subsequence in FIFO order  example: delivery service provided by a physical link  Lossy, reordering, duplicative (LRD) channel channel  example: delivery service provided by IP or by UDP protocol 10/17/2017 Transport Layer (SSL) 3-20 10

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