comp 431 the transport layer internet services protocols
play

COMP 431 The Transport Layer Internet Services & Protocols - PowerPoint PPT Presentation

COMP 431 The Transport Layer Internet Services & Protocols Transport services and protocols application Transport protocols: transport Provide logical communication The Transport Layer network between application processes data


  1. COMP 431 The Transport Layer Internet Services & Protocols Transport services and protocols application ◆ Transport protocols: transport » Provide logical communication The Transport Layer network between application processes data link network running on different hosts physical Multiplexing, Error Detection, & UDP data link » Execute on the end systems physical (and not in the network) home network network data link Jasleen Kaur Logical ◆ Transport v . network physical end-to-end regional ISP layer services: transport » Network layer: data transfer February 18, 2020 between end systems » Transport layer: data transfer between processes ❖ Relies on, and enhances, application network layer services Institutional transport network network data link physical 1 2

  2. Transport Layer Protocols Transport Layer Protocols & Services Internet transport services Outline ◆ TCP: Reliable, in-order, unicast application application ◆ Fundamental transport layer transport transport delivery network services network » Congestion control data link data link » Flow control network network » Multiplexing/Demultiplexing physical physical data link data link » Connection setup » Error detection physical physical home home » Reliable data delivery network network network network ◆ UDP: Unreliable, unordered » Pipelining data link data link ( “ best-effort ” ), unicast or Logical Logical physical » Flow control physical end-to-end end-to-end multicast delivery regional ISP regional ISP transport transport » Congestion control » (Minimal) error detection ◆ Service implementation in ◆ Services not available: Internet transport protocols » Performance guarantees » UDP ❖ No guarantees of available bandwidth application » TCP application ❖ No guarantees of end-to-end delay Institutional Institutional transport transport network network » Other (non-unicast) delivery models network network ❖ Multicast (reliable v . unreliable) data link data link ❖ Anycast physical physical 3 4

  3. Fundamental Transport Layer Services Multiplexing/Demultiplexing Multiplexing/Demultiplexing Review: Protocol layering in the Internet ◆ Each end-system has a single protocol “ stack ” Source Destination » The stack is shared between all applications using the network application application M M Message transport transport H trans M H trans M Segment ◆ Multiplexing is the process of Process Process allowing multiple applications to use 1 2 network network H net H trans M H net H trans M Datagram the network simultaneously M2 M1 link link H link H net H trans H link H net H trans Frame » (T o send data into the network M M application concurrently) physical physical transport network ◆ Demultiplexing is the process of ◆ At the sender, each layer takes data from above delivering received data to the » May subdivide into multiple data units at sending layer appropriate application » Adds header information to create new data unit » Passes new data unit to layer below M2 M1 ◆ The process is reversed at the receiver 5 6

  4. Multiplexing/Demultiplexing Multiplexing/Demultiplexing Multiplexing Demultiplexing P3 P4 M M ◆ Gathering data from multiple Application-layer data 32 bits application processes, enveloping P1 P2 application source port # dest. port # Segment header data with header (later used for M transport M (has port #) protocol specific demultiplexing) network application application header fields H trans M Segment transport transport ◆ Based on IP addresses and sender network network H net segment Datagram and receiver port numbers application data » Source and destination port numbers Datagram header carried in each segment (message “ payload ” ) (has IP addr) Sender 1 Receiver Sender 2 » (Recall: well-known port numbers for specific applications) ◆ Demultiplexing is the process of delivering received segments to the correct application-layer process » IP address (in network-layer datagram header) identifies the receiving TCP/UDP segment format machine » Port number (in transport-layer segment header) identifies the receiving process 7 8

  5. Multiplexing/Demultiplexing Multiplexing/Demultiplexing Transport protocol specific demultiplexing Examples Web client dest. IP: B Host C ◆ Demultiplexing actions depend on whether the transport layer is DNS dest. port: 53 connectionless (UDP) or connection-oriented (TCP) Server B Host A ◆ UDP demultiplexes segments to the socket source IP: C source IP: C dest. IP: A » UDP uses 2-tuple dest IP: B dest IP: B dest. port: x < destination IP addr , destination port nbr > source port: y source port: x to identify the socket dest. port: 80 dest. port: 80 » Socket is “ owned ” by some process (allocated by OS). DNS server port use (UDP) ◆ TCP demultiplexes segments to the connection source IP: A » TCP uses 4-tuple dest IP: B Web client < source IP addr , source port nbr , destination IP addr , destination port nbr > Web Host A source port: x to the identify connection Server B dest. port: 80 » Connection (and its socket) is owned by some process Web server port use (TCP) 9 10

  6. Fundamental Transport Layer Services Internet Transport Protocols User Datagram Protocol (UDP) [RFC 768] “Best Effort” Delivery ◆ No frills, “ bare bones ” Internet ◆ Goal: Provide error detection and multiplexing but no delivery 32 bits transport protocol guarantees source port # dest. port # » The characteristics of the underlying network layer will determine the length checksum ◆ Best effort service — UDP reliability of data delivery segments may be: Sending Receiving » Lost Process Process Application » Delivered out of order to the Layer application data application data data (message payload) » Delivered multiple times to the Transport application UDP UDP Layer Unreliable Channel protocol protocol (Sending Side) (Receiving Side) ◆ “ Connectionless ” UDP segment format segment segment » No handshaking between UDP sender, receiver Network Length field is length in » Each UDP segment handled Layer Unreliable Channel independently of others bytes, of UDP segment (including header) 11 12

  7. User Datagram Protocol (UDP) User Datagram Protocol (UDP) Checksum computation Is unreliable, unordered communications useful? 32 bits ◆ The UDP checksum allows the ◆ Who uses UDP? Why use UDP? source port # dest. port # receiver to detect errors in » Often used for streaming ◆ No connection establishment length checksum multimedia applications transmitted segment (which can add delay) » Loss tolerant » Errors are “ flipped ” bits ◆ Simple: no connection state at » Rate sensitive sender, receiver application data ◆ Small segment header ◆ Other UDP uses (why?): ◆ Sender computation: (message payload) ◆ No congestion control: UDP » DNS » Treat segment contents as a sequence can blast away as fast as desired » SNMP of 16-bit integers » Routing protocols » Sum the segment’s contents, place the UDP segment format 1’s complement of the sum into the checksum field ◆ Reliable transfer over UDP still possible “ Theorem: ” » Reliability can always be added at the application layer segment sum + checksum = ◆ Example: » (Application-specific error recovery) 1111111111111111 » Sum of segment = 1010101110011011 » Checksum = 0101010001100100 13 14

  8. User Datagram Protocol (UDP) Checksum computation 32 bits ◆ Receiver computation: source port # dest. port # » Compute checksum of received length checksum segment (including received checksum) » Compare value to all 1 ’ s » If equal — No error detected, segment application data “ OK ” (message payload) » If not equal —Error detected, now what?! ❖ Retransmit? UDP segment format ❖ Discard? “ Theorem: ” ❖ Deliver? segment sum + checksum = 1111111111111111 15

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