TCP/IP vs OSI Model
What the OSI Model Is
The OSI model is a conceptual framework that divides network communication into seven layers, from physical signals up to application software. Each layer provides services to the layer above it and relies on the one below. It was created as a common reference for describing and comparing network designs, rather than as a protocol that is implemented directly.
The seven layers are physical, data link, network, transport, session, presentation and application. Their names help when discussing problems: a cable fault belongs to the physical layer, an IP address conflict to the network layer, and a broken web application usually to the application layer. In practice the layers serve mainly as a shared vocabulary rather than a strict description of every protocol.
What the TCP/IP Model Describes
The TCP/IP model is the four-layer design on which the internet is built. Its layers are the network access (link) layer, the internet layer, the transport layer and the application layer. The model grew out of the protocols themselves, so it describes how the internet actually works more directly than the OSI model does.
The internet layer is where IP operates, handling addressing and routing between networks. The transport layer is where TCP and UDP run, providing connections or datagram delivery between programs. The application layer holds protocols such as HTTP, SMTP and DNS, which carry the services people use.
Some textbooks split the bottom layer into separate physical and data link layers, producing a five-layer view. The four-layer model is the one most often used when describing internet protocols.
Mapping Protocols to Layers
Mapping the two models shows where a protocol belongs. IP sits at the network layer in OSI and at the internet layer in TCP/IP. TCP and UDP sit at the transport layer in both. DNS and HTTP sit at the application layer, which in the OSI model corresponds to the session, presentation and application layers together.
Consider a web request. The browser's HTTP request is created at the application layer. TCP adds a header with port numbers and sequence information, and IP adds the source and destination addresses. The link layer then carries the packet across the local network. Each layer wraps the data from the layer above, a process called encapsulation, and the receiving device unwraps it in reverse order.
Frequently asked questions
Which model should I learn first?
Learn the TCP/IP model first if you want to understand the internet, because it matches the protocols in use. The OSI model is still useful as a shared vocabulary for discussing networking and troubleshooting, and it is usually taught alongside TCP/IP.
Why are there seven OSI layers if the internet uses four?
The OSI model was designed as a general reference and separates functions more finely, for example treating session and presentation tasks as their own layers. The TCP/IP model reflects the practical design of the internet, which handles those tasks inside the application. Both describe the same kinds of work from different angles.