TCP/IP Model & Layer Functions
Scenario
If the OSI model is a 7-course fine dining blueprint, the TCP/IP model is the actual 4-course meal you get served in reality. It's pragmatic, streamlined, and powers the entire modern internet.
Mental model
The TCP/IP model condenses the theoretical 7-layer OSI model into 4 practical layers actually used by the internet.
It merges the top three OSI layers (Application, Presentation, Session) into a single Application layer, and the bottom two OSI layers (Data Link, Physical) into a single Network Access layer, while keeping Transport and Network (called Internet) distinct.
Explanation
While the OSI model is the gold standard for networking theory, the TCP/IP (Transmission Control Protocol/Internet Protocol) model is the practical architecture that actually runs the global internet. Developed by the US Department of Defense (DARPA) in the 1970s, it prioritized flexibility and the ability to survive network failures.
The TCP/IP model consists of four layers. From top to bottom: the Application layer, the Transport layer, the Internet layer, and the Network Access (or Link) layer. This streamlined approach reflects how software and hardware are actually built in the real world.
The Application layer in TCP/IP handles everything related to user-facing network protocols. It absorbs the OSI model's Session, Presentation, and Application layers. Whether data needs to be encrypted, formatted, or mapped to an application session, it all happens here. Common protocols include HTTP for web traffic, SMTP for email, and DNS for domain names.
The Transport layer exactly mirrors the OSI model's Layer 4. Its job is to provide communication between applications on different host computers. It primarily uses TCP for reliable, ordered delivery (making sure no data is lost) or UDP for fast, 'fire-and-forget' delivery. It uses port numbers to direct traffic to the correct application on the host.
The Internet layer (mapping to OSI Layer 3) has one massive responsibility: routing packets across multiple distinct networks to reach their destination. This is where IP addresses live. Finally, the Network Access layer merges OSI Layers 1 and 2. It deals with the physical hardware and local delivery (MAC addresses, Ethernet cables, Wi-Fi) required to move data from one physical node to the next on the same local network.
Key points
- Layer 4: Application: Maps to OSI Layers 5, 6, and 7. Handles protocol-specific details like HTTP, FTP, and SSH.
- Layer 3: Transport: Maps to OSI Layer 4. Handles host-to-host communication using ports, TCP, and UDP.
- Layer 2: Internet: Maps to OSI Layer 3. Handles logical addressing (IP) and routing packets across boundaries.
- Layer 1: Network Access: Maps to OSI Layers 1 and 2. Handles physical transmission and local node-to-node delivery (MAC, Ethernet).
Common mistakes
- Confusing the numbering: Because TCP/IP has 4 layers, 'Layer 3' in TCP/IP is the Transport layer, but in standard networking jargon, a 'Layer 3 issue' always refers to the OSI model's Network layer (IP routing). Always assume people are using OSI numbering unless stated otherwise.
Glossary
- TCP/IP (Transmission Control Protocol/Internet Protocol) model
- The practical, four-layer blueprint that the actual, real-world internet is built on, defining exactly how data moves across global networks.
- DARPA
- The US defense research agency that originally funded and helped invent the early versions of the internet and its core protocols.
- network failures
- Events where routers crash or cables are cut; the TCP/IP model was specifically designed to route around these problems automatically.
Recall questions
- How many layers does the TCP/IP model have, and what are they?
- Which OSI layers are combined into the TCP/IP Application layer?
- Why did the TCP/IP model win out over the OSI model for actual implementation?
Questions & answers
In the TCP/IP model, which layer is responsible for determining the best path for a packet through a massive network like the internet?
The Internet layer.
Approach: Identify that routing and path determination are the job of the Internet layer, which corresponds to the Network layer in the OSI model.
A developer writes a custom application protocol on top of TCP. Which layer of the TCP/IP model does this custom protocol reside in?
The Application layer.
Approach: Any higher-level protocol logic that sits on top of Transport protocols (TCP/UDP) falls into the broad Application layer of the TCP/IP model.
Continue learning
Previous: OSI 7 Layers