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 behind transport b h d Internet: layer services: UDP: connectionless multiplexing/ transport


  1. Chapter 3: Transport Layer Our goals:  learn about transport  understand principles l layer protocols in the t l i th behind transport b h d Internet: layer services:  UDP: connectionless  multiplexing/ transport demultiplexing  TCP: connection-oriented  reliable data transfer transport with congestion  flow control control  congestion control ti t l 10/14/2013 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 3.4 do control not follow Kurose & Ross) 10/14/2013 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 protocols run 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/14/2013 Transport Layer (SSL) 3-3 Internet transport-layer protocols  reliable, in-order byte application transport delivery by TCP network data link physical network network  congestion control l data link network physical data link  flow control physical  connection setup  unreliable, unordered network data link delivery by UDP physical network data link physical  no-frills extension of network data link “best effort” IP best-effort IP application pp physical physical network transport data link network  services not available: physical data link physical  delay guarantees  bandwidth guarantees 10/14/2013 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 congest on control congestion control reliable data transfer reliable data transfer  3.7 TCP congestion control 10/14/2013 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 h header (later used for 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/14/2013 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 & port other header fields numbers to direct segment to appropriate socket application data (message) TCP/UDP segment format 10/14/2013 Transport Layer (SSL) 3-7 Connectionless demultiplexing  UDP socket identified by  IP datagrams from two tuple: two-tuple: different sources different sources directed to same UDP ( dest IP address, dest port number) socket  When host receives UDP segment:  directs UDP segment to socket with destination port k t ith d ti ti t number 10/14/2013 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/14/2013 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/14/2013 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/14/2013 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/14/2013 Transport Layer (SSL) 3-12 6

  7. UDP (more)  suitable for streaming multimedia applications  loss tolerant Advantages of UDP  rate sensitive  rate sensitive  no connection  other UDP uses, e.g. establishment (which can add delay)  DNS  simple: no connection state  SNMP at sender, receiver  reliable transfer over  no congestion control: UDP UDP? can blast away as fast as add reliability in y desired desired application layer  small segment header  application-specific error recovery 10/14/2013 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) field included)  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 UDP checksum nonetheless? More later field field ….  detail: pseudoheader consisting of protocol no., IP addresses, UDP length field (again) included in checksum calculation 10/14/2013 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 0 1 0 1 0 1 0 1 0 1 0 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 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/14/2013 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/14/2013 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!  characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt) 10/14/2013 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/14/2013 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/14/2013 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 layer 10/14/2013 Transport Layer (SSL) 3-20 10

  11. Stop-and-wait ARQ  Error-free operation Sender Time Receiver ack ack 10/14/2013 Transport Layer (SSL) 3-21 Stop-and-wait ARQ  Retransmission after timeout  Recovery from loss of frame timeout retransmission Sender Error Time Receiver ack 10/14/2013 Transport Layer (SSL) 3-22 11

Recommend


More recommend