Course page
Log in

You are watching a free preview. Enroll to open all 25 lessons, track progress and ask the course tutor.

Enroll now

Section 1: How networks really work

The layered model: OSI and TCP/IP

Article 10 min Lesson 2 of 25 Preview

Networking is organised in layers. Each layer handles one part of the problem and relies on the layer below it. Layers let engineers change one part, such as moving from cable to Wi-Fi, without changing everything else.

The TCP/IP model

The model the internet actually uses has four layers:

  1. Link layer: moving frames between devices on the same local network, using technologies like Ethernet and Wi-Fi. Devices are identified by MAC addresses.
  2. Internet layer: moving packets between networks using IP addresses. Routers work at this layer.
  3. Transport layer: delivering data between applications on two hosts, using TCP or UDP and port numbers.
  4. Application layer: the protocols applications speak, such as HTTP, DNS, SMTP and SSH.

The OSI model

You will also hear about the seven layer OSI model, often used in teaching and certifications:

  1. Physical
  2. Data link
  3. Network
  4. Transport
  5. Session
  6. Presentation
  7. Application

The OSI model splits the TCP/IP link layer into physical and data link, and splits the application layer into session, presentation and application. In everyday conversation, engineers mostly use OSI numbers as shorthand: a "layer 2 switch" works with MAC addresses, a "layer 3 device" routes IP packets and a "layer 7 load balancer" understands HTTP.

Encapsulation

When you send data, each layer wraps it with its own header, like putting a letter into successive envelopes:

Application data (HTTP request)
  + TCP header (ports, sequence numbers)   = segment
    + IP header (source and destination IP) = packet
      + Ethernet header and trailer (MACs)  = frame

At each router, the frame envelope is removed and a new one is added for the next link, while the IP packet inside travels end to end. At the destination, each layer removes its envelope and passes the contents up.

Why layers help troubleshooting

When something breaks, you can work up or down the layers:

  • Is the cable connected or Wi-Fi associated? (link)
  • Do I have an IP address and can I reach my gateway? (internet)
  • Can I connect to the port? (transport)
  • Does the application respond correctly? (application)

This structured approach is much faster than guessing. We will build a full troubleshooting method on it in section 5.

A note on precision

Real protocols do not always fit neatly into one layer. TLS sits between transport and application, and some protocols blur lines. The models are maps, not laws. Use them to think clearly, not to win arguments about which layer something belongs to.

← → switch lessons