Вы находитесь на странице: 1из 7

Chapter 3 outline

❒ 3.1 Transport-layer ❒ 3.5 Connection-oriented


services transport: TCP
❒ 3.2 Multiplexing and ❍ segment structure
demultiplexing ❍ reliable data transfer
❒ 3.3 Connectionless ❍ flow control
transport: UDP ❍ connection management
❒ 3.4 Principles of reliable ❒ 3.6 Principles of
data transfer congestion control
❒ 3.7 TCP congestion control

Transport Layer 3­7


Multiplexing/demultiplexing
Demultiplexing at rcv host: Multiplexing at send host:
delivering received segments gathering data from multiple
to correct socket sockets, enveloping data with
header (later used for
demultiplexing)
= socket = process

P3 P1
P1 P2 P4 application
application application

transport transport transport

network network network

link link link

physical physical physical

host 2 host 3
host 1
Transport Layer 3­8
How demultiplexing works
❒ host receives IP datagrams
❍ each datagram has source 32 bits
IP address, destination IP
source port # dest port #
address
❍ each datagram carries 1
transport-layer segment other header fields
❍ each segment has source,
destination port number
(recall: well-known port application
numbers for specific data
applications) (message)
❒ host uses IP addresses & port
numbers to direct segment to
appropriate socket TCP/UDP segment format

Transport Layer 3­9


Connectionless demultiplexing
❒ When host receives UDP
❒ Create sockets with port
segment:
numbers:
DatagramSocket mySocket1 = new 
❍ checks destination port
DatagramSocket(99111); number in segment
DatagramSocket mySocket2 = new  ❍ directs UDP segment to
DatagramSocket(99222); socket with that port
❒ UDP socket identified by number
two-tuple: ❒ IP datagrams with
(dest IP address, dest port number) different source IP
addresses and/or source
port numbers directed to
same socket

Transport Layer 3­10


Connectionless demux (cont)
DatagramSocket serverSocket = new DatagramSocket(6428);

P3 P1
P1
P3

SP: 6428 SP: 6428


DP: 9157 DP: 5775

SP: 9157 SP: 5775


client DP: 6428 DP: 6428 Client
server
IP: A IP: C IP:B

SP provides “return address”

Transport Layer 3­11


Connection-oriented demux
❒ TCP socket identified by ❒ Server host may support
4-tuple: many simultaneous TCP
❍ source IP address sockets:
❍ source port number ❍ each socket identified by
❍ dest IP address its own 4-tuple
❍ dest port number ❒ Web servers have
❒ recv host uses all four different sockets for each
values to direct segment connecting client
to appropriate socket ❍ non-persistent HTTP will
have different socket for
each request

Transport Layer 3­12


Connection-oriented demux
(cont)

P3 P3 P4 P1
P1

SP: 80 SP: 80
DP: 9157 DP: 5775

SP: 9157 SP: 5775


client DP: 80 DP: 80 Client
server
IP: A IP: C IP:B

Transport Layer 3­13

Вам также может понравиться