Sub topic 1
Where the Transport and Application Layers Sit
Prerequisites
This chapter assumes that you know the layered network model, encapsulation, IP addresses, bandwidth, latency, propagation delay, transmission delay, and round-trip time (RTT). You should also be comfortable with powers of two and basic Python or C syntax.
A network application usually does not send electrical or radio signals directly. It uses layers. Each layer provides a service to the layer above it and uses the service below it.
The application layer contains protocols that define meaning for users and programs. HTTP defines web messages, DNS defines name lookups, and SMTP defines email transfer. The application layer decides what data means.
The transport layer provides communication between processes running on different hosts. It uses port numbers to identify processes. TCP and UDP are the main transport protocols studied in GATE CS.
The network layer delivers packets between hosts using IP addresses. The transport layer delivers data between processes using ports. For example, an HTTP server might listen at IP address 192.0.2.10 and TCP port 80.
Encapsulation
When an application sends data, each lower layer adds its own control information. This process is called encapsulation.
At the receiver, the reverse process is called decapsulation. The link layer removes its header, the network layer examines the IP header, and the transport layer delivers the payload to the correct port.
| Layer | Main identity or unit | Main responsibility |
|---|---|---|
| Application | Message | Defines application meaning |
| Transport | Segment or datagram, port | Process-to-process delivery |
| Network | Packet, IP address | Host-to-host delivery |
| Link | Frame, local address | Delivery across one link |
A TCP segment is carried inside an IP packet. The IP packet is carried inside a link-layer frame. HTTP data is therefore not “sent by HTTP alone”; it travels through several cooperating protocols.
Transport Service Choices
TCP provides a connection-oriented, reliable byte stream. It uses acknowledgements, sequence numbers, retransmissions, flow control, and congestion control. These mechanisms add overhead but handle loss and reordering.
UDP provides a connectionless datagram service. It preserves message boundaries but does not guarantee delivery, ordering, or duplicate suppression. Applications that use UDP must tolerate loss or implement needed reliability themselves.
A common error is to confuse flow control with congestion control. Flow control protects a slow receiver. Congestion control protects the network from excessive traffic. Both can limit a TCP sender, so the effective sending window is commonly modeled as:
min(receiver window, congestion window)
Layering in Problem Solving
For a GATE question, first identify the layer involved. A question about HTTP methods concerns the application layer. A question about TCP acknowledgements concerns the transport layer. A question about IP forwarding concerns the network layer.
Then check the direction of the claim. TCP can provide reliable delivery between endpoints, but it cannot guarantee that an application has processed the data. Similarly, IP can route packets, but it does not guarantee delivery.
Exercise
A web browser sends an HTTP request to a server. Which layer identifies the server process, and which value performs that identification?
Show answer
The transport layer identifies the server process using a port number, such as TCP port 80 or 443.