Lesson 20 of 60 beginner

OSI & TCP/IP Without Confusion

How to think in layers under pressure

Open interactive version (quiz + challenge)

Real-world analogy

Networking without layers is like diagnosing a sick patient by staring at their skin. Layers let you isolate: is this a hardware problem, an IP problem, a DNS problem, an application problem? The OSI model is a flashlight — not a religion.

What is it?

The OSI and TCP/IP models are mental maps for diagnosing networking issues by isolating the failing layer. They don’t change what happens on the wire; they change how clearly you can think under pressure.

Real-world relevance

A user says ‘I can’t open the portal.’ Ping IP works (L3 OK). DNS resolves (L7 partial). HTTPS connection drops mid-handshake (L6/L4 TLS). Turns out a new firewall rule blocks outbound 443 to that subnet. You narrowed it from ‘app broken’ to ‘firewall policy’ in 2 minutes.

Key points

Code example

// Layered triage cheat-script

Physical / Link (L1/L2)
  - Cable/Wi-Fi connected? Link light?
  - Correct VLAN? Correct SSID?

Network (L3)
  - IP sane? ipconfig /all
  - Gateway reachable? ping <gw>
  - Remote reachable? ping <ip>
  - Route sane? route print / tracert

Transport (L4)
  - Port open? Test-NetConnection host -Port 443
  - TCP handshake? (SYN -> SYN/ACK -> ACK)
  - Firewall? ACL?

Application (L5-7)
  - DNS resolving? nslookup / Resolve-DnsName
  - HTTP/HTTPS error? curl -I https://host/
  - Certificate / TLS handshake OK?

Speak in layers:
  "I can ping by IP (L3) but HTTPS fails (L6/L7)."
  "SMB works internally; Kerberos TGT fails (L7 auth)."

Line-by-line walkthrough

  1. 1. Layered triage cheat script
  2. 2. Physical/link layer checks
  3. 3. Cable/Wi-Fi presence
  4. 4. VLAN/SSID correctness
  5. 5. Blank separator
  6. 6. Network layer
  7. 7. IP sanity
  8. 8. Gateway reachability
  9. 9. Remote reachability
  10. 10. Path and routing
  11. 11. Blank separator
  12. 12. Transport layer
  13. 13. TCP port test
  14. 14. Handshake awareness
  15. 15. Firewall consideration
  16. 16. Blank separator
  17. 17. Application layer
  18. 18. DNS resolution
  19. 19. HTTP/S response
  20. 20. Certificate handshake
  21. 21. Blank separator
  22. 22. Language tip
  23. 23. Example layer-speak line
  24. 24. Another layer-speak line

Spot the bug

Ticket: ‘Cannot reach portal.bank.local.’
Junior immediately calls the firewall team.
Need a hint?
Which layer-by-layer tests would you run first to know whether the firewall is actually the issue?
Show answer
Before escalating: ipconfig (L3), ping gateway (L3), nslookup portal.bank.local (L7/DNS), Test-NetConnection portal.bank.local -Port 443 (L4), curl -I (L7). If DNS fails, firewall isn’t the problem. Escalate with layer-specific evidence so the firewall team doesn’t hunt a ghost.

Explain like I'm 5

A computer talking to another computer is like two people shouting across rooms through a chain of translators. Each translator handles one thing. Knowing which translator is confused tells you exactly what to fix.

Fun fact

The OSI model was designed by committee in the 1980s and meant to replace TCP/IP. TCP/IP won in practice because it was simpler and already working. OSI survived as the best language for teaching — which is why you’re reading about it now.

Hands-on challenge

On your own machine, recreate the layered triage above for a real site (e.g., example.com). Record each step’s output and label which OSI layer the test represents.

More resources

Open interactive version (quiz + challenge) ← Back to course: IT Jobs Bootcamp