Study Guide

OSI and TCP/IP Models

Why networking is divided into layers, the seven OSI layers and the four-layer TCP/IP model, and how encapsulation and MTU work.

Lesson 3.2 Networking Fundamentals

Sending a web page across the world involves dozens of separate jobs. This lesson is about how networking organises those jobs, and why the way they are organised matters for security.

Stage: Think

Dozens of jobs

Think it through

Think about everything that has to happen for a web page to reach your phone from a server in another country. List as many separate jobs as you can.

Show what happens

Finding the right device, splitting the data into pieces, checking that every piece arrived, turning it into signals, carrying it, and putting it back together. Too many jobs to think about at once, so networking sorts them.

Think it through

A browser asks for a web page. Does the browser need to know whether the laptop is on Wi-Fi or a cable?
Show the answer

Answer: B. No: it hands the request on and lets other parts deliver it.

No. The browser does its own job and trusts other parts to deliver the request. Sorting the jobs so that each relies on the one below it is the idea of layers.

Stage: Explain

Why networking is divided into layers

Each layer has one responsibility and relies on the layer below it. A browser does not need to know whether a laptop is on Wi-Fi or Ethernet; it hands its request down and trusts the lower layers to deliver it. Layers also give people a shared vocabulary. Saying “this is a Layer 2 problem” or “this control works at Layer 7” tells a colleague a great deal in a few words.

The cybersecurity value is this: understanding the layers helps identify where networking failures, security controls and attacks occur.

The same idea in the post

Posting a letter is layered in the same way.

  1. You write the letter. Only its content matters to you.
  2. You put it in an envelope and write the address. The envelope does not care what the letter says.
  3. The post office puts the envelope in a sack for the right town. The sack does not care which house it is for.
  4. A van carries the sack. The driver does not care what is in it.

Each step wraps what came before and adds only what the next carrier needs. At the other end the steps are undone in reverse: the sack is opened, the envelope is delivered, the letter is read. Networks do exactly this, with more steps.

Where the comparison stops. A letter travels as one object. Network data is usually cut into many small pieces that travel separately and are put back together on arrival.

Stage: Explain

The seven OSI layers

The OSI model names seven layers, numbered from the cable upwards. Start with the job each one does, put as a question. Read from the top, the way data travels when it is sent.

LayerThe question it answersWhat that means
7 · ApplicationWhat does the program want to say?The request itself, such as “send me this web page”.
6 · PresentationWhat form is it in?How the data is written down, and whether it is scrambled for privacy.
5 · SessionIs this part of a conversation already going on?Starting, keeping track of and ending an exchange.
4 · TransportWhich program is it for, and did all of it arrive?Getting data to the right program on a device, complete and in order.
3 · NetworkWhich device, on which network, is it for?Addresses that work across the world. Routers work here.
2 · Data LinkWhich device on this cable or Wi-Fi gets it next?Delivery within one local network. Switches work here.
1 · PhysicalHow are the ones and zeros actually sent?Electrical signals, light or radio.

A sentence helps to remember the order. The Baldur’s Gate 3-inspired mnemonic, from Layer 7 down to Layer 1, is:

All Players Should Take New Defensive Positions.

Check your understanding

Which layer answers “Which device, on which network, is it for?”, and is where routers work?
Show the answer

Answer: C. Layer 3, Network.

Layer 3, Network: addresses that work across networks, used by routers. Switches work at Layer 2, within one local network.

The next table is the same seven layers as a reference, with the protocols usually placed at each. Most of those names are taught in the lessons that follow, so there is no need to know them yet. Come back to this table as each one is introduced.

LayerMnemonicResponsibility and examples
7 · ApplicationAllNetwork services used by applications: HTTP, DNS, DHCP and SMTP
6 · PresentationPlayersRepresentation, encoding and encryption; TLS is often associated here in teaching
5 · SessionShouldEstablishment and management of communication sessions; NetBIOS session service is a traditional example
4 · TransportTakeEnd-to-end transport and logical ports: TCP and UDP
3 · NetworkNewLogical addressing and routing: IP; control messages such as ICMP
2 · Data LinkDefensiveFrames and local link-layer addressing: Ethernet MAC; ARP is commonly associated
1 · PhysicalPositionsBits carried as signals over copper, fibre or radio

OSI is a model for thinking, not a description of how any one product is built. Real technologies do not always fit one layer: Ethernet and Wi-Fi cover both Layer 1 and Layer 2, and many modern connections have nothing separate at Layers 5 and 6. The layers a beginner uses most are 1 to 4 and 7.

Typical examples help fix those layers in memory: web pages (HTTP) and email (SMTP) at Layer 7, TCP and UDP at Layer 4, IP addresses and the router at Layer 3, MAC addresses and the switch at Layer 2, and cable and radio at Layer 1.

Applying the model to a web request

Think it through

Before reading on: using the table of questions, which layer would handle each of these for a secure web page? Writing the request; getting it to the right program; addressing the right computer; reaching the next device; sending the signals.

Show what happens

Application (with TLS protecting it), Transport, Network, Data Link and Physical. The list below names the protocol doing each job.

Take loading a secure web page, from the top layer down.

  • The browser writes the request. HTTP is the set of rules for asking for web pages, and TLS scrambles the request so that only the website can read it.
  • TCP makes sure the whole request reaches the right program on the website’s computer, complete and in order.
  • IP carries the address of that computer, wherever in the world it is.
  • Ethernet or Wi-Fi gets each piece to the next device on the way.
  • The cable or the radio carries the signals.

On the way down, each layer that takes part wraps the data and adds its own information, as the envelope and the sack did. This is called encapsulation. The receiving computer unwraps it in reverse, which is decapsulation. The HTTPS walkthrough follows the whole journey.

Stage: Predict

The TCP/IP model

OSI is the model most courses teach, but the internet is actually built on the TCP/IP protocol suite, which is usually described with four layers. The two models describe the same work in different amounts of detail.

Think it through

OSI has seven layers. If you had to merge some of them to make a simpler model, which would you combine?

Show what happens

The TCP/IP model does exactly that: the top three become one Application layer, and the bottom two become one Link layer, leaving four. The diagram below lines the two models up.

OSI layers and the TCP/IP model

Each TCP/IP layer covers one or more OSI layers: Application covers OSI 7 to 5, Transport covers 4, Internet covers 3, and Link covers 2 and 1.

OSI model

TCP/IP model

7Application

6Presentation

5Session

4Transport

3Network

2Data Link

1Physical

ApplicationHTTP, DNS, DHCP, TLS

TransportTCP, UDP

InternetIPv4, IPv6, ICMP

Link (network access)Ethernet, Wi-Fi

The TCP/IP model matters because many references and tools use its layer names. Some books describe five layers by splitting Link into Data Link and Physical. Either way, the key idea is the same as OSI: each layer relies on the one below it.

Stage: Predict

Encapsulation: wrapping data layer by layer

Encapsulation is the letter going into the envelope and the envelope into the sack. Each layer that takes part adds its own information around the data on the way down; the receiver removes it on the way up.

Each wrapping has a name. TCP places the data in a segment with port numbers. IP places the segment in a packet with IP addresses. Ethernet places the packet in a frame with MAC addresses for the local link.

Encapsulation: each layer wraps the one above

A simplified HTTPS request over TCP and Ethernet. Reading outwards: the protected application data sits inside a TCP segment, which sits inside an IP packet, which sits inside an Ethernet frame.

Ethernet frame · Layer 2 · added last on the way out

Ethernet headerdestination MAC, source MAC

IP packet · Layer 3

IP headersource IP, destination IP

TCP segment · Layer 4

TCP headersource port, destination portApplication dataHTTP request, protected by TLS
Trailererror check

On a typical Ethernet link the IP packet can be up to 1,500 bytes (the MTU). The Ethernet header and trailer are added around it and are not counted in that figure.

Think it through

Halfway across the internet, a router receives the wrapped-up web request. What does it need to read to decide where to send it next?
Show the answer

Answer: B. The destination address on the IP packet.

The destination address on the IP packet. The router unwraps only as far as the packet, as the sixth step of the walkthrough that follows shows.

One request down and back up the stack (illustrative)

A laptop requests a secure web page from a server on the internet. Seven steps, one at a time: down the laptop’s layers, across the routers, and back up the server’s layers.

  1. Application

    Step 1 of 7: The request is written

    The browser creates an HTTP request, and TLS protects it.

  2. Transport

    Step 2 of 7: A segment

    TCP puts the protected data in a segment, adding the source port and destination port 443.

  3. Network

    Step 3 of 7: A packet

    IP puts the segment in a packet, adding the laptop’s IP address and the server’s IP address.

  4. Data Link

    Step 4 of 7: A frame

    Ethernet or Wi-Fi puts the packet in a frame addressed to the next device on the local link, usually the router.

  5. Physical

    Step 5 of 7: Signals

    The NIC sends the frame as signals.

  6. Each router on the way

    Step 6 of 7: Unwrap, decide, rewrap

    Each router unwraps the frame to read the packet, decides where to send it, and wraps it in a new frame for the next link. The packet’s destination IP address stays the same in this example, which involves no address translation.

  7. The server

    Step 7 of 7: Decapsulation

    Each layer removes its wrapping in reverse until the web server reads the request.

Stage: Predict

MTU: how big can a packet be?

A figure worth remembering is MTU = 1500 bytes. The maximum transmission unit is the largest packet a link can carry in one go. On a typical Ethernet link it is 1,500 bytes, and that figure refers to the IP packet: the Ethernet frame’s own header and trailer are added around it.

Think it through

A link can carry packets of at most 1,500 bytes. How does a 10-megabyte file get across it?

Show what happens

In thousands of smaller pieces, each small enough to fit, put back together at the other end. The box below explains who does the splitting.

Data larger than the MTU must be sent in smaller pieces. TCP normally sizes its segments so that packets fit, and IPv4 can also split an oversized packet into fragments. 1,500 bytes is common but not universal: some links, such as those carrying a VPN (a protected connection wrapped inside ordinary traffic), have smaller effective MTUs, and a mismatch can cause connections that start but then stall.

The layers give a structured way to troubleshoot, often from the bottom up. Is the cable connected or the Wi-Fi joined (Layer 1)? Does the device have a link and a MAC address (Layer 2)? Does it have a valid IP address and gateway (Layer 3)? Is the service’s port reachable (Layer 4)? Only then is it worth blaming the application (Layer 7).

Stage: Apply

Apply it in a new situation

These questions use the lesson in situations it has not shown. For the strongest test of your understanding, come back to them on another day and answer each one at the first attempt.

Apply it

A user’s laptop shows no Wi-Fi connection at all. Which layer would you start troubleshooting at?
Show the answer

Answer: A. Layer 1, Physical: is there a link at all?

Start at Layer 1: with no link at all, nothing above it can work. Troubleshooting often runs from the bottom up.

Apply it

A colleague says: “TLS is a Layer 6 protocol, full stop.” What is the best response?
Show the answer

Answer: B. Often placed there; real protocols do not fit neatly.

TLS is often associated with Layer 6 in teaching, but OSI is a reference model and real protocols do not always fit one layer.

Stage: Check

Check your understanding

These questions come from the approved revision bank. Choose an answer and check it; the explanation and its sources follow. The last one returns to hosts, nodes and network interface cards from What Is a Network?, now that you can name the layers a network interface card works at.

  1. Which OSI layer is associated with TCP/UDP port numbers?

    Show answer

    Answer: Layer 4 — Transport

    Transport uses TCP/UDP ports to distinguish endpoints. Network handles IP addressing and routing; Data Link handles frames and local addresses. Applications use network services but the port identifiers belong to transport.

    Revision sources: Session 5: Networking Fundamentals — Part 1 (Classroom session record)

  2. Every real-world protocol implements exactly one complete OSI layer.

    Show answer

    Answer: False

    False. OSI is a reference model. Ethernet and Wi-Fi include Physical and Data Link functions; TLS is often associated with Presentation in teaching but does not implement the complete OSI Presentation layer.

    Revision sources: Session 5: Networking Fundamentals — Part 1 (Classroom session record)

  3. What describes encapsulation as data moves down the network stack?

    Show answer

    Answer: Applicable layers add their control information.

    Encapsulation adds applicable layer information. Corresponding receiving layers process it during decapsulation. Neither encryption at every layer nor conversion of all logical addresses into permanent MAC addresses is implied.

    Revision sources: Session 5: Networking Fundamentals — Part 1 (Classroom session record)

  4. Which statements about network components are correct? Select all that apply.

    Show answer

    Answer: A host is a node that can send or receive data.; A NIC provides Physical and Data Link functions.

    Hosts are nodes, but switches and other nodes need not be end hosts. A NIC provides the hardware network interface, primarily at Layers 1 and 2; the application is a separate element.

    Revision sources: Session 5: Networking Fundamentals — Part 1 (Classroom session record)

Study and revision

Practise the OSI questions and flashcards through the Networking & Protocols topic.

Stage: Consolidate

What to remember

  • Layers divide networking into jobs, each relying on the one below, which helps locate failures, controls and attacks.
  • OSI has seven layers: All Players Should Take New Defensive Positions, from Application down to Physical.
  • TCP/IP describes the same work in four layers; OSI is a model for thinking, not how products are built.
  • Encapsulation wraps data at each layer on the way down: segment, then packet, then frame.
  • The MTU is the largest packet a link carries, commonly 1,500 bytes on Ethernet.

Key terms

OSI model (OSI: Open Systems Interconnection)

A conceptual seven-layer reference model for describing networking functions: Application, Presentation, Session, Transport, Network, Data Link and Physical.

TCP/IP model

A four-layer model of how internet communication is organised: Link, Internet, Transport and Application.

Encapsulation

Adding control information at the applicable layers as data moves down the stack for transmission. The receiver processes that information in reverse, which is called decapsulation.

MTU (Maximum Transmission Unit)

The largest packet a link can carry without splitting it up. A typical Ethernet MTU is 1,500 bytes, not counting the Ethernet header and trailer.

Common misunderstandings

The model is a reference. Ethernet spans the Physical and Data Link layers, ARP sits at the boundary of Layers 2 and 3, and TLS is only loosely associated with Layer 6.

Encapsulation happens at the applicable layers. A modern connection may have no separately identifiable Session or Presentation layer protocol.

The internet uses the TCP/IP protocol suite. OSI is a teaching and reference model that describes the same work in seven layers.

Lesson sources and acknowledgements

Sources and scope

  • Taught in Session 5 (see the Session 5 Learning Log): the seven OSI layers, the mnemonic, the reference-model caveats and encapsulation.
  • From the Study Buddy session on 23 September (see the entry): the whiteboard’s layer examples, the encapsulation sketches and MTU = 1500.
  • Moved from an earlier lesson: “The seven OSI layers” and “Applying the model to a web request” were previously part of What Is a Network? and keep their headings and anchors here; their wording was simplified on 13 October 2026. They develop the additional educational explanations from my ChatGPT note-taking discussion.
  • Supplementary explanation: the letter comparison, the table of the question each layer answers, the TCP/IP model and its mapping to OSI, segment, packet and frame, the encapsulation diagram, the MTU detail, the worked request and the misunderstandings.

Guided version (published 1 November 2026, awaiting the site owner’s editorial review): the opening questions about the jobs of delivering a web page, every question asked in the lesson with its feedback and hints, the router, file-size, Wi-Fi and TLS examples and the closing summary are supplementary explanation written for the Study Guide. The settings are fictional. The questions in the lesson’s steps are not revision-bank items; those in “Check your understanding” are, unchanged.