TCP/IP Reference Model with Diagram

The TCP/IP protocol architecture involves a set of protocols that allow communication across multiple diverse networks. The TCP/IP network architecture consists of four layers:
1. Application Layer: The application layer provides services that can be used by other applications. This layer incorporates the function of top three OSI layers.
2. Transport Layer: The application layer programs are intended to run directly over the transport layer. Two basic services are offered in the transport layer:
i. Transmission Control Protocol (TCP)
ii. User Datagram Protocol (UDP)

3. Internet Layer: This layer resembles the network layer of OSI reference model. It handles the transfer of information across multiple networks through the use of a gateway or router. It deals with the routing of packets across the networks as well as with the congestion control The key aspect of this layer is the definition of globally unique address for the machines that are connected to the Internet.
Internet Layer provides best-effort connectionless packet transfer. As the service is connectionless, so data packets or so-called datagrams are routed independently and it may traverse different paths. This system is robust as the datagram can avoid the point of failure within a network. The gateway that interconnects two networks may discard and IP packet. If congestion occurs, it is the responsibility of the transport layer to recover the lost packets.

4. Network Interface Layer: This layer is concerned with the network-specific aspects of the transfer of packets. It encapsulates the IP packets into a frame of the underlying network. When a packet reaches a gateway or a router, the network interface layer decapsulates the IP packet and sends it to the Internet layer.
The Internet Layer, in turn, analyzes it to get some information like source address, destination address etc and then sends the IP packet again to the network interface layer to encapsulate it to form a frame suitable for the next underlying network. This layer then forms the final frame and then transmits it through the medium towards the destination.