Skip to content
Skip to main content

Computer Network Topologies, Transmission Media, and the OSI 7-Layer Model

SS2 Term 1 • Week 8
About 45 minutes
Learning goals: Deconstruct physical network topologies (Star, Bus, Ring, Mesh, Hybrid) and evaluate fault tolerance. • Compare physical transmission media: Unshielded Twisted Pair (Cat6), Coaxial Cable, and Fiber Optic cables. • Analyze the 7 layers of the ISO/OSI Reference Model and their respective network protocols. • Trace packet encapsulation and de-encapsulation across the TCP/IP stack from application to physical link.

In Primary 5, you learned that computers can be linked together into Local Area Networks (LAN) and Wide Area Networks (WAN).

Now, in Senior Secondary 2, we advance from casual computer users to Network Systems Engineers. How does a WhatsApp message sent from Lagos travel thousands of kilometers under the Atlantic Ocean to London in just 100 milliseconds? How do millions of routers direct packets without collisions or mass confusion?

To design and troubleshoot computer networks, engineers rely on two essential concepts: Physical Network Topologies and the international OSI 7-Layer Reference Model.


Learning Outcomes

By the end of this lesson, you will be able to:

  1. Compare network topologies: Star, Bus, Ring, Mesh, and Hybrid configurations.
  2. Evaluate transmission media: Twisted Pair (Cat6), Coaxial, and Fiber Optic cables.
  3. Master the OSI 7-Layer Model from Physical Layer up to Application Layer.
  4. Trace Packet Encapsulation and De-encapsulation as data travels across network protocol stacks.

Key Vocabulary

Term Technical Definition
Topology The geometric arrangement of nodes, cables, and communication links in a computer network.
Fiber Optic Cable A transmission cable composed of thin glass or plastic fibers that transmits data as light pulses via total internal reflection.
OSI Reference Model Open Systems Interconnection; a 7-layer theoretical framework standardizing network communication functions.
Packet Encapsulation The process where each OSI layer adds its own protocol header (and trailer) to data as it moves down the stack.
MAC Address Media Access Control; a unique 48-bit physical hardware identifier burned into network interface cards (NICs) at Layer 2.
IP Address Internet Protocol; a logical numerical address assigned to devices at Layer 3 to route packets across global networks.

Network Topologies: Physical Layout and Fault Tolerance

A network topology defines how computers are wired together:

1. Star Topology:
   Each workstation is wired directly to a central Switch.
   - Advantage: If one cable snaps, only that single workstation loses connection.
   - Disadvantage: If the central switch fails, the entire network goes down.
   - Usage: 99% of modern office and school computer laboratories.

2. Bus Topology:
   All nodes tap into a single shared backbone cable terminated at both ends.
   - Advantage: Inexpensive and simple to install.
   - Disadvantage: A break in the main backbone crashes the entire network. Obsolete in modern LANs.

3. Ring Topology:
   Each computer connects to two neighbors, forming a closed circular loop.
   - Data circulates in one direction via an electronic Token.
   - Disadvantage: One disconnected computer breaks the token ring unless a dual-ring is used.

4. Mesh Topology:
   Every node connects to every other node with dedicated point-to-point links.
   - Advantage: Maximum fault tolerance; multiple redundant paths exist.
   - Disadvantage: Extremely expensive and complex to cable ($N(N-1)/2$ cables needed).
   - Usage: Core internet router backbones and telecommunications infrastructure.

Transmission Media: Copper vs Light

To move bits between nodes, networks use either Guided Media (physical cables) or Unguided Media (wireless radio waves, Wi-Fi, satellite):

Media Type Core Material Max Speed Typical Range Immunity to Electrical Noise
Cat6 UTP (Twisted Pair) Copper wires twisted in pairs 1 to 10 Gbps 100 meters Moderate (twisting cancels EMI)
Coaxial Cable Solid copper core with mesh shield 100 Mbps - 1 Gbps 500 meters High (thick metallic shield)
Single-Mode Fiber Optic Pure silica glass core ($9\ \mu\text{m}$) 100+ Gbps 40 to 80 km Immune (transmits light photons)

African Infrastructure Context: Nigeria's international internet connectivity relies on undersea fiber optic cables landing on the Lagos coastline (such as MainOne, Glo-1, WACS, Equiano, and 2Africa), carrying terabits per second across the Atlantic Ocean!


The OSI 7-Layer Reference Model

In 1984, the International Organization for Standardization (ISO) established the OSI Model to allow computers from different manufacturers to communicate seamlessly.

Layer                  Role & Function                         Protocols / Hardware
───────────────────────────────────────────────────────────────────────────────────
7. Application Layer   User interface, network services        HTTP, HTTPS, DNS, SMTP
6. Presentation Layer  Data formatting, encryption, compression SSL/TLS, JPEG, ASCII
5. Session Layer       Establishes & maintains conversations   RPC, NetBIOS, Sockets
4. Transport Layer     End-to-end delivery, port segmentation  TCP (reliable), UDP
3. Network Layer       Logical IP addressing & packet routing  IPv4, IPv6, Routers
2. Data Link Layer     Physical MAC addressing & framing       Ethernet, Wi-Fi, Switches
1. Physical Layer      Raw bit transmission as electrical/light Cat6, Fiber, Hubs, Bits

Memory Mnemonic: All People Seem To Need Data Processing (From Layer 7 down to Layer 1).


Packet Encapsulation: The Russian Nesting Dolls of Networking

When you click "Send" on an email, the message travels down the sender's OSI stack, gaining headers at each layer:

[ Data: "Hello Teacher" ]                                Layer 7 (Application)
        ↓
[ Transport Header (TCP Port 443) | Data ]               Layer 4 (Segment)
        ↓
[ Network Header (Src IP, Dst IP) | TCP | Data ]         Layer 3 (Packet)
        ↓
[ MAC Header (Src MAC, Dst MAC) | IP | TCP | Data | CRC ] Layer 2 (Frame)
        ↓
10110011010101101000101001010101010101010101001010101101 Layer 1 (Physical Bits)

At the receiver's computer, the process is reversed: De-encapsulation strips off the headers until the raw application data reaches the recipient's screen!


Practical Activity: Network Packet Inspection in Python

Let us write a Python script that simulates packet encapsulation, inspects TCP/IP headers, and extracts IP address octets.

Step 1: Create packet_tracer_lab.py

import socket

# Simulation of Packet Encapsulation
def create_network_packet(src_ip, dst_ip, src_port, dst_port, payload_text):
    print("=== PACKET ENCAPSULATION PROCESS ===")
    # 1. Application Layer Data
    app_data = payload_text
    print(f"1. Application Data:   '{app_data}' ({len(app_data)} bytes)")

    # 2. Transport Layer (Add TCP Header)
    tcp_segment = {
        "src_port": src_port,
        "dst_port": dst_port,
        "seq_num": 1001,
        "payload": app_data
    }
    print(f"2. Transport Segment:  Ports [{src_port} -> {dst_port}] added")

    # 3. Network Layer (Add IP Header)
    ip_packet = {
        "version": "IPv4",
        "src_ip": src_ip,
        "dst_ip": dst_ip,
        "protocol": "TCP (6)",
        "segment": tcp_segment
    }
    print(f"3. Network Packet:      IPs [{src_ip} -> {dst_ip}] added")

    # 4. Data Link Layer (Add Ethernet Frame)
    ethernet_frame = {
        "src_mac": "00:1A:2B:3C:4D:5E",
        "dst_mac": "F0:E1:D2:C3:B4:A5",
        "packet": ip_packet
    }
    print(f"4. Data Link Frame:    MAC addresses added")
    return ethernet_frame

# De-encapsulation simulation at receiving host
def de_encapsulate_packet(frame):
    print("\n=== RECEIVING HOST DE-ENCAPSULATION ===")
    packet = frame["packet"]
    segment = packet["segment"]
    data = segment["payload"]
    print(f"Stripped MAC: {frame['src_mac']} -> {frame['dst_mac']}")
    print(f"Stripped IP:  {packet['src_ip']} -> {packet['dst_ip']}")
    print(f"Stripped TCP: Port {segment['src_port']} -> Port {segment['dst_port']}")
    print(f"Delivered to Application: '{data}'")

# Execute simulation
frame = create_network_packet(
    src_ip="192.168.1.50",
    dst_ip="102.89.23.4", # Nigerian Public IP Range
    src_port=54321,
    dst_port=443,         # HTTPS
    payload_text="GET /curriculum/ss2 HTTP/1.1"
)

de_encapsulate_packet(frame)

Step 2: Run the Script

python packet_tracer_lab.py

Expected Results and Model Output

When you run packet_tracer_lab.py, your terminal will display:

=== PACKET ENCAPSULATION PROCESS ===
1. Application Data:   'GET /curriculum/ss2 HTTP/1.1' (28 bytes)
2. Transport Segment:  Ports [54321 -> 443] added
3. Network Packet:      IPs [192.168.1.50 -> 102.89.23.4] added
4. Data Link Frame:    MAC addresses added

=== RECEIVING HOST DE-ENCAPSULATION ===
Stripped MAC: 00:1A:2B:3C:4D:5E -> F0:E1:D2:C3:B4:A5
Stripped IP:  192.168.1.50 -> 102.89.23.4
Stripped TCP: Port 54321 -> Port 443
Delivered to Application: 'GET /curriculum/ss2 HTTP/1.1'

This reveals the step-by-step encapsulation and de-encapsulation mechanism that powers the global internet!


Common Mistakes to Avoid

  1. Confusing MAC Addresses with IP Addresses: MAC addresses are 48-bit physical hardware IDs burned into the network card at Layer 2 (used within the local network switch). IP addresses are 32-bit (IPv4) or 128-bit (IPv6) logical software addresses at Layer 3 (used to route across the global internet).
  2. Assuming Hubs and Switches Are Identical: A Hub operates at Layer 1 and blindly repeats electrical signals to every port, creating collisions and security risks. A Switch operates at Layer 2, reads incoming MAC addresses, and directs frames exclusively to the intended destination port.
  3. Believing Fiber Optic Cables Carry Electricity: Fiber optic cables carry light pulses. They do not conduct electricity, making them completely immune to lightning strikes and electromagnetic interference.

Notebook Summary

  • Star Topology is the standard for modern local networks; a central switch isolates cable faults. Mesh Topology provides redundant routing paths for backbones.
  • Cat6 Twisted Pair is the standard for short-range LANs (up to 100m). Fiber Optic uses total internal reflection of light for high-speed, long-distance transmission.
  • The OSI 7-Layer Model standardizes networking: Application, Presentation, Session, Transport, Network, Data Link, Physical.
  • Encapsulation wraps data with headers at each descending layer; De-encapsulation unpacks it at the receiver.

Optional Extension Challenge

Research the difference between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) at Layer 4. Why does web browsing and banking require TCP, while live video streaming and online gaming prefer UDP? Write a 4-sentence summary.

Check your understanding

Which network topology connects every computer to a central network switch or hub, ensuring that a single cable failure does not disrupt the rest of the network?
Which guided physical transmission medium transmits data as pulses of light through pure silica glass cores, offering immunity to electromagnetic interference and massive bandwidth?
At which layer of the OSI 7-Layer Model does IP Addressing (logical addressing) and packet routing between different global networks occur?
What is the correct hierarchical order of the OSI 7-Layer Model from Layer 7 (top) down to Layer 1 (bottom)?
Feedback appears after you check your answer.