Tech_Interview_Prep

OSI & TCP/IP Models

The layered models networking is reasoned about in — physical up to application — and where common protocols and problems live.

What it is

The OSI and TCP/IP models describe networking as a stack of layers, each handling a distinct concern — the shared vocabulary networking problems and protocols are discussed in, even when the two models don't map onto each other perfectly.

Key points

  • OSI's 7 layers (physical, data link, network, transport, session, presentation, application) is the more detailed, largely academic reference model; TCP/IP's 4 layers (link, internet, transport, application) is the simpler model that actual internet protocols are built on.
  • Layer 3 (Network): IP addressing and routing — how a packet finds its way across many networks to its destination.
  • Layer 4 (Transport): TCP (reliable, ordered, connection-based) vs. UDP (unreliable, unordered, connectionless but lower overhead) — the choice depends on whether the application needs delivery guarantees or values low latency more.
  • Knowing which layer a problem lives at ("is this a DNS issue, a routing issue, or an application issue") is what makes network troubleshooting tractable instead of guesswork.