The TCP/IP Model

The TCP/IP model is the 4-layer networking framework the real internet runs on, condensing the OSI model's 7 layers into Application, Transport, Internet and Network Access. Its Transport layer offers TCP for reliable, ordered, connection-based delivery and UDP for fast, connectionless delivery without guarantees.

3 min read

The TCP/IP model is the practical, simplified networking framework that the real internet actually runs on, in contrast to the more theoretical, 7-layer OSI model. It condenses OSI's layers into just four.

The four layers

  1. Network Access (also called Link). Combines OSI's Physical and Data Link layers, handling the physical transmission of data and node-to-node delivery on a local network.
  2. Internet. Corresponds to OSI's Network layer, handling logical addressing (IP addresses) and routing packets between different networks.
  3. Transport. Corresponds directly to OSI's Transport layer, handling end-to-end delivery between applications, via TCP (reliable, connection-based) or UDP (fast, connectionless).
  4. Application. Combines OSI's Session, Presentation, and Application layers into one, covering everything from establishing a session to formatting data to the actual application-level protocols like HTTP and DNS.

TCP vs UDP within the Transport layer

TCP (Transmission Control Protocol) is connection-oriented and reliable: it establishes a connection first (the three-way handshake), guarantees data arrives in order and retransmits anything lost, at the cost of some overhead and latency. UDP (User Datagram Protocol) skips the connection setup and delivery guarantees entirely, sending data immediately with no acknowledgment or retransmission, trading reliability for speed.

A worked example

Loading a webpage uses TCP: the browser needs the HTML, CSS, and images to arrive completely and in the correct order, or the page would render broken, so the overhead of TCP's reliability guarantees is worth it. A live video call often uses UDP instead: if a tiny fraction of a video frame's data is lost, briefly degraded video quality is far less disruptive to the experience than TCP's approach of pausing to retransmit and reorder the lost data, which would introduce noticeable lag.

Where this matters in real systems

Every application effectively has to choose (or the protocol designer chose for it) between TCP's reliability and UDP's speed based on what actually matters for that specific use case: file transfers, web pages, and email overwhelmingly use TCP, since correctness matters more than raw speed; DNS lookups, video streaming, and online gaming often use UDP (sometimes layering their own lightweight reliability on top only where it's actually needed), since low latency matters more than guaranteeing every single packet arrives.

What interviewers actually ask about the TCP/IP model

  • "How many layers does the TCP/IP model have, and what are they?" Four: Network Access, Internet, Transport, and Application.
  • "How does the TCP/IP model relate to the OSI model?" It condenses OSI's 7 layers into 4: Network Access combines OSI's Physical and Data Link, Internet corresponds to OSI's Network layer, Transport matches directly, and Application combines OSI's Session, Presentation, and Application layers.
  • "What's the core difference between TCP and UDP?" TCP is connection-oriented and guarantees reliable, ordered delivery at the cost of overhead; UDP is connectionless and sends data immediately with no delivery guarantees, trading reliability for speed.
  • "Would you use TCP or UDP for a live video call, and why?" Typically UDP, because low latency matters more than guaranteeing every packet arrives, a dropped frame briefly degrades quality far less than the lag TCP's retransmission and reordering would introduce.

Key takeaways

  • The TCP/IP model has 4 layers: Network Access, Internet, Transport, Application, and is what real networks actually run on.
  • It maps onto OSI's 7 layers by combining several of them, most notably folding Session and Presentation into Application.
  • TCP guarantees reliable, ordered delivery at the cost of overhead; UDP is faster but offers no delivery guarantees.
  • Applications choose TCP or UDP based on whether correctness (web pages, file transfers) or low latency (video calls, gaming) matters more for that specific use case.
All 101 Computer Networks interview questions

Log in to save which topics you've read across every subject.

Frequently asked questions

How many layers does the TCP/IP model have, and what are they?

Four: Network Access, Internet, Transport, and Application.

How does the TCP/IP model relate to the OSI model?

It condenses OSI's 7 layers into 4: Network Access combines OSI's Physical and Data Link, Internet corresponds to OSI's Network layer, Transport matches directly, and Application combines OSI's Session, Presentation, and Application layers.

What's the core difference between TCP and UDP?

TCP is connection-oriented and guarantees reliable, ordered delivery at the cost of overhead; UDP is connectionless and sends data immediately with no delivery guarantees, trading reliability for speed.

Would you use TCP or UDP for a live video call, and why?

Typically UDP, because low latency matters more than guaranteeing every packet arrives, a dropped frame briefly degrades quality far less than the lag TCP's retransmission and reordering would introduce.