Two models describe the same network. OSI has seven layers and is great for learning and troubleshooting. TCP/IP has four layers and is what actually runs the internet. Here is how they compare, layer by layer.
Published 28 November 2026 • SHM Soft
Every networking course teaches two models: the OSI model and the TCP/IP model. Students often wonder why they need both. The answer is that each model does a different job. OSI is a map for understanding and troubleshooting. TCP/IP is the blueprint for what actually runs on the wire.
In this guide, we compare the two models layer by layer, explain where each one came from, show how they map to each other, and explain when to use which one. If you already know the OSI layers, this will click quickly. If not, start with our guide on what the OSI model is and come back here.

The OSI model has seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. It was created by the ISO in 1984 as a universal reference for how networks should work. The TCP/IP model has four layers: Network Access, Internet, Transport, and Application. It grew out of the ARPANET research project in the 1970s and became the model the internet actually uses.
The key difference is purpose. OSI is a reference model. It describes what should happen at each layer, but it does not say exactly how to do it. It is generic, so it works for any set of protocols. TCP/IP is a protocol model. It describes the specific protocols that run the internet, like IP, TCP, and HTTP, and how they fit together. OSI is the textbook. TCP/IP is the machine.
That is why you learn both. When you troubleshoot, you think in OSI layers, because the model gives you a checklist: is this a Layer 1 cable problem, a Layer 2 switching problem, or a Layer 3 routing problem? When you configure a real network, you work with TCP/IP, because that is what your devices actually speak. The two models are not rivals. They are two views of the same thing.
Where each model came from
TCP/IP came first, in practice. It was built by the US Department of Defense research agency, DARPA, for the ARPANET, the network that became the internet. The engineers needed something that worked, so they built protocols and then described the model around them. The model has four layers because that was enough to organise the protocols they had.
OSI came later, as an international standard. The ISO wanted a vendor-neutral framework so that equipment from different makers could work together. The OSI model has seven layers because the designers split the jobs more finely. It was a beautiful design, but the OSI protocols themselves never took off. TCP/IP had already won by the time OSI was finished. What survived is the model, not the protocols, and it survived because it is so useful for teaching and troubleshooting.
Here is how the layers line up. At the bottom, OSI has two layers, Physical and Data Link, which TCP/IP combines into one layer called Network Access. The Physical layer is about cables, signals, and hardware. The Data Link layer is about moving frames across one link, using MAC addresses. TCP/IP's Network Access layer covers both jobs, and it is where Ethernet and Wi-Fi live.
Next up, OSI's Network layer and TCP/IP's Internet layer are the same job: addressing and routing. This is where IP addresses live, and where routers work. OSPF, BGP, and ICMP all sit here. The names differ, but the function is identical, and this is the layer where the two models agree most closely.
Next, both models have a Transport layer, and it is the same in both. This is where TCP and UDP live. TCP gives reliable, ordered delivery, and UDP gives fast, simple delivery without guarantees. Ports live here too. If you know the Transport layer in one model, you know it in the other.
At the top, the models split again. OSI has three layers: Session, Presentation, and Application. The Session layer manages conversations between devices. The Presentation layer handles data formats, encryption, and compression. The Application layer is the interface to the programs people use. TCP/IP merges all three into one Application layer, which covers everything from HTTP and DNS to SSH and FTP. In practice, the Session and Presentation jobs still happen, but they are done inside the application or by libraries like TLS, rather than by separate layers.
Both models describe the same process: encapsulation. When you send data, it travels down the layers on your device, and each layer adds its own header. The Transport layer adds port numbers and makes a segment. The Network or Internet layer adds IP addresses and makes a packet. The Data Link layer adds MAC addresses and makes a frame. The Physical layer turns it all into signals on a cable.
At the other end, the process runs in reverse. Each layer reads its own header, strips it off, and passes the rest up. This is called decapsulation. The two models agree on this completely. The only difference is how many layers they count along the way. OSI counts seven steps, TCP/IP counts four, but the packet on the wire is the same.
Encapsulation is also why the models are useful for troubleshooting. If a packet never arrives, you can ask which layer failed. No signal on the cable means Layer 1. A wrong MAC address means Layer 2. A wrong IP address or route means Layer 3. A blocked port means Layer 4. Each layer has its own tools and its own checks, and the model tells you which ones to use.

Use the OSI model when you are learning, teaching, or troubleshooting. It is more detailed, so it gives you a better map of where a problem might be. Interviewers and exams also use OSI language, so you need to speak it. When someone says a problem is at Layer 2 or Layer 3, they are talking about OSI.
Use the TCP/IP model when you are describing what is actually running. Your computer implements TCP/IP, not OSI. Your router runs TCP/IP. Your firewall rules, your packet captures, and your protocol analysers all use TCP/IP terms. Some textbooks show TCP/IP with five layers, splitting Network Access back into Physical and Data Link, which makes the mapping to OSI even clearer. Both versions are fine. The four-layer version is the standard, and the five-layer version is a teaching aid.
For the CCNA exam, you need both. The exam tests the OSI layers by name and number, and it tests TCP/IP protocols and how they work. It also asks you to map protocols to layers, like knowing that OSPF is a Layer 3 protocol and that SSH is an Application layer protocol. The trick is to learn the OSI layers first, then learn where each TCP/IP protocol sits on that map. Once you can do that, the two models stop feeling like two subjects and start feeling like one.
Watch on YouTube: Lecture-05 OSI vs TCPIP Models
A note on the five-layer TCP/IP model
You will sometimes see the TCP/IP model drawn with five layers instead of four. The extra layer comes from splitting Network Access into Physical and Data Link, which matches OSI layers 1 and 2 exactly. This is not a different model. It is the same model with one layer drawn as two, to make teaching easier. If your course uses five layers, do not worry. The protocols are the same, the order is the same, and the mapping to OSI is the same. Just know which version your exam uses, and use that one in your answers.
The same is true for the names. Some books call the bottom TCP/IP layer the Link layer or the Network Interface layer instead of Network Access. These are all the same layer with different names. The exam usually uses Network Access, but if you see Link layer in a book, it means the same thing. Focus on the function, not the label, and the names will stop mattering.
What is the difference between the OSI and TCP/IP models?
OSI has seven layers and is a theoretical reference model for understanding and troubleshooting networks. TCP/IP has four layers and is the practical model that describes the protocols actually running the internet. OSI is generic, and TCP/IP is specific to the TCP/IP protocol suite.
How many layers does the TCP/IP model have?
Four: Network Access, Internet, Transport, and Application. Some textbooks show five, by splitting Network Access into Physical and Data Link, but the four-layer version is the standard.
Which OSI layers are in the TCP/IP Application layer?
Three: Session, Presentation, and Application. TCP/IP merges them into one Application layer. Their jobs still happen, but they are handled inside applications and libraries like TLS, rather than by separate layers.
Is the OSI model still used?
Yes, as a reference and teaching tool. No network runs the OSI protocols, but every network engineer uses the OSI model to describe problems, to teach concepts, and to troubleshoot layer by layer. It is also tested on the CCNA and Network+ exams.
Which model should I learn first?
Learn the OSI model first, because it is more detailed and it gives you the vocabulary. Then learn TCP/IP, and map each protocol onto the OSI layers. Once you can do that, you understand both models at once.
Conclusion
OSI and TCP/IP are two descriptions of the same network. OSI splits the work into seven layers, which makes it a great map for learning and troubleshooting. TCP/IP groups it into four layers, which matches the protocols that actually run the internet. Neither one replaces the other, and a good network engineer uses both without thinking about it.
Learn the seven OSI layers by name and number. Learn the four TCP/IP layers and the protocols in each. Then practise mapping them to each other until it feels natural. That is the whole skill, and it is one of the most useful things you will learn in networking.
Related articles:
What Is the OSI Model? The 7 Layers Explained
Each of the seven layers, what it does, and a trick for remembering them all.
What Is an IP Address? A Complete Beginner's Guide
What an IP address is, public vs private, and how routers use them to deliver data.
What Is OSPF? How Open Shortest Path First Works
The routing protocol that lives at the Network layer, and how it picks the best path.
Want a clear price for your project?
Tell us what you need and we will send a free quote with no hidden charges.