Multiplexing and Demultiplexing in Transport Layer

In this tutorial, you will learn the basic concepts of multiplexing and demultiplexing in the transport layer. After reading this tutorial, you will understand the types of multiplexing, the process of demultiplexing, and how these mechanisms work in the transport layer to manage data transmission between applications.

Contents:

  1. What is Multiplexing?
  2. Multiplexing Mechanism
  3. What is De-Multiplexing?
  4. De-Multiplexing Mechanism

What is Multiplexing?

Multiplexing is a mechanism in which multiple conversations are shared over a connection, a virtual circuit. Multiplexing is important in the transport layer.

  • If only one network address is available, all transport connections on that machine must use it for communication.
  • The transport layer receives the data from the application layer and converts it into segments, but the segment needs some way of telling it what process it will be used for. This condition is known as multiplexing.
  • Multiplexing enables different communication conversations to be interleaved on the same network.

Multiplexing Mechanism

Multiplexing mechanisms are used when a host has multiple network paths that it can use. Partitioning allows the transport layer to multiplex.

advertisement
advertisement

The diagram below explains the multiplexing system.

Multiplexing Mechanism
  • As shown in the figure, there are four different transport connections, and they use the same network to connect to the remote host.
  • Four transport connections are using the same host network as layer-3 to communicate with the remote host.
  • Here, many processes are running, and all the processes need to send packets to the remote host, but only one transport layer protocol is present. So, it is called a many-to-one relationship in which multiple devices point to a single device which is called multiplexing.

What is De-Multiplexing?

De-Multiplexing is the process used in the transport layer of computer networks to direct incoming data packets to the correct application process. It ensures that the data arriving at a host is passed to the appropriate application based on the information in the packet headers.

  • De-Multiplexing is a transport layer process that directs incoming data packets to the correct application process.
  • It uses port numbers to identify the receiving application.
  • Both TCP and UDP use de-multiplexing; TCP relies on a combination of IP addresses and port numbers, while UDP uses only port numbers.
  • The transport layer examines header information of incoming packets to determine the destination application.
  • In TCP, de-multiplexing identifies connections using a four-tuple: source IP, source port, destination IP, and destination port.
  • It allows multiple applications to run simultaneously on the same host by ensuring independent data delivery to each application.

De-Multiplexing Mechanism

In de-multiplexing, the process is reversed from that of multiplexing. It is used when more bandwidth or reliability is needed to send packets to the user. It split the traffic into multiple network paths based on a multiplexing round-robin algorithm.

The figure below explains the de-multiplexing mechanism.

advertisement
de-multiplexing mechanism
  • As shown in the figure, router-2 in layer 4 has heavy traffic, so the transport layer divides the traffic into multiple available routes, a process known as de-multiplexing.
  • Stream Control Transmission Protocol (SCTP) is an example of de-multiplexing or inverse multiplexing. SCTP is used when there is a need to drive a connection using multiple network interfaces.

Key Points to Remember

Here is the list of key points we need to remember about “Multiplexing and Demultiplexing”.

  • Multiplexing is a mechanism in which multiple conversations are shared over a connection, a virtual circuit. Multiplexing is important in the transport layer.
  • Multiplexing mechanisms are used when a host has multiple network paths that it can use. Partitioning allows the transport layer to multiplex.
  • De-multiplexing is used when more bandwidth or reliability is needed to send packets to the user. It split the traffic into multiple network paths based on a multiplexing round-robin algorithm.
  • De-Multiplexing in TCP uses a four-tuple to identify connections and allows multiple applications to run simultaneously.
  • Stream Control Transmission Protocol (SCTP) exemplifies de-multiplexing or inverse multiplexing, splitting traffic into multiple network paths.

advertisement

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.