0% found this document useful (0 votes)
364 views7 pages

Multiplexing Demultiplexing

This document outlines key topics in Chapter 3 of the Transport Layer, including: 1) Transport layer services like multiplexing and demultiplexing which involve gathering data from multiple sockets at the sending host and delivering segments to the correct socket at the receiving host based on port numbers and IP addresses. 2) Connectionless transport protocols like UDP which use a two-tuple of destination IP and port to direct segments to sockets, allowing segments from different source addresses to be directed to the same socket. 3) Connection-oriented transport like TCP which uses a four-tuple of source/destination IP and port numbers to uniquely identify each socket and allow servers to support many simultaneous connections.

Uploaded by

compengg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
364 views7 pages

Multiplexing Demultiplexing

This document outlines key topics in Chapter 3 of the Transport Layer, including: 1) Transport layer services like multiplexing and demultiplexing which involve gathering data from multiple sockets at the sending host and delivering segments to the correct socket at the receiving host based on port numbers and IP addresses. 2) Connectionless transport protocols like UDP which use a two-tuple of destination IP and port to direct segments to sockets, allowing segments from different source addresses to be directed to the same socket. 3) Connection-oriented transport like TCP which uses a four-tuple of source/destination IP and port numbers to uniquely identify each socket and allow servers to support many simultaneous connections.

Uploaded by

compengg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

Transport Layer

37

Multiplexing/demultiplexing
Multiplexing at send host:
gathering data from multiple
sockets, enveloping data with
header (later used for
demultiplexing)

Demultiplexing at rcv host:


delivering received segments
to correct socket
= socket
application
transport
network
link

= process
P3

P1
P1

application
transport
network

P2

P4

application
transport
network
link

link

physical

host 1

physical

host 2

physical

host 3
Transport Layer

38

How demultiplexing works


host receives IP datagrams

each datagram has source


IP address, destination IP
address
each datagram carries 1
transport-layer segment
each segment has source,
destination port number
(recall: well-known port
numbers for specific
applications)
host uses IP addresses & port
numbers to direct segment to
appropriate socket

32 bits
source port #

dest port #

other header fields

application
data
(message)
TCP/UDP segment format
Transport Layer

39

Connectionless demultiplexing
Create sockets with port

numbers:

DatagramSocketmySocket1=new
DatagramSocket(99111);
DatagramSocketmySocket2=new
DatagramSocket(99222);

UDP socket identified by

two-tuple:

(dest IP address, dest port number)

When host receives UDP

segment:

checks destination port


number in segment
directs UDP segment to
socket with that port
number

IP datagrams with

different source IP
addresses and/or source
port numbers directed to
same socket
Transport Layer

310

Connectionless demux (cont)


DatagramSocketserverSocket=newDatagramSocket(6428);
P3

client
IP: A

P1
P1

P3

SP: 6428

SP: 6428

DP: 9157

DP: 5775

SP: 9157

SP: 5775

DP: 6428

DP: 6428

server
IP: C

Client
IP:B

SP provides return address


Transport Layer

311

Connection-oriented demux
TCP socket identified by

4-tuple:

source IP address
source port number
dest IP address
dest port number

recv host uses all four

values to direct segment


to appropriate socket

Server host may support

many simultaneous TCP


sockets:

each socket identified by


its own 4-tuple

Web servers have

different sockets for each


connecting client

non-persistent HTTP will


have different socket for
each request

Transport Layer

312

Connection-oriented demux
(cont)
P3

P3

SP: 80
DP: 9157

client
IP: A

SP: 9157
DP: 80

P1
P1

P4

SP: 80
DP: 5775

server
IP: C

SP: 5775
DP: 80

Client
IP:B

Transport Layer

313

You might also like