Network Programming: Transport Layer Review PDF

Summary

This document is a presentation on network programming, focusing on the transport layer. It covers the overview of services, protocols, and actions within end systems. The presentation is aimed at undergraduate-level computer engineering students at the University of Sharjah. It discusses crucial concepts like multiplexing, demultiplexing, TCP, and UDP.

Full Transcript

Network Programming: Transport Layer Review Dr. Ala Altaweel University of Sharjah Department of Computer Engineering [email protected] 1 Transport layer: overview Our goal: § Refresh princi...

Network Programming: Transport Layer Review Dr. Ala Altaweel University of Sharjah Department of Computer Engineering [email protected] 1 Transport layer: overview Our goal: § Refresh principles behind § Refresh our knowledge about transport layer services: Internet transport layer multiplexing, protocols: demultiplexing UDP: connectionless transport reliable data transfer TCP: connection-oriented reliable flow control transport congestion control TCP congestion control Transport Layer: 3-2 Transport Layer Review: roadmap Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Transport Layer: 3-3 Transport services and protocols application transport § provide logical communication mobile network network data link physical between application processes national or global ISP running on different hosts lo g ica l en § transport protocols actions in end d -e systems: nd local or tra sender: breaks application messages regional ISP n sp into segments, passes to network layer o rt home network content receiver: reassembles segments into provider network messages, passes to application layer datacenter application transport network network § two transport protocols available to data link physical Internet applications enterprise network TCP, UDP Transport Layer: 3-4 Transport vs. network layer services and protocols §network layer: logical communication between hosts §transport layer: logical communication between processes relies on, enhances, network layer services Transport Layer: 3-5 Transport Layer Actions Sender: application § is passed an application- application app. msg layer message transport § determines segment TThhtransport app. msg header fields values network (IP) § creates segment network (IP) link § passes segment to IP link physical physical Transport Layer: 3-6 Transport Layer Actions Receiver: application § receives segment from IP application § checks header values app. msg transport § extracts application-layer transport message network (IP) network (IP) § demultiplexes message up link to application via socket link physical physical Th app. msg Transport Layer: 3-7 Two principal Internet transport protocols application transport § TCP: Transmission Control Protocol mobile network network data link physical reliable, in-order delivery national or global ISP lo g congestion control ica flow control l en d -e connection setup nd local or § UDP: User Datagram Protocol tra regional ISP n sp unreliable, unordered delivery o rt home network content provider no-frills extension of “best-effort” IP network datacenter application network § services not available: transport network data link delay guarantees physical bandwidth guarantees enterprise network Transport Layer: 3-8 Transport Layer Review: roadmap Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP Principles of reliable data transfer Connection-oriented transport: TCP Transport Layer: 3-9 HTTP server client application application HTTP msg transport transport network transport network link network link physical link physical physical Transport Layer: 3-10 HTTP server client application application HTTP msg transport Ht HTTP msg transport network transport network link network link physical link physical physical Transport Layer: 3-11 HTTP server client application application HTTP msg transport Ht HTTP msg Hnnetwork Ht HTTP msg transport transport network link network link physical link physical physical Transport Layer: 3-12 HTTP server client application application transport transport network transport network link network link physical link physical physical Hn Ht HTTP msg Transport Layer: 3-13 HTTP server client1 client2 application P-client1 P-client2 application transport transport network transport network link network link physical link physical physical Transport Layer: 3-14 Multiplexing/demultiplexing multiplexing at sender: demultiplexing at receiver: handle data from multiple use header info to deliver sockets, add transport header received segments to correct (later used for demultiplexing) socket application application P1 P2 application socket P3 transport P4 process transport network transport network link network link physical link physical physical Transport Layer: 3-15 How demultiplexing works § host receives IP datagrams 32 bits each datagram has source IP source port # dest port # address, destination IP address each datagram carries one other header fields transport-layer segment each segment has source, application destination port number data § host uses IP addresses & port (payload) numbers to direct segment to appropriate socket TCP/UDP segment format Transport Layer: 3-16 Connectionless demultiplexing Recall: when receiving host receives § when creating socket, must UDP segment: checks destination port # in specify host-local port #: segment DatagramSocket mySocket1 directs UDP segment to = new DatagramSocket(12534); socket with that port # § when creating datagram to send into UDP socket, must specify IP/UDP datagrams with same dest. port #, but different source IP destination IP address addresses and/or source port destination port # numbers will be directed to same socket at receiving host Transport Layer: 3-17 Connectionless demultiplexing: an example DatagramSocket serverSocket = new DatagramSocket DatagramSocket mySocket2 = DatagramSocket mySocket1 = new DatagramSocket (6428); new DatagramSocket (5775); (9157); application application application P1 P3 P4 transport transport transport network network link network link physical link physical physical source port: 6428 source port: ? dest port: 9157 dest port: ? source port: 9157 source port: ? dest port: 6428 dest port: ? Transport Layer: 3-18 Connection-oriented demultiplexing § TCP socket identified by § server may support many 4-tuple: simultaneous TCP sockets: source IP address each socket identified by its source port number own 4-tuple dest IP address each socket associated with dest port number a different connecting client § demux: receiver uses all four values (4-tuple) to direct segment to appropriate socket Transport Layer: 3-19 Connection-oriented demultiplexing: example application application P4 P5 P6 application P1 P2 P3 transport transport transport network network link network link physical link physical server: IP physical address B host: IP source IP,port: B,80 host: IP address A dest IP,port: A,9157 source IP,port: C,5775 address C dest IP,port: B,80 source IP,port: A,9157 dest IP, port: B,80 source IP,port: C,9157 dest IP,port: B,80 Three segments, all destined to IP address: B, dest port: 80 are demultiplexed to different sockets Transport Layer: 3-20 Summary § Multiplexing, demultiplexing: based on segment, datagram header field values § UDP: demultiplexing using destination port number (only) § TCP: demultiplexing using 4-tuple: source and destination IP addresses, and port numbers § Multiplexing/demultiplexing happen at all layers Transport Layer: 3-21

Use Quizgecko on...
Browser
Browser