OSI and TCP/IP layers

← Index · Solutions

Priority key · Priorities guide emphasis; they do not remove taught scope.

Exam recall

Know OSI seven and the school TCP/IP five. Sender adds control information; receiver removes it; a router replaces the link frame.

Why divide networking into layers? priority/medium

Sending a web request requires several different jobs: expressing the request, delivering it to the right application, finding the destination network, crossing each local link, and transmitting signals. Layers separate those responsibilities. A failure in one job can stop the service even if other jobs work.

Each layer performs a defined set of functions, uses the layer below and supplies services to the layer above. Protocols define rules for communication between corresponding entities. Standard interfaces allow different implementations to interoperate and allow one layer to change without redesigning everything. Layering also narrows troubleshooting: a working cable does not prove that DNS or the application works.

The models priority/high

Your school uses the OSI model and a five-layer teaching form of TCP/IP. Some references combine the bottom two into one link/network-access layer, giving four layers. Name the model and stay consistent.

OSI layer, top downMain roleFive-layer TCP/IP mapping
7 ApplicationNetwork services used by applicationsApplication
6 PresentationData format/representation, encoding and related transformationsApplication
5 SessionManage communication sessions/dialoguesApplication
4 TransportProcess-to-process delivery, ports; protocol-dependent reliabilityTransport
3 NetworkLogical addressing and routing between networksNetwork/Internet
2 Data linkFrames, local-link addressing and link error detectionData link
1 PhysicalSend bits as physical signals over the mediumPhysical

Examples: HTTP, SMTP and DNS belong to application; TCP and UDP to transport; IP to network; Ethernet framing to data link. Not every service in a layer is supplied by every protocol: UDP is a transport protocol without TCP’s delivery guarantees.

Encapsulation and decapsulation priority/high

Think of a message inside successive envelopes. The application information remains the payload while lower layers add the information needed for their own delivery job. The analogy is only about wrapping: each protocol defines its actual header format.

As data travels down the sender’s stack, layers add control information. A simplified TCP/Ethernet path is:

Application message
  → TCP header + message                         [segment]
  → IP header + segment                         [packet]
  → Ethernet header + packet + frame trailer    [frame]
  → transmitted bits/signals

The receiver processes and removes the relevant control information as data travels up its stack. Headers may contain addresses, ports or sequencing information; a trailer can contain an error-detection value.

At a router, the incoming link frame is removed, the IP packet is processed, and a new frame is created for the outgoing link. The next-hop MAC addresses change by link. In ordinary forwarding without translation, the original source/destination IP addresses remain, though some IP header fields such as TTL change. A packet still has an IP header when the destination is on the same LAN.

The IP destination is the end host; the link-layer destination is the receiver on the current link. At the router, the link envelope is replaced for the next link. This is why a remote server’s MAC address is not needed on your LAN.

Host A → Router R: frame destination = R's local interface MAC
                   packet destination = Host B's IP
Router R → Host B: frame destination = B's MAC on that link
                   packet destination = Host B's IP
Assumption: ordinary forwarding, no address translation.

Personal correction

Use the address/protocol comparison in Chapter 10 to distinguish ARP, ICMP and IGMP. In this chapter, trace what each layer adds, reads or replaces.

Worked example — original

A browser requests a page from a server on another network. HTTP represents the request at application level. With TCP, port numbers distinguish the communicating application endpoints. IP addresses identify source and destination hosts for routing. Ethernet MAC addresses deliver the frame to the next local hop, initially the default gateway. The server’s remote MAC address is not needed on the client’s LAN.

Practice

Exam focus: HCI 2022 modified Q1, 2024 Q1 and 2025 Q2 include layering/protocol questions. In a layering-benefit answer, state both the design feature and its consequence: “standard interfaces allow one layer’s implementation to change without redesigning the other layers” is stronger than “flexibility”.

Handwritten approach: name the model → give the layer/function → identify relevant addresses/data units → trace what is added or replaced. Do not mix a four-layer table with five-layer numbering.

09A — adapted from HCI 2025 Q2. Explain three benefits of a layered networking model. Make each point distinct and causal.

09B — original. A packet travels from host A through router R to host B. Explain what happens to the link-layer frame at R, distinguish end-destination IP from next-hop MAC, and give the layers of TCP and HTTP in the five-layer model.

Revision checklist

  • 09.1 Name the seven OSI layers in order and state each layer’s role.
  • 09.2 Name the school’s five TCP/IP layers and map them to OSI.
  • 09.3 Associate appropriate protocols, devices, addresses and data units with layers.
  • 09.4 Explain encapsulation and decapsulation at sender and receiver.
  • 09.5 Trace what a router removes, reads and replaces at an intermediate hop.
  • 09.6 Distinguish node/link delivery, host-to-host delivery and process-to-process delivery.
  • 09.7 Explain layering benefits using a specific consequence rather than a list of labels.
  • 09.8 Avoid assuming every transport protocol supplies every possible transport-layer service.

Visual revision mindmap

Chapter 09 revision mindmap

Open this mindmap and its text version · All 21 mindmaps

Your mindmap framework

Centre: OSI and TCP/IP layers. Build the six branches below. For each subbranch, add a short definition, a labelled sample and one exam trap from memory; then check the chapter.

flowchart LR
    C["09 • Revision map"]
    C --> B0["Purpose of layers"]
    C --> B1["OSI seven layers"]
    C --> B2["School TCP/IP five layers"]
    C --> B3["Encapsulation"]
    C --> B4["Journey through a router"]
    C --> B5["Visual checks and mistakes"]
  • Purpose of layers

    • Defined responsibilities.
    • Uses service below; provides service above.
    • Protocol communication between corresponding entities.
    • Standard interfaces enable interoperability and modular change.
  • OSI seven layers

    • Application: network services.
    • Presentation and Session: representation and dialogue.
    • Transport: process delivery; Network: addressing/routing.
    • Data link: frames; Physical: signals.
  • School TCP/IP five layers

    • Application combines OSI upper three.
    • Transport and Network/Internet.
    • Data link and Physical remain separate.
    • Four-layer references combine the lower pair; name the model.
  • Encapsulation

    • Application message.
    • TCP segment with ports/sequence information.
    • IP packet with host/network addressing.
    • Link frame with local addressing/trailer → signals.
  • Journey through a router

    • Remove incoming frame.
    • Read/process IP information and choose route.
    • Construct outgoing frame.
    • Ordinary routing preserves endpoint IPs; link addresses change.
  • Visual checks and mistakes

    • Draw sender → router → receiver with layers.
    • Label message, segment, packet, frame and bits.
    • Explain one distinct causal benefit per mark demand.
    • Avoid: remote server MAC needed locally; all transport protocols reliable.

Close the notes and test the map: explain one branch aloud, sketch its sample, then answer a linked practice question. Mark any missing link to revisit.

Source trail

School Network2; supports 9569 §4.1. Your own TCPIP note records the five-layer model as tested.

HCI 2022 Q1; 2024 Q1(a–b); 2025 Q2(b).

Source guide records provenance and original-paper locations.