1

I have just started learning about the different layers of the Internet. As I understand it, the Transport layer is responsible for extending the Network layer's host-to-host delivery service to process-to-process delivery by multiplexing application messages from host processes to the network edge and demultiplexing network datagrams from the network edge to the appropriate processes.

Conceptually, why do we need the Transport layer at all? Can't the host processes take responsibility for multiplexing segments, and the network edge can be responsible for demultiplexing them once they reach the correct host?

My thinking is that, by providing a Transport layer, we can have a "separation of concerns" between creating a message, delivering it to the network, and then delivering it to the appropriate host, but I'm not sure if this is a partial/whole answer. Any clarification would be much appreciated!

Note: I read this post that asks a similar question, and the answer is that it having a Transport layer which implements a protocol that guarantees reliability etc. simplifies applications at Layer 5, but I'm more concerned with the Transport layer overall, regardless of the protocol that's being run on it.

1

It really depends on which layer-3 protocol you are using. IP, itself, allows up to 256 different processes to attach to it, and some of those processes are used by IP itself (e.g. ICMP). This is rather limiting.

Adding layer-4 allows a layer-4 to define a way to have more processes to attach to the network stack. For example, TCP and UDP have up to 65536 addresses (ports) each, to which processes may attach. Other layer-4 protocols can allow more, or less, processes to attach. You can also have different layer-4 protocols, which serve different purposes, (e.g. connection-oriented, connectionless, custom for a specific purpose, etc.).

You can certainly let an application multiplex for itself. You can do this with TCP or UDP, for example, HTTP servers multiplex requests which come into TCP port 80. When an application does this, it needs to provide for its own protocol (e.g. HTTP).

Layer-4 on one host talks to layer-4 on another host, and delivers datagrams between applications. Layer-3 is concerned with delivering packets between networks, and layer-2 is concerned with delivering frames on a LAN.

  • Thanks! Would you mind clarifying why IP is restricted to 256 processes (and TCP/UDP are restricted to 65,536)? How did you get those numbers? – thomassawyer Apr 8 '16 at 18:04
  • The IPv4 header has an 8-bit (256 different values) Protocol field. Protocols register to that, and any packets coming into IP at layer-3 have the packet payload sent to the protocol registered with that address. TCP and UDP headers have 16-bit (65,536 different values) Destination Port fields. Applications register to the layer-4 protocol to receive traffic from a port, and the payloads of the datagrams with that destination port are sent to the registered application. Other layer-4 protocols may do it differently. – Ron Maupin Apr 8 '16 at 18:36
  • @llama, with a single address, it becomes difficult to provide different types of services. For instance, does everything need to use a connection-oriented protocol, like TCP? That would not be good for real-time traffic like VoIP. If we only have a connection-less protocol, like UDP, then web servers wouldn't work well. Having a separate, independent layer-4 gives you much more flexibility. There was a need for a connection-oriented protocol, so TCP was added. There may a different need in the future that some future protocol can be added to fill. – Ron Maupin Apr 8 '16 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.