globe with lights
Wed Apr 05

Breaking Down the TCP/IP Model: What You Need to Know

Computer networking is an essential part of our daily lives, and understanding how it works is crucial for anyone working in the field. There are two main models that every computer networking professional needs to know about: the OSI model and the TCP/IP model. Serving as the basis of modern networking, TCP/IP model is very similar to OSI model. Instead of using seven abstraction layers, it only consists of four layers. So, why does it become significant?

What is the TCP/IP model?

TCP/IP, also referred to as the Internet Protocol Suite, is a widely used framework for organizing communication protocols that are utilized in internet communication. Similar to the OSI model, the TCP/IP model serves as an abstraction layer for classifying and organizing all protocols involved in end-to-end communication.

History of TCP/IP model

While writing this article, my first thought was, why do I need to learn this while another very similar one exists? Do we really need both? The question led me to the history of why TCP/IP and OSI models were originally created.

The Internet protocol suite, which is the basis for TCP/IP, was developed in the late 1960s and early 1970s as part of research sponsored by the Defense Advanced Research Projects Agency (DARPA). The TCP/IP model was developed from this research and was officially adopted as the standard for all military computer networking in March 1982. The OSI model, developed in the 1980s by the International Organization for Standardization (ISO), aimed to provide a framework for interoperability between different systems and devices. This is the reason why we have both models as they were developed by different organizations. However, both models have their strengths and weaknesses, and they complement each other.

Difference between OSI model and TCP/IP model

To some extent, OSI can be seen as theoretical while TCP/IP is a more practical use to explain how end-to-end communication works. The OSI model is a theoretical framework that describes how network communication should work, whereas the TCP/IP model is an actual implementation that is used in real- world situations.

Despite the difference, the network stacks between the two overlap and comparing both models, they are fundamentally the same thing. At the same time, the OSI model is easier to digest to learn about networking, while the TCP/IP model has more tangible purpose. Thus, both have equal importance.

Here is the matchup between the two models.

OSI ModelTCP/IP Model
ApplicationApplication

Presentation
Session
Transport| Transport
Network| Internet
Data Link| Link
Physical|

The robustness principle

The protocols at every layer have the same general rule that has significant impact in robustness, summarized as “Be liberal in what you accept, and conservative in what you send”. The principle assumes that the malicious entities out there are always trying to send harmful packets. Taking this as a foothold, this is critical to design a network which is protective enough to prevent any kind of harmful attacks. Yet, it has to be adaptable to change especially when dealing with protocol specifications due to the nature of the continuing internet evolution. Additionally, it is recommended to stick to simple and obvious protocol features and be cautious of misbehaving hosts that could cause disruption.

TCP/IP model layers

Application

The TCP/IP model, although highly significant in modern networking, has certain limitations that are worth noting. Unlike other models, such as the OSI model, TCP/IP does not include formatting through encryption or compression, nor does it consider session maintenance between two or more computers as part of its layers.

The reason for this omission is that both encryption and compression are typically implemented through libraries and API, rather than as part of the TCP/IP model itself. Similarly, session maintenance is generally managed at the application layer, making it less relevant to the overall structure of the TCP/IP model.

Application layer in TCP/IP model is often referred to the application that provides service to the users. It distinguishes two categories of application layer, user protocols and support protocols. The user protocols serve the actual service to users, while support protocols provide common system functions. Some common protocols categorized as user protocols are FTP and Telnet, and as support protocols are DNS and SNMP.

Protocols: HTTP, SMTP, DHCP, FTP, DNS, LDAP, Telnet, and more..

Transport

The transport layer helps different computer applications communicate with each other by creating channels for sending and receiving data. The way that the transport layer maintains the connectivity is categorized into two, TCP (connection-oriented) and UDP (connectionless). This layer can also provide features like controlling errors, segmentation, controlling the flow of data, and managing congestion. It also uses “port numbers” to send data to the right application.

TCP is a connection-oriented protocol that provides reliable transmission of data. This means that it detects if any data is lost or damaged during transmission by verifying each segment, and if it does, it automatically retransmits it until the destination receives the complete and error-free data. This ensures that the data is delivered without any errors or loss and guarantees the integrity of the communication. The UDP can’t do this, thus referred to as unreliable (see more detailed information here).

Protocols: TCP, UDP, QUIC, RSVP, and more..

Internet

The internet layer is responsible for sending packets across multiple networks, making internetworking possible. It does this by forwarding the datagrams to the next router that will help the datagram reach its destination. The Internet Protocol is the main component of the internet layer for identifying network hosts by utilizing two addressing systems, IPv4 (32-bit IP addresses) that is only capable of identifying approximately four billion hosts, and the IPv6 (128-bit addresses) that was developed to eliminates the limitation of IPv4.

Protocols: IPv4, IPv6, ICMP, IGMP, IPsec, and more..

The functions of the link layer in the TCP/IP model are equivalent to those found in Layer 2 of the OSI model. It is responsible for moving packets between two hosts on the same link which include framing and preparing internet layer packet transmission. The TCP/IP model provides guidelines for converting the network addressing techniques utilized in the Internet Protocol into link-layer addresses, such as media access control (MAC) addresses. Nevertheless, all other components below this layer are presumed to exist and are not explicitly described in the TCP/IP model.

Protocols: MAC, PPP, Tunnels, and more..

Conclusion

You can find a lot of technical details about TCP/IP model in RFC 1122. It describes how the data is transmitted over the internet in a more practical manner. The TCP/IP model also explains how all four different layers collaborate for ensuring successful data transmission across the networks. In contrast to the OSI model, which is more theoretical and often used for educational purposes, the TCP/IP model provides a practical and widely implemented standard for networking protocols and architectures.