Internet transport-layer protocols application ■reliable,in-order delivery (TCP) d3ta I physic network ·congestion control netwo data link data link physical physical ·flow control ca en ·connection setup network nd unreliable,unordered data link physical ransp delivery:UDP network data link hysical no-frills extension of network data link “best-effort”lP physical network transport data link network services not available: physical data link physical ·delay guarantees bandwidth guarantees Transport Layer3-6
Transport Layer3-6 Internet transport-layer protocols ▪ reliable, in-order delivery (TCP) • congestion control • flow control • connection setup ▪ unreliable, unordered delivery: UDP • no-frills extension of “best-effort” IP ▪ services not available: • delay guarantees • bandwidth guarantees application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical
Chapter 3 outline 3.I transport-layer services 3.5 connection-oriented 3.2 multiplexing and transport:TCP demultiplexing ·segment structure 3.3 connectionless transport: reliable data transfer UDP ·flow control 3.4 principles of reliable data connection management transfer 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer3-7
Transport Layer3-7 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP • segment structure • reliable data transfer • flow control • connection management 3.6 principles of congestion control 3.7 TCP congestion control
Multiplexing/demultiplexing multiplexing at sender: handle data trom multiple demultiplexing at receiver: sockets,add transport header use header into to deliver (later used for demultiplexing) received segments to correct socket application application P1 P2 application ☐h☐socket P3 P4 process transport transport network network link physical physical physical Transport Layer3-8
Transport Layer3-8 Multiplexing/demultiplexing process socket use header info to deliver received segments to correct socket handle data from multiple demultiplexing at receiver: sockets, add transport header (later used for demultiplexing) multiplexing at sender: transport application physical link network P1 P2 transport application physical link network P4 transport application physical link network P3
How demultiplexing works host receives IP datagrams 32 bits each datagram has source IP source port dest port address,destination IP address other header fields each datagram carries one transport-layer segment each segment has source, application destination port number data host uses IP addresses (payload) port numbers to direct segment to appropriate socket TCP/UDP segment format Transport Layer3-9
Transport Layer3-9 How demultiplexing works ▪ host receives IP datagrams • each datagram has source IP address, destination IP address • each datagram carries one transport-layer segment • each segment has source, destination port number ▪ host uses IP addresses & port numbers to direct segment to appropriate socket source port # dest port # 32 bits application data (payload) other header fields TCP/UDP segment format
Connectionless demultiplexing recall:created socket has recall:when creating host-local port # datagram to send into UDP DatagramSocket mySocketl socket,must specify new DatagramSocket(12534); destination IP address ·destination port# when host receives UDP IP datagrams with same segment: dest.port #but different checks destination port source IP addresses in segment and/or source port numbers will be directed directs UDP segment to to same socket at dest socket with that port Transport Layer3-10
Transport Layer3-10 Connectionless demultiplexing ▪ recall: created socket has host-local port #: DatagramSocket mySocket1 = new DatagramSocket(12534); ▪ when host receives UDP segment: • checks destination port # in segment • directs UDP segment to socket with that port # ▪ recall: when creating datagram to send into UDP socket, must specify • destination IP address • destination port # IP datagrams with same dest. port #, but different source IP addresses and/or source port numbers will be directed to same socket at dest