From Layer 1 cables to Layer 4 firewalls. Switches, routers, NAT, and the complete stack that makes networks work. The unified architecture.
Everything starts here. Data is electricity. Before packets, before IP addresses, before anything — there are cables. Layer 1 is the literal wires that carry electrical signals.
RJ45 (Registered Jack 45) is the ubiquitous network cable. Eight tiny wires twisted together, arranged in a specific color order (568B: Orange-White, Orange, Green-White, Blue, Blue-White, Green, Brown-White, Brown).
Think of an RJ45 cable as the water pipes connecting the apartment building to the city water supply. Eight wires = eight pipes, each carrying a signal. The color order doesn't matter (there's A and B standard), as long as both ends match. It's the consistency that matters.
For long distances and high speeds, fiber optic cables dominate. Instead of electricity, fiber uses light to transmit data. Two main types:
| Type | Core Size | Distance | Speed | Use Case |
|---|---|---|---|---|
| Single-Mode Fiber (SMF) | 8-10 μm | 10–100 km+ | 10Gbps—400Gbps | Long-distance, ISP backbone |
| Multi-Mode Fiber (MMF) | 50–62.5 μm | 500m—2 km | 1Gbps—100Gbps | Data centers, campus networks |
Core Diameter: 8–10 micrometers (super narrow)
Light Path: Only one path (mode) for light to travel = straight line = minimal distortion
Distance: 10–100+ kilometers without repeaters
Advantage: Low attenuation; ideal for long distances
Cost: Expensive lasers required
Color Code: Yellow sheath
Core Diameter: 50–62.5 micrometers (much wider)
Light Path: Multiple paths (modes) for light = bouncing around = some dispersion
Distance: 500m—2 km before signal degrades
Advantage: Cheaper LEDs; good for shorter distances
Cost: Lower cost than SMF
Color Code: Orange or aqua sheath
An SFP (Small Form-Factor Pluggable) is a transceiver module — a hot-swappable optical module that converts electrical signals to light (or vice versa). It plugs into a router or switch.
The distance marking on an SFP shows the maximum reach of that module before signal degradation becomes unacceptable. This depends on:
Layer 1 provides the physical wires. Layer 2 uses those wires to deliver frames between devices on the same network segment. The key identifier is the MAC address.
Recall from Session 01: every network interface has a unique 48-bit MAC address (Media Access Control). It's burned into the hardware during manufacture and identifies a device on the local network.
In Session 03, we said the IP address is the apartment building (192.168.1.1). The MAC address is the room number inside that building. Two residents in different rooms (different MACs) can share the same building (same IP subnet). A switch uses MAC addresses to forward frames to the correct physical port.
A switch is a Layer 2 device. It has many ports (8, 24, 48, or more), and it forwards frames based on MAC addresses using an internal table:
This MAC table is built dynamically through a process called MAC learning. It's temporary (entries expire after 5–15 minutes) and self-healing.
A VLAN (Virtual LAN) is a logical grouping of ports on a switch, isolated from each other. One physical switch can act like multiple switches.
How does Layer 2 relate to what we've learned?
A router is a Layer 3 device. It connects different networks (subnets) and forwards IP packets between them. While a switch operates on MAC addresses within a single segment, a router operates on IP addresses across many segments.
A switch is like a mailroom inside a building — it delivers mail to rooms using room numbers (MAC addresses). A router is like the postal service — it takes mail and looks at the address (IP) to decide which town/region to send it to. If you send mail to a different city, you need the postal service (router). Mail within your building goes through the mailroom (switch).
A router has a routing table that tells it: "For packets destined to this network, send them to this next hop." Routers don't know the full path to the destination; they just know the next step.
Type: Distance-Vector Interior Gateway Protocol (IGP)
Metric: Hop count (max 15)
Update Frequency: Every 30 seconds (inefficient)
Convergence: Slow (minutes)
Use Today: Legacy networks only. Rarely used in modern networks.
Versions: RIPv1 (classful), RIPv2 (classless)
Type: Link-State Interior Gateway Protocol (IGP)
Metric: Cost based on link bandwidth (1–65535)
Update Frequency: Event-driven (fast)
Convergence: Fast (seconds)
Use Today: Common in enterprise networks, ISP backbones
Versions: OSPF v2 (IPv4), OSPF v3 (IPv6)
Type: Path-Vector Exterior Gateway Protocol (EGP)
Metric: AS path length (how many ASes traversed)
Update Frequency: Incremental (very efficient)
Convergence: Slow (minutes, but stable)
Use Today: THE protocol for the Internet backbone
Versions: BGPv4 (current standard)
When Irene (192.168.1.3) sends a packet to Google (8.8.8.8), here's what happens:
Everything so far is the infrastructure. But who is allowed where? That's where firewalls come in. A firewall is a policy engine that decides whether a packet should be allowed or blocked.
Routers and switches are the infrastructure (the city and the building). Firewalls are the bouncers at the door. They check: "Are you on the list? What's your ID? What time is it? Are you trying to enter a restricted floor?" If you fail the check, denied.
| Type | Layer | What It Sees | Decision Basis |
|---|---|---|---|
| Stateless (Packet-filter) | 3–4 | Source/Dest IP, Port, Protocol | Simple rules (block this port) |
| Stateful | 3–4 | Connection state, direction | Allow if part of established connection |
| Application-Layer (DPI) | 7 | Actual application data | Content inspection, malware detection |
Firewalls enforce rules. A rule says: "If a packet matches X criteria, then ALLOW/DENY/LOG it."
This is where Sessions 02, 03, and 04 converge. Recall:
In a real company:
Modern firewalls are stateful. They track every active connection.
Now you understand the complete stack. Let's bring it all home with one final unified model: the building is no longer just an IP address with ports. It's a complete network ecosystem.
Every layer builds on the one below. Remove Layer 1, and nothing works. Misconfigure Layer 3, and the packets take the wrong path. Forget Layer 4, and hackers walk through the front door.
Scenario: A customer visits https://sprintug.example.com from their home IP (203.0.113.50).