Lesson Notes: Network Protocol Layers

Computer Science

A network layer model helps break down communication into smaller, more manageable functions. The most common model is the OSI (Open Systems Interconnection) Model, which has seven layers, each responsible for a specific role in data transmission.

  1. Application Layer – User-facing services (e.g., web browsing, email).
    • Protocols: HTTP, HTTPS, FTP, SMTP, POP3
  2. Presentation Layer – Formats and encrypts data for applications.
    • Protocols: SSL/TLS
  3. Session Layer – Manages connections and sessions between devices.
    • Protocols: NetBIOS, RPC
  4. Transport Layer – Ensures reliable data delivery (e.g., error checking).
    • Protocols: TCP (reliable), UDP (fast but unreliable)
  5. Network Layer – Routes data between networks using IP addresses.
    • Protocols: IP, ICMP, ARP
  6. Data Link Layer – Manages data transfer between directly connected devices.
    • Protocols: Ethernet, Wi-Fi (802.11), MAC addresses
  7. Physical Layer – Transmits raw bits over physical media (cables, radio waves).
    • Examples: Ethernet cables, Fiber optics, Wireless signals

TCP/IP Model (Simplified Version)

The TCP/IP Model is a simpler version of OSI with four layers:

  1. Application Layer – Combines OSI’s top three layers (e.g., HTTP, HTTPS, FTP).
  2. Transport Layer – Manages connections (e.g., TCP, UDP). TCP has error checking, UDP does not. Data is split into packets (datagrams) which includes
  3. Internet Layer – Routes data (e.g., IP, ICMP). ICMP is Internet Connection Management Protocol and includes traceroute and ping.
  4. Network Access Layer – Physical and data link functions (e.g., Ethernet, Wi-Fi). How the packet is managed when received at rhe Lan of its destination. Packets are turned into frames and the switch forwards the right frames to the right IP address. Switch knows which MAC address has requested data and returns the data to the right one. The frame

Network Protocols

Protocols are rules and standards that define how data is transmitted across networks.

  • HTTP/HTTPS – Used for accessing websites.
  • FTP – Transfers files between computers.
  • SMTP/POP3/IMAP – Email communication. (Also X500)
  • TCP – Ensures reliable data transmission.
  • UDP – Fast, but no error checking.
  • IP – Assigns addresses to devices.
  • Ethernet/Wi-Fi – Used for local network communication.

Real-World Analogy for Network Layers – The Royal Mail Postal System

Think of network communication like sending a letter through a postal service. Each network layer has a role similar to steps in delivering a letter.


1. Physical Layer (Sending the Letter)

  • Represents the physical means of communication (wires, Wi-Fi signals, fibre optics).
  • In our analogy, this is like the postman’s satchel, postal vans, roads, and planes that physically transport your letter.

🔹 Example: Your letter is put into a satchel and carried by a van to the sorting office.


2. Data Link Layer (Stamping & Addressing)

  • Ensures that data moves correctly between directly connected devices.
  • Like adding a stamp and return address, ensuring your letter is accepted by the postal system.
  • Also checks for errors in transmission.

🔹 Example: If the letter is missing a stamp, it gets rejected.


3. Network Layer (Routing the Letter)

  • Determines the best route for data using an IP address.
  • Like a postal sorting office deciding which city or country to send the letter to.

🔹 Example: Your letter is sent from London to New York based on the address.


4. Transport Layer (Ensuring Delivery)

  • Manages the reliability of communication (e.g., TCP ensures delivery, UDP sends quickly but without confirmation).
  • Like choosing regular mail (UDP – fast but no tracking) or tracked mail (TCP – slower but reliable).

🔹 Example: If using TCP (tracked mail), the sender gets a notification when the letter arrives.


5. Session Layer (Managing the Conversation)

  • Establishes and maintains a session between devices.
  • Like a customer service call that stays connected while you get information.

🔹 Example: You keep sending letters back and forth in an ongoing conversation.


6. Presentation Layer (Translating the Message)

  • Converts data into a usable format (e.g., encryption, compression).
  • Like translating a letter from English to French if the recipient speaks a different language.

🔹 Example: If the message is encrypted (TLS), only the intended recipient can read it.


7. Application Layer (Receiving & Reading the Letter)

  • Directly interacts with the user (e.g., websites, emails, file transfers).
  • Like the recipient opening and reading the letter.

🔹 Example: The recipient reads a web page (HTTP) or opens an email (SMTP/IMAP).


Summary of the Postal System Analogy

OSI LayerPostal System Equivalent
ApplicationReading the letter (Web, Email)
PresentationTranslating the letter (Encryption, Formatting)
SessionKeeping communication open (Back-and-forth letters)
TransportEnsuring delivery (Regular vs. Tracked Mail)
NetworkChoosing the best route (Sorting Office)
Data LinkAddressing & Stamping (MAC Address, Error Checking)
PhysicalDelivering the letter (Postman’s Satchel, Roads, Aeroplanes)

Leave a Reply

Your email address will not be published. Required fields are marked *