skip to content
Hankyu Kim's blog

Packet header - multiplexing

/ 1 min read

Question

I understand that UDP communication has its own form of multiplexing, with segments characterized by the following structure: header, source port, destination port, length, and checksum.

However, in my application, I include additional headers within the payload itself, such as: header type, message type, payload size, and auxiliary data.

Does this mean the data is layered (multiplexed) twice?

Answer

Yes, what you’re describing involves adding an additional layer of structure to the data payload, which can be considered a form of multiplexing at the application level. This means you have two layers of multiplexing:

UDP Layer: This handles multiplexing at the transport layer using source port, destination port, etc. Application Layer: This handles multiplexing within the payload of the UDP segment using your custom headers like header type, message type, etc. This approach is quite common in network protocols where additional layers of headers are used to manage and interpret the data within the application context.