// LECTURE OBJECTIVES
- 1. Understand the OSI model: its seven layers and the purpose of partitioning network communication into tiers.
- 2. Understand why networking relies on it: guides architecture design, structured troubleshooting, and protocol standardisation.
- 3. Identify each layer: and recognise the exact boundary differentiating adjacent layers.
1. Encapsulation and Protocol Data Units (PDUs)
To transmit information between two hosts without forcing software rewrites whenever physical hardware changes, the OSI model establishes the principle of encapsulation. Moving down the hierarchical stack, each layer treats data from the layer above as raw payload and prepends its own control header.
Layer 7 · Application
The layer users and software interact with directly—the interface between the user process and network services. It does not refer to end-user programs themselves (like a browser or word processor), but to the communication protocols those programs invoke over the network.
this is the only layer interacting directly with you; all lower layers operate transparently behind every action.
Core protocols:
| Protocol | Port(s) | Role |
|---|---|---|
| HTTP | 80, 8080 | Client–server communication on the web |
| HTTPS | 443 | Encrypted and authenticated HTTP over TLS |
| FTP | 20, 21 | File transfer |
| DNS | 53 | Translates domain names to IP addresses |
| SMTP | 25, 587, 465 | Sending and relaying electronic mail |
| SSH | 22, 2222 | Encrypted remote shell access |
Before a Layer-7 request leaves the host, DNS (Port 53 UDP/TCP) resolves any FQDN (such as mastertechg.com) into a routable Layer-3 address. The client OS then allocates an ephemeral port (range 49152–65535) to receive replies sent from the server's well-known port (e.g., 443).
Layer 6 · Presentation
Ensures payloads remain readable and protected across heterogeneous platforms—acting as the network's translator across byte orderings (Little vs. Big Endian) and character encodings (ASCII vs. UTF-8).
unlike the Application layer, the concern is no longer semantic intent, but representation: translation, encryption, and compression.
Layer 5 · Session
Opens, arbitrates, and terminates dialogue sessions between communicating hosts, preventing both endpoints from transmitting out of turn or losing resumable checkpoints during disruptions.
Application and Presentation define content and format; Session governs dialogue lifecycle—start, pause, checkpoints, and teardown.
Token Management:
| Token | Function |
|---|---|
| Data Token | Identifies what payload is transmitted and when. Over half-duplex channels, only the holder of the Data Token is permitted to transmit. |
| Activity Token | Partitions long dialogues into resumable logical units so transient interruptions do not abort the entire workflow. |
| Sync Token | Inserts numbered synchronisation checkpoints into streams so interrupted large transfers resume from the last confirmed mark. |
| Release Token | Negotiates clean session closure across both endpoints and releases allocated dialogue buffers. |
Layer 4 · Transport
Handles end-to-end delivery between communicating processes, receiving data from Session and passing it to Network. It does not inspect payload semantics or global routing topology; its sole job is reliable or low-latency process-to-process transport via logical port numbers.
content no longer matters—completeness and pace do: choose between reliability (TCP) and speed (UDP).
Sends segments sequentially, numbers each unit, and confirms delivery. Prioritises reliability.
Requires a Three-Way Handshake (SYN, SYN-ACK, ACK) before sending application data and tracks acknowledgements continuously.
Faster datagram dispatch without order checks or delivery retries. Prioritises low latency.
Connectionless transport without handshakes or retransmissions, trading recovery overhead for real-time responsiveness.
Transport — Services I (Core Layer-4 Mechanisms):
Transport — Services II (Additional Layer-4 Controls):
Layer 3 · Network
Determines the logical path across separate networks via addressing, routing, and forwarding. Routers inspect IP headers and consult dynamic routing tables (BGP, OSPF) to choose each Next Hop.
Transport guarantees end-to-end delivery; Network decides WHICH PATH packets travel using IP addresses.
Protocols:
| Protocol | Role |
|---|---|
| IP | Identifies each interface (IPv4 / IPv6) with hierarchical connectionless "best-effort" delivery. |
| ICMP | Error reporting and operational diagnostics supporting ping and traceroute. |
| IPSec | Authenticates and encrypts IP packets for enterprise VPN tunnels and secure Layer-3 transit. |
Layer 2 · Data Link
Transfers frames reliably across nodes inside the same local area network (LAN). While IP addresses change per subnet, Layer-2 frames rely on 48-bit physical MAC addresses burned into Network Interface Cards (NICs). Switches operate at this layer.
Network moves packets between networks via IP addresses; Data Link moves frames inside the local segment via MAC addresses.
Manages interaction between upper network protocols and MAC, supplying frame synchronisation, link flow control, and error reporting.
Interfaces with hardware, prepends source/destination MAC headers, and appends CRC/FCS trailers to drop corrupted frames.
Layer 1 · Physical
The bottom layer of the OSI stack: transmits raw binary bits as electrical, optical, or radio signals, defining mechanical, electrical, timing, and signalling rules for physical links.
the only layer handling raw physical signals on the medium rather than structured protocol headers.
Returning to WhatsApp: What Happens When You Send a Message?
Exact downward traversal through the OSI stack when sending a message:
| OSI Layer | WhatsApp Flow |
|---|---|
| Application | The user types "Hello" in WhatsApp; the client interprets the payload and initiates network dispatch. |
| Presentation | The message is binary-encoded and encrypted (end-to-end encryption in WhatsApp). |
| Session | An active session between sender and recipient is validated and maintained continuously. |
| Transport | Payloads are divided into segments using TCP (reliable delivery) or UDP (low-latency media) depending on traffic type. |
| Network | Source and destination IP addresses are prepended, forwarding routes are chosen, and each segment becomes an IP packet. |
| Data Link | MAC addresses are added, payloads are encapsulated into frames, and local link transmission errors are checked. |
| Physical | Bits are transmitted as electrical voltages, optical light pulses, or RF waves (Wi-Fi / cellular). |
Slido Self-Assessment Question Bank
Formative evaluation questions from the lecture accompanied by worked study answers:
A conceptual and pedagogical reference model developed by ISO partitioning network communication into 7 standardised layers.
Exactly 7 layers: Application, Presentation, Session, Transport, Network, Data Link, and Physical.
ISO (the International Organization for Standardization).
OSI is a 7-layer theoretical reference framework; TCP/IP is the practical 4-layer architecture operating the live Internet.
It has 4 layers: Application, Transport, Internet, and Network Access.
Layer 7 (Application), typically listening on ports 80 and 8080.
Ensuring data readability and protection across hosts: binary translation, syntax formatting, encryption, and compression.
TCP (Transmission Control Protocol) at Layer 4 (Transport).
The Internet layer (which corresponds to OSI Layer 3, Network).
Layer 3 (Network) via IPv4 and IPv6 protocols.
Conclusion
"The OSI model clarifies how systems communicate across a network via a layered structure. Each layer fulfils a focused responsibility, supporting network design, implementation, and troubleshooting. The TCP/IP model represents the practical stack deployed across the Internet. Both models are essential to understand and work with networking infrastructure."
Technical Breakdown of the 4 Core Takeaways:
By isolating duties across 7 independent levels, software developers and hardware vendors can innovate at one layer (e.g., new Physical media) without rewriting upper-layer applications.
Establishes systematic debugging workflows—Bottom-Up (physical link upwards) or Top-Down (application downwards)—to isolate IP, socket, or link faults quickly.
While OSI provides the finest conceptual vocabulary, the live Internet runs on the 4-layer TCP/IP stack, folding Application, Presentation, and Session into software.
Both architectures ensure disparate hardware, processors, and operating systems interoperate seamlessly under open standards.
