1. Library
  2. Routing and Networks
  3. Network Models

Updated 1 day ago

The OSI model is a blueprint. TCP/IP is a building.

While networking courses teach the elegant seven-layer OSI model, the Internet runs on something messier and more pragmatic: the four-layer TCP/IP model. Developed in the 1970s by engineers at DARPA who were actually building the ARPANET, TCP/IP reflects a fundamental truth about successful systems—they're designed by people solving problems, not committees anticipating them.

The name comes from two protocols that sit at the model's heart: TCP (Transmission Control Protocol) for reliable delivery, and IP (Internet Protocol) for addressing and routing. But "TCP/IP" became shorthand for the entire Internet protocol suite—hundreds of protocols that power everything from web browsing to video calls.

The Four Layers

TCP/IP organizes networking into four layers, each with a clear job:

LayerNameWhat It DoesKey Protocols
4ApplicationUser-facing services and data formattingHTTP, DNS, SMTP, SSH
3TransportEnd-to-end delivery between applicationsTCP, UDP
2InternetAddressing and routing across networksIP, ICMP
1Network AccessPhysical transmission and local deliveryEthernet, Wi-Fi

This is deliberately simpler than OSI's seven layers. The TCP/IP designers weren't being lazy—they recognized that some distinctions (like OSI's separate Session and Presentation layers) created complexity without solving real problems.

Layer 1: Network Access

The Network Access layer handles getting data across a single physical network—your Ethernet cable, your Wi-Fi connection, the fiber optic line to your ISP.

This layer is intentionally vague in the TCP/IP model, and that vagueness is a feature. The Internet protocols above don't care whether you're connected via copper, radio waves, or laser beams. They just need the Network Access layer to deliver frames between directly connected devices.

Ethernet and Wi-Fi dominate here. They handle the messy details: encoding bits as electrical signals, coordinating access when multiple devices share the same medium, using MAC addresses to identify local devices, detecting transmission errors.

The abstraction is powerful: swap your Ethernet cable for Wi-Fi, and nothing above the Network Access layer notices or cares.

Layer 2: Internet

The Internet layer is where the magic happens. It solves the fundamental problem that makes the Internet possible: how do you deliver data to a device on a completely different network, possibly on the other side of the world?

The answer is IP—the Internet Protocol. IP provides:

Global addressing: Every device gets an IP address that uniquely identifies it across all connected networks. Unlike MAC addresses (which only matter locally), IP addresses enable worldwide routing.

Routing: IP packets can traverse dozens of networks to reach their destination. Each router along the path examines the destination IP address and forwards the packet one hop closer to its goal.

Independence from physical networks: IP doesn't care what Network Access technology you're using. This is how a packet can travel from your laptop (Wi-Fi) through your router (Ethernet) across your ISP (fiber) through undersea cables to a server farm on another continent.

Two versions of IP exist: IPv4 (the original, with 32-bit addresses like 192.168.1.1) and IPv6 (the newer version with 128-bit addresses, designed to solve IPv4 address exhaustion).

ICMP (Internet Control Message Protocol) lives here too—it's what makes ping and traceroute work, and how routers report "destination unreachable" errors.

Layer 3: Transport

The Internet layer gets packets to the right machine. The Transport layer gets data to the right application on that machine.

This is where port numbers enter the picture. When a packet arrives at your computer, how does the system know whether it's for your web browser, email client, or video call? Port numbers. HTTP uses port 80, HTTPS uses 443, DNS uses 53. The Transport layer multiplexes—multiple applications sharing one IP address, distinguished by ports.

But the Transport layer's bigger job is deciding how to deliver data. Two protocols offer radically different approaches:

TCP is the reliable choice. It establishes connections, guarantees delivery, ensures packets arrive in order, and slows down when the network is congested. If a packet gets lost, TCP retransmits it. Web browsing, email, file transfers—anything where missing data is unacceptable—uses TCP.

UDP is the fast choice. No connections, no guarantees, no retransmission. If a packet gets lost, it's gone. This sounds terrible until you consider video calls: would you rather have a brief glitch, or have the video freeze while waiting for a retransmission of data that's already obsolete? DNS queries, streaming video, online gaming, VoIP—all use UDP because speed matters more than perfection.

Layer 4: Application

The Application layer is everything else. It's where protocols define how applications actually communicate—the structure of HTTP requests, the format of DNS queries, the commands in an SMTP email exchange.

The OSI model splits this into three layers (Session, Presentation, Application). TCP/IP doesn't bother. In practice, these concerns are so intertwined that separating them creates more confusion than clarity.

This layer is where you actually interact with the network, even if you don't realize it. Every time you load a webpage, your browser speaks HTTP. Every time you type a domain name, DNS translates it to an IP address. The protocols are invisible, but they're doing the work.

How Data Flows Through the Layers

When you request a webpage:

  1. Application: Your browser creates an HTTP request for the page
  2. Transport: TCP segments the request, adds port numbers, manages the connection
  3. Internet: IP adds source and destination addresses, routes toward the server
  4. Network Access: Ethernet (or Wi-Fi) frames the packet for local transmission

Each layer adds its own header, wrapping the previous layer's data like nesting envelopes. This is encapsulation—and it's why a simple HTTP request becomes a much larger Ethernet frame by the time it hits the wire.

At the destination, the process reverses. Each layer strips its header and passes the payload up to the next layer, until the HTTP request reaches the web server.

TCP/IP vs. OSI: Why TCP/IP Won

The OSI model has seven carefully defined layers. It's theoretically elegant. It was designed by international standards committees.

TCP/IP has four somewhat fuzzy layers. It's pragmatic. It was designed by engineers who needed to ship working code.

TCP/IP won because it worked first. By the time OSI standards were finalized, TCP/IP was already running the ARPANET. The Internet grew on TCP/IP's foundation, and network effects made switching unthinkable.

The OSI model survives as a teaching tool and a vocabulary for discussing networking concepts. When someone says "Layer 3 switch" or "Layer 7 firewall," they're using OSI terminology. But the actual packets flowing through those devices follow TCP/IP.

Why This Matters

Understanding TCP/IP's layers transforms how you troubleshoot problems:

  • Can't reach a website? Start at the bottom. Is your Network Access working (can you see your router)? Is the Internet layer working (can you ping the server's IP)? Is Transport working (can you connect on port 443)? Only then check the Application layer.

  • Choosing between TCP and UDP requires understanding what the Transport layer provides—and what it costs.

  • Security tools operate at different layers. Packet filters examine Internet and Transport headers. Application firewalls inspect HTTP requests. Understanding layers helps you understand what each tool can and can't see.

The TCP/IP model isn't just academic knowledge. It's the map of how every packet you send finds its way through the global network of networks we call the Internet.

Frequently Asked Questions About the TCP/IP Model

Was this page helpful?

😔
🤨
😃