The Wayback Machine - https://web.archive.org/web/20241004090246/https://www.geeksforgeeks.org/TCP-IP-MODEL/
Open In App

TCP/IP Model

Last Updated : 05 Aug, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The TCP/IP model is a fundamental framework for computer networking. It stands for Transmission Control Protocol/Internet Protocol, which are the core protocols of the Internet. This model defines how data is transmitted over networks, ensuring reliable communication between devices. It consists of four layers: the Link Layer, the Internet Layer, the Transport Layer, and the Application Layer. Each layer has specific functions that help manage different aspects of network communication, making it essential for understanding and working with modern networks.

TCP/IP was designed and developed by the Department of Defense (DoD) in the 1960s and is based on standard protocols. The TCP/IP model is a concise version of the OSI model. It contains four layers, unlike the seven layers in the OSI model. In this article, we are going to discuss the TCP/IP model in detail.

TCP/IP model was developed alongside the creation of the ARPANET, which later became the foundation of the modern internet. It was designed with a focus on the practical aspects of networking at the time. The lower-level hardware details and physical transmission medium were largely abstracted away in favor of higher-level networking protocols.

What Does TCP/IP Do?

The main work of TCP/IP is to transfer the data of a computer from one device to another. The main condition of this process is to make data reliable and accurate so that the receiver will receive the same information which is sent by the sender. To ensure that, each message reaches its final destination accurately, the TCP/IP model divides its data into packets and combines them at the other end, which helps in maintaining the accuracy of the data while transferring from one end to another end. The TCP/IP model is used in the context of the real-world internet, where a wide range of physical media and network technologies are in use. Rather than specifying a particular Physical Layer, the TCP/IP model allows for flexibility in adapting to different physical implementations.

Difference Between TCP and IP

Feature TCP (Transmission Control Protocol) IP (Internet Protocol)
Purpose Ensures reliable, ordered, and error-checked delivery of data between applications. Provides addressing and routing of packets across networks.
Type Connection-oriented Connectionless
Function Manages data transmission between devices, ensuring data integrity and order. Routes packets of data from the source to the destination based on IP addresses.
Error Handling Yes, includes error checking and recovery mechanisms. No, IP itself does not handle errors; relies on upper-layer protocols like TCP.
Flow Control Yes, includes flow control mechanisms. No
Congestion Control Yes, manages network congestion. No
Data Segmentation Breaks data into smaller packets and reassembles them at the destination. Breaks data into packets but does not handle reassembly.
Header Size Larger, 20-60 bytes Smaller, typically 20 bytes
Reliability Provides reliable data transfer Does not guarantee delivery, reliability, or order.
Transmission Acknowledgment Yes, acknowledges receipt of data packets. No

How Does the TCP/IP Model Work?

Whenever we want to send something over the internet using the TCP/IP Model, the TCP/IP Model divides the data into packets at the sender’s end and the same packets have to be recombined at the receiver’s end to form the same data, and this thing happens to maintain the accuracy of the data. TCP/IP model divides the data into a 4-layer procedure, where the data first go into this layer in one order and again in reverse order to get organized in the same way at the receiver’s end.

For more, you can refer to TCP/IP in Computer Networking.

Layers of TCP/IP Model

The diagrammatic comparison of the TCP/IP and OSI model is as follows:

TCP/IP and OSI

TCP/IP and OSI

1. Network Access Layer

It is a group of applications requiring network communications. This layer is responsible for generating the data and requesting connections. It acts on behalf of the sender and the Network Access layer on the behalf of the receiver. During this article, we will be talking on the behalf of the receiver.

The packet’s network protocol type, in this case, TCP/IP, is identified by network access layer. Error prevention and “framing” are also provided by this layer. Point-to-Point Protocol (PPP) framing and Ethernet IEEE 802.2 framing are two examples of data-link layer protocols.

2. Internet or Network Layer

This layer parallels the functions of OSI’s Network layer. It defines the protocols which are responsible for the logical transmission of data over the entire network. The main protocols residing at this layer are as follows:

  • IP: IP stands for Internet Protocol and it is responsible for delivering packets from the source host to the destination host by looking at the IP addresses in the packet headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most websites are using currently. But IPv6 is growing as the number of IPv4 addresses is limited in number when compared to the number of users.
  • ICMP: ICMP stands for Internet Control Message Protocol. It is encapsulated within IP datagrams and is responsible for providing hosts with information about network problems.
  • ARP: ARP stands for Address Resolution Protocol. Its job is to find the hardware address of a host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP, and Inverse ARP.

The Internet Layer is a layer in the Internet Protocol (IP) suite, which is the set of protocols that define the Internet. The Internet Layer is responsible for routing packets of data from one device to another across a network. It does this by assigning each device a unique IP address, which is used to identify the device and determine the route that packets should take to reach it.

Example: Imagine that you are using a computer to send an email to a friend. When you click “send,” the email is broken down into smaller packets of data, which are then sent to the Internet Layer for routing. The Internet Layer assigns an IP address to each packet and uses routing tables to determine the best route for the packet to take to reach its destination. The packet is then forwarded to the next hop on its route until it reaches its destination. When all of the packets have been delivered, your friend’s computer can reassemble them into the original email message.

In this example, the Internet Layer plays a crucial role in delivering the email from your computer to your friend’s computer. It uses IP addresses and routing tables to determine the best route for the packets to take, and it ensures that the packets are delivered to the correct destination. Without the Internet Layer, it would not be possible to send data across the Internet.

3. Transport Layer

The TCP/IP transport layer protocols exchange data receipt acknowledgments and retransmit missing packets to ensure that packets arrive in order and without error. End-to-end communication is referred to as such. Transmission Control Protocol (TCP) and User Datagram Protocol are transport layer protocols at this level (UDP).

  • TCP: Applications can interact with one another using TCP as though they were physically connected by a circuit. TCP transmits data in a way that resembles character-by-character transmission rather than separate packets. A starting point that establishes the connection, the whole transmission in byte order, and an ending point that closes the connection make up this transmission.
  • UDP: The datagram delivery service is provided by UDP, the other transport layer protocol. Connections between receiving and sending hosts are not verified by UDP. Applications that transport little amounts of data use UDP rather than TCP because it eliminates the processes of establishing and validating connections.

4. Application Layer

This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-end communication and error-free delivery of data. It shields the upper-layer applications from the complexities of data. The three main protocols present in this layer are:

  • HTTP and HTTPS: HTTP stands for Hypertext transfer protocol. It is used by the World Wide Web to manage communications between web browsers and servers. HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL(Secure Socket Layer). It is efficient in cases where the browser needs to fill out forms, sign in, authenticate, and carry out bank transactions.
  • SSH: SSH stands for Secure Shell. It is a terminal emulations software similar to Telnet. The reason SSH is preferred is because of its ability to maintain the encrypted connection. It sets up a secure session over a TCP/IP connection.
  • NTP: NTP stands for Network Time Protocol. It is used to synchronize the clocks on our computer to one standard time source. It is very useful in situations like bank transactions. Assume the following situation without the presence of NTP. Suppose you carry out a transaction, where your computer reads the time at 2:30 PM while the server records it at 2:28 PM. The server can crash very badly if it’s out of sync.

The host-to-host layer is a layer in the OSI (Open Systems Interconnection) model that is responsible for providing communication between hosts (computers or other devices) on a network. It is also known as the transport layer.

Some common use cases for the host-to-host layer include:

  • Reliable Data Transfer: The host-to-host layer ensures that data is transferred reliably between hosts by using techniques like error correction and flow control. For example, if a packet of data is lost during transmission, the host-to-host layer can request that the packet be retransmitted to ensure that all data is received correctly.
  • Segmentation and Reassembly: The host-to-host layer is responsible for breaking up large blocks of data into smaller segments that can be transmitted over the network, and then reassembling the data at the destination. This allows data to be transmitted more efficiently and helps to avoid overloading the network.
  • Multiplexing and Demultiplexing: The host-to-host layer is responsible for multiplexing data from multiple sources onto a single network connection, and then demultiplexing the data at the destination. This allows multiple devices to share the same network connection and helps to improve the utilization of the network.
  • End-to-End Communication: The host-to-host layer provides a connection-oriented service that allows hosts to communicate with each other end-to-end, without the need for intermediate devices to be involved in the communication.

Example: Consider a network with two hosts, A and B. Host A wants to send a file to host B. The host-to-host layer in host A will break the file into smaller segments, add error correction and flow control information, and then transmit the segments over the network to host B. The host-to-host layer in host B will receive the segments, check for errors, and reassemble the file. Once the file has been transferred successfully, the host-to-host layer in host B will acknowledge receipt of the file to host A.

In this example, the host-to-host layer is responsible for providing a reliable connection between host A and host B, breaking the file into smaller segments, and reassembling the segments at the destination. It is also responsible for multiplexing and demultiplexing the data and providing end-to-end communication between the two hosts.

Why TCP/IP Model Does Not Have Physical Layer

The physical layer is not covered by the TCP/IP model because the data link layer is considered the point at which the interface occurs between the TCP/IP stock and the underlying network hardware. Also, it is designed to be independent of the underlying physical media. This allows TCP/IP to be flexible and adaptable to different types of physical connections, such as Ethernet, Wi-Fi, fiber optics, or even older technologies like dial-up modems. The physical layer is typically handled by hardware components and standards specific to the physical medium being used, like Ethernet cables or radio waves for Wi-Fi.

Other Common Internet Protocols

TCP/IP Model covers many Internet Protocols. The main rule of these Internet Protocols is how the data is validated and sent over the Internet. Some Common Internet Protocols include:

  • HTTP (Hypertext Transfer Protocol): HTTP takes care of Web Browsers and Websites. 
  • FTP (File Transfer Protocol): FTP takes care of how the file is to be sent over the Internet.
  • SMTP (Simple Mail Transfer Protocol): SMTP is used to send and receive data.

Difference between TCP/IP and OSI Model

TCP/IP OSI
TCP refers to Transmission Control Protocol. OSI refers to Open Systems Interconnection.
TCP/IP uses both the session and presentation layer in the application layer itself. OSI uses different session and presentation layers.
TCP/IP follows connectionless a horizontal approach. OSI follows a vertical approach.
The Transport layer in TCP/IP does not provide assurance delivery of packets. In the OSI model, the transport layer provides assurance delivery of packets.
Protocols cannot be replaced easily in TCP/IP model. While in the OSI model, Protocols are better covered and are easy to replace with the technology change.
TCP/IP model network layer only provides connectionless (IP) services. The transport layer (TCP) provides connections. Connectionless and connection-oriented services are provided by the network layer in the OSI model.

Advantages of TCP/IP Model

  • Interoperability: The TCP/IP model allows different types of computers and networks to communicate with each other, promoting compatibility and cooperation among diverse systems.
  • Scalability: TCP/IP is highly scalable, making it suitable for both small and large networks, from local area networks (LANs) to wide area networks (WANs) like the internet.
  • Standardization: It is based on open standards and protocols, ensuring that different devices and software can work together without compatibility issues.
  • Flexibility: The model supports various routing protocols, data types, and communication methods, making it adaptable to different networking needs.
  • Reliability: TCP/IP includes error-checking and retransmission features that ensure reliable data transfer, even over long distances and through various network conditions.

Disadvantages of TCP/IP Model

  • Complex Configuration: Setting up and managing a TCP/IP network can be complex, especially for large networks with many devices. This complexity can lead to configuration errors.
  • Security Concerns: TCP/IP was not originally designed with security in mind. While there are now many security protocols available (such as SSL/TLS), they have been added on top of the basic TCP/IP model, which can lead to vulnerabilities.
  • Inefficiency for Small Networks: For very small networks, the overhead and complexity of the TCP/IP model may be unnecessary and inefficient compared to simpler networking protocols.
  • Limited by Address Space: Although IPv6 addresses this issue, the older IPv4 system has a limited address space, which can lead to issues with address exhaustion in larger networks.
  • Data Overhead: TCP, the transport protocol, includes a significant amount of overhead to ensure reliable transmission. This can reduce efficiency, especially for small data packets or in networks where speed is crucial.

Conclusion

In conclusion, the TCP/IP model is the backbone of modern internet communication, allowing different devices and networks to connect and share information reliably. Despite some complexity and security concerns, its flexibility, scalability, and widespread adoption make it essential for both small and large networks. Overall, the TCP/IP model is crucial for ensuring efficient and effective network communication.

Frequently Asked Questions on TCP/IP Model – FAQs

Which IP Addresses Do TCP/IP Work With?

TCP/IP generally works with both the IP that is, IPv4 and IPv6. If you are using IPv4 or IPv6, it seems that you are already working on TCP/IP Model.

How many layers are in the TCP/IP Model?

The TCP/IP Model has four layers:

  • Network Interface Layer
  • Internet Layer
  • Transport Layer
  • Application Layer

What does each layer do?

  • Network Interface Layer: Handles the physical transmission of data over a network.
  • Internet Layer: Manages the routing of data packets across the network.
  • Transport Layer: Ensures reliable data transmission between devices.
  • Application Layer: Provides protocols for specific data communication services on a process-to-process level.

How is the TCP/IP Model different from the OSI Model?

The OSI Model has seven layers, while the TCP/IP Model has four layers. The TCP/IP Model is simpler and more practical, making it more widely used in real-world networking.

What are the main protocols in the TCP/IP Model?

Key protocols include:

  • TCP (Transmission Control Protocol): Ensures reliable data transmission.
  • IP (Internet Protocol): Handles addressing and routing of data packets.
  • HTTP/HTTPS: Used for web communication.
  • FTP: Used for file transfers.
  • SMTP: Used for email communication.

What is the role of IP addresses in the TCP/IP Model?

IP addresses identify devices on a network, enabling data to be routed to the correct destination.



Previous Article
Next Article

Similar Reads

Similarities between TCP/IP model and OSI model
Pre-Requisite: Layers of OSI Model, TCP/IP Model OSI Model or Open Systems Interconnection is an architecture of 7 layers in which each layer has its work to perform whereas TCP/IP is a concise version of the OSI Model. TCP/IP Model consists of 4 layers rather than the 7 layers of the OSI Model. There are so many similarities between the TCP/IP mod
5 min read
This is exactly why we still use the OSI model when we have TCP/IP Model
What is the OSI Model?OSI is an acronym for Open Systems Interconnection. The International Organization for Standardization (ISO) created the OSI model (ISO). It's a model for how applications communicate over the internet. In order to facilitate interoperability between diverse devices and applications, the OSI model describes computing functions
10 min read
Difference Between OSI Model and TCP/IP Model
Data communication is a process or act in which we can send or receive data. Understanding the fundamental structures of networking is crucial for anyone working with computer systems and communication. For data communication two models are available, the OSI (Open Systems Interconnection) Model, and the TCP/IP (Transmission Control Protocol/Intern
5 min read
What is OSI Model? - Layers of OSI Model
OSI stands for Open Systems Interconnection , where open stands to say non-proprietary. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. The OSI reference model was developed by ISO - 'International Organiz
15+ min read
Difference between E-R Model and Relational Model in DBMS
In database management systems (DBMS), two key methods are the Relational model and the Entity-Relationship (E-R) model. Each has a specific function in the development and operation of databases. While the Relational model provides the practical structure for organizing and managing data in relational databases, the E-R model concentrates on offer
4 min read
Attributes to Relationships in ER Model
In ER model, entities have attributes which can be of various types like single-valued, multi-valued, composite, simple, stored, derived and complex. But relationships can also have attributes associated to them. Generally it is not recommended to give attributes to the relationships if not required because while converting the ER model into Relati
2 min read
Devices used in each layer of TCP/IP model
Prerequisite - TCP/IP Model, Network Devices 1. Physical Layer - Physical layer of TCP/IP model is responsible for physical connectivity of two devices. Some of the devices used in Physical layers are, Hubs: Hubs are devices commonly used to connect segments of a LAN. It contains multiple input/output ports. when signal is at any input port, this s
4 min read
A Model for Network Security
When we send our data from the source side to the destination side we have to use some transfer method like the internet or any other communication channel by which we are able to send our message. The two parties, who are the principals in this transaction, must cooperate for the exchange to take place. When the transfer of data happened from one
2 min read
Two State Process Model in Operating System
Pre-requisite: States of a Process in Operating Systems The process in an operating system passes from different states starting from its formation to its completion. A process consists of program data and its associated data and a process control block (PCB). A process may change its state because of the following events like I/O requests, interru
3 min read
Difference between ER Model and RDBMS
1. ER (Entity- Relationship) Model : ER model stands for entity relationship model. It specifies the structure of a database by giving the relationship between the entities of the system. An entity set is a group of entities that are similar to each other. It is considered as a conceptual design which can further be used to implement a database. It
2 min read
Relationships in ER model
Entity Relationship model (ER model) contains entities and relationships. ER model enables us to know how these entities are associated with each other. Entities interact with other entities through associations or relationships. Let us assume that Geeks is the name of a student, Placement 100 is the name of a course. For example, student Geeks enr
2 min read
Distributed Component Object Model (DCOM)
In the last two decades, a massive range of modifications took place in an object-oriented and distributed component-oriented paradigm. To fulfill this demand, Microsoft developed Distributed Component Object Model. DCOM can be defined as COM with inclusion of a long wire and this is an extension to Component Object Model (COM). DCOM- Distributed C
4 min read
Critique of OSI Model and Protocols
Open System Interconnection (OSI) model is reference model that is used to describe and explain how does information from software application in one of computers moves freely through physical medium to software application on another computer. This model consists of total of seven layers and each of layers performs specific task or particular netw
4 min read
Outdoor Mobility Model | Gauss-Markov
There are Indoor Mobility Models like Random-Walk, Random Way-Point, Random Direction. Similarly, there are Outdoor Mobility Models like Gauss Markov and Probabilistic version of Random-Walk. Gauss-Markov : This mobility model was proposed for the simulation of the Personal Communication Service. For example, some years ago, there was only landline
2 min read
Random waypoint model
Random waypoint model pauses time between changing its direction and/or speed. Mobile Node (MN) begins by staying in one location for certain period of time. This is widely used in indoor mobility models. We can choose random destination and speed (minimum speed or maximum speed). Initial point is (x1, y1). It is going in particular direction. When
2 min read
Information Assurance Model in Cyber Security
Information Assurance concerns implementation of methods that focused on protecting and safeguarding critical information and relevant information systems by assuring confidentiality, integrity, availability, and non-repudiation. It is strategic approach focused which focuses more on deployment of policies rather than building infrastructures. Info
5 min read
How Communication happens using OSI model
The Open System Interconnection (OSI) model is a standard “reference model” created by an International Organization for Standardization (ISO) to describe how software and hardware components involved in network communication divide efforts and interact with each other. The OSI model defines a seven-layer set of functional elements, from physical i
4 min read
Deadlock System model
Overview :A deadlock occurs when a set of processes is stalled because each process is holding a resource and waiting for another process to acquire another resource. In the diagram below, for example, Process 1 is holding Resource 1 while Process 2 acquires Resource 2, and Process 2 is waiting for Resource 1. System Model : For the purposes of dea
8 min read
Regular grammar (Model regular grammars )
Prerequisites: Chomsky hierarchy Type-3 grammar/regular grammar: Regular grammar generates regular language. They have a single non-terminal on the left-hand side and a right-hand side consisting of a single terminal or single terminal followed by a non-terminal. The productions must be in the form: A â‡Ē xB A â‡Ē x A â‡Ē Bx where A, B ∈ Variable(V) and
5 min read
Presentation Layer in OSI model
Prerequisite : OSI Model Introduction : Presentation Layer is the 6th layer in the Open System Interconnection (OSI) model. This layer is also known as Translation layer, as this layer serves as a data translator for the network. The data which this layer receives from the Application Layer is extracted and manipulated here as per the required form
6 min read
Session Layer in OSI model
Prerequisite : OSI Layer Introduction :The Session Layer is the 5th layer in the Open System Interconnection (OSI) model. This layer allows users on different machines to establish active communications sessions between them. It is responsible for establishing, maintaining, synchronizing, terminating sessions between end-user applications. In Sessi
5 min read
Why Does the OSI Reference Model Matter?
OSI (Open Systems Interconnection) model is a reference model that describes the movement of information between software applications in different computer systems. It is a seven-layered model used in computer networking. It is useful for developing new standards while considering the existing networking standards. With dynamically changing needs
3 min read
Three State Process Model in Operating System
Pre-requisites: States of a Process in Operating Systems, Two-State Process Model in Operating SystemIn this article, we'll be discussing a three-state process model in an operating system and also discussing the need for this process model, how the process executes, what will be the possible transition that can occur, and last its benefits and som
4 min read
Six-State Process Model in Operating System
In this article, we are going to discuss the Six-State Process Model in Operating Systems and we will also understand what was the need for introducing these process models, what are the states present in these process models, and all the possible transitions that can occur in these models. Need for Six-State Process Model:The Five-State process mo
4 min read
Symmetric Cipher Model
Symmetric Encryption is the most basic and old method of encryption. It uses only one key for the process of both the encryption and decryption of data. Thus, it is also known as Single-Key Encryption. A few basic terms in Cryptography are as follows: Plain Text: original message to be communicated between sender and receiver Cipher Text: encoded f
3 min read
Functions of Physical layer in OSI Model
The physical layer is the lowest layer of the OSI model. The physical layer consists of various networking devices such as connectors, receivers, plugs, modems, repeaters, cables, Hubs, etc. The rules and procedures that are defined for interaction between the physical layers are known as physical layer protocols. The physical connections between t
5 min read
Constraints on Relational Database Model
In modeling the design of the relational database we can put some restrictions like what values are allowed to be inserted in the relation, and what kind of modifications and deletions are allowed in the relation. These are the restrictions we impose on the relational database. In models like Entity-Relationship models, we did not have such feature
6 min read
Data Link Layer in OSI Model
Below are some common GATE CS topics of data link layer. Carrier Sense Multiple Access (CSMA) Carrier Sense Multiple Access or CSMA method was developed to minimize the probability of collision and thus, to increase the performance. The probability of collision can be minimized if a station senses or reads the medium before trying to use it for sen
3 min read
Mathematics | Hypergeometric Distribution model
Hypergeometric Distribution Model is used for estimating the number of faults initially resident in a program at the beginning of the test or debugging process based on the hypergeometric distribution. Let [Tex]$C_i-1$[/Tex] be the cumulative number of errors already detected so far by [Tex]$t_1, t_2, ...., t_i-1$[/Tex], and let [Tex]$N_i[/Tex] be
2 min read
Transport Layer in OSI Model
The transport layer, or layer 4 of the OSI model, controls network traffic between hosts and end systems to guarantee full data flows. Data volume, destination, and rate are all controlled by transport-layer protocols including TCP, UDP, DCCP, and SCTP. The transport layer is positioned between the network and session layers in the OSI paradigm. Th
7 min read
Article Tags :