skip to content

Many textbooks teach a five-layer network model; how does it relate to RFC 1122's four TCP/IP layers and to OSI's seven?

level: middleimportance: nice to knowfreq 28%

answer

  1. a teaching hybrid, not a standard
  2. which bottom layer gets split
  3. physical versus data link
  4. top stays a single layer

basics

~20 s

The five-layer model is a textbook hybrid: it keeps TCP/IP's application, transport and internet (called network) layers and splits the link layer into OSI's physical and data link layers. No RFC defines it; RFC 1122 names four layers.

solid answer

~50 s

The five-layer model — physical, data link, network, transport, application — is a teaching compromise. From TCP/IP it takes the single application layer, since the internet never implemented separate session or presentation layers; from OSI it takes the split of the bottom into physical (signals on a medium) and data link (framing and local addressing), because that distinction matters when you teach how networks are built. It is not in any RFC: RFC 1122 lists link, internet, transport and application, and defines no physical layer, leaving the link layer to whatever the attached network requires. So "four or five?" has a precise answer: the TCP/IP model has four layers, five is a textbook hybrid, and OSI has seven. The hybrid's numbers match OSI's only up to layer 4, which is why people still say "layer 7" for the application.

go deeper

for a junior

State the three counts cleanly — TCP/IP four, the textbook hybrid five, OSI seven — and say which layer the hybrid splits.

for a middle

Explain why the hybrid exists: RFC 1122 leaves the link layer to each network technology, while teaching hardware needs physical and data link kept apart.

for a senior

Use the models deliberately: say which vocabulary you mean when an incident report or design document says 'layer 5', since the counts disagree above layer 4.

for a principal

Pick one layer vocabulary for a team's runbooks and diagrams and state it, so layer numbers mean the same thing to network, platform and application engineers.

## Three models side by side Engineers meet three different layer counts and often mix them up. Lined up, they look like this: | OSI reference model | Five-layer textbook model | TCP/IP model (RFC 1122) | |---|---|---| | 7 Application | 5 Application | Application | | 6 Presentation | merged into application | merged into application | | 5 Session | merged into application | merged into application | | 4 Transport | 4 Transport | Transport | | 3 Network | 3 Network | Internet | | 2 Data link | 2 Data link | Link | | 1 Physical | 1 Physical | part of link, not defined separately | ## What each model is - **OSI** is the seven-layer reference model from the ISO standards effort. It is a vocabulary for where a function sits, and it is where the layer numbers engineers use ("L2", "L4", "L7") come from. - **TCP/IP** is the layering of the protocols that actually run the internet. RFC 1122, *Requirements for Internet Hosts -- Communication Layers*, lists four layers — application, transport, internet, link — and says a host "typically must implement at least one protocol from each layer". - **The five-layer model** is a hybrid used by many networking textbooks and courses. It takes TCP/IP's top and OSI's bottom. Neither an RFC nor the OSI standard defines it. ## Why textbooks built the hybrid 1. **Teaching hardware needs two bottom layers.** RFC 1122 deliberately says little about the link layer: it is the protocol a host uses to interface to its directly connected network, and "there is a wide variety of link layer protocols". That suits a host-requirements document, but a course explaining cables, radio, signal encoding and switching needs to separate signalling on the medium (physical) from framing and local addressing (data link). 2. **Matching reality needs one top layer.** The internet suite "does not further subdivide the application layer" (RFC 1122), so teaching session and presentation as layers would describe protocols that do not exist in the running stack. The hybrid drops them. 3. **The middle is the same everywhere.** Network/internet and transport line up across all three models, so the hybrid costs nothing there. It simply uses OSI's name, "network layer", for what RFC 1122 calls the internet layer. ## How to answer "four or five layers?" - The **TCP/IP model**, as specified, has **four** layers. That is the answer when the question names TCP/IP. - **Five** is a textbook convention that splits the link layer: a sensible teaching device, not the standard. - **Seven** is OSI, the reference model. - In practice engineers mix vocabularies: they say "layer 7" for application-level behaviour even while drawing a four- or five-layer stack, because the OSI numbers are the common language. Saying which count you mean avoids an argument that is really about definitions. An interviewer who asks "how many layers does TCP/IP have?" usually wants to hear four, plus the awareness that five is a common teaching variant. ## Common confusions - Treating the five-layer model as "the TCP/IP model" and marking the four-layer answer wrong. - Assuming the hybrid's layer 5 is OSI's session layer. In the hybrid, layer 5 is the application layer; the numbering only matches OSI up to layer 4. - Thinking RFC 1122 defines a physical layer. It does not; physical detail belongs to the specification of each link technology. - Believing the five-layer model is a revision of TCP/IP that superseded RFC 1122's four layers. The two answer different needs: one states host protocol requirements, the other teaches how networks are built.

  • In the five-layer network model, what number does the application layer get, and why do engineers still say 'layer 7'?
    It is layer 5, because the hybrid drops OSI's session and presentation layers. Engineers keep saying 'layer 7' because OSI numbers are the shared vocabulary for layer positions: an 'L7 proxy' means one that understands application protocols, whichever layer count a textbook uses.

saying these in an interview costs you the question

  • The TCP/IP model has five layers; the four-layer version is outdated.
  • In the five-layer model, layer 5 is OSI's session layer.
  • RFC 1122 defines separate physical and data link layers.
  • The five-layer model was published as an internet standard.