Python · SQL · Web Dev · Java · AI/ML tracks launching soon — your one platform for all of IT
Networking Fundamentals
Network Types and Topologies
LAN to WAN to SAN — and Bus to Star to Mesh. The two dimensions that define every network ever built, and why the layout you choose on day one determines what breaks on year five.
35 min May 2026
// CHAPTER 01
The Decisions That Haunt You at 2 AM
Every network failure can be traced back to a design decision made years earlier.
// REAL-WORLD SCENARIO
It's 2 AM. The office building is dark except for one room where three engineers are hunched over laptops. The company's internal HR system just went down — 800 employees can't clock in tomorrow morning, payroll can't run, and the CEO is awake and texting. The engineers find the problem in 40 minutes: a single Ethernet switch on the third floor failed. But because of how the network was wired ten years ago, that one switch sits in the only path between the second floor and the rest of the building. One failure, hundreds of people affected. The fix for tomorrow? Replace the switch. The fix for the architecture? Months of rewiring.
This is what topology decisions actually cost. The engineer who wired that building in 2014 chose the cheapest option — one switch per floor, connected in a chain. No redundancy. No alternative paths. Nobody asked "what happens if this one switch dies?" That question should have been answered on day one.
This module gives you two frameworks for classifying and designing networks. The first is network type — how geographically large is this network, and who owns it? The second is topology — what shape does the physical wiring take, and how does that shape determine resilience, cost, and scale? These are not academic classifications. They are the vocabulary you need to design networks that survive reality.
🎯 The two questions every network designer must answer
Network Type
"How big is this network and who controls it?" — LAN vs WAN vs MAN. Scale determines technology choices.
Topology
"What shape is the wiring?" — Bus, Star, Ring, Mesh. Shape determines what breaks, what doesn't, and what it costs.
// CHAPTER 02
Network Types — Classified by Geographic Scope
From the Bluetooth in your ear to the fiber under the Pacific Ocean.
The most fundamental way to classify a network is by geographic scale. Engineers use these terms constantly — in job descriptions, architecture diagrams, vendor docs, and incident reports. Understanding what each acronym actually means (not just the expansion) saves you from confusion in every technical conversation.
Interactive — Network Types
Click any network type to explore its scale, speed, ownership, and real-world examples.
🏠
LAN
Local Area Network
Range
10 m – 1 km (one building)
Speed
1 Gbps – 100 Gbps
Ownership
Single organization or household
Technology
Ethernet (802.3), WiFi (802.11)
The office you work in almost certainly has a LAN. Every laptop connected to WiFi, every printer, every IP phone — all part of the same LAN. Traffic between them never leaves the building.
Real-world examples
Your home WiFiOffice floor networkUniversity computer labCoffee shop WiFiHospital ward network
The Lines Are Blurring — Cloud Changed Everything
These categories were crisp in 1990. Today, they blur in fascinating ways. When your startup team connects via WireGuard VPN to a private subnet on AWS, is that a LAN or a WAN? Technically, it is a WAN traversal (traffic crosses the internet) that behaves exactly like a LAN — same private IP subnet, no NAT, sub-10ms latency. AWS calls this a VPC (Virtual Private Cloud), and it deliberately gives you LAN semantics over WAN infrastructure.
Similarly, when you use SD-WAN (Software-Defined WAN), you are abstracting the physical WAN links (MPLS, broadband, LTE) into a single logical network managed by software. A branch office in Denver and a headquarters in Chicago appear to be on the same "flat" network — but the physical connection might be switching between MPLS and LTE depending on cost and latency. The topology is virtual, not physical.
// REAL-WORLD SCENARIO
Cloudflare operates 300+ data centers in 100+ countries. Between any two Cloudflare data centers, traffic travels over private leased fiber (where available) or their own undersea cable investments. Within each data center, it is a LAN (gigabit Ethernet, millisecond latency). Between data centers in the same city, it is effectively a MAN (fiber, ~1ms). Between continents, it is a WAN (100-200ms). The same organization spans all three types simultaneously — and calls the whole thing "the edge."
When to Use What
LAN
Connecting devices in your home or small office
Everything is local. High speed (Gigabit WiFi/Ethernet), zero WAN cost, you control everything.
MAN or CAN
Connecting multiple office buildings in the same city
Lease dark fiber between buildings, or pay an ISP for a metro Ethernet service. Faster than WAN, cheaper than private fiber for longer distances.
WAN
Connecting offices in different cities or countries
Options: MPLS (private, expensive, low latency), internet + VPN (cheap, variable latency), SD-WAN (best of both worlds).
SAN
Connecting servers to shared storage in a data center
Block-level storage traffic needs dedicated bandwidth and ultra-low latency. General-purpose LAN is too slow and shared.
PAN (Bluetooth) + LAN (WiFi)
Connecting employee phones, laptops, smartwatches
Bluetooth for personal device pairing, WiFi for internet access. Both coexist — Bluetooth at 2.4 GHz, WiFi at 5 GHz.
// CHAPTER 03
Physical Topologies — The Shape of Your Network
How devices are wired together determines what can fail, how fast data travels, and how much it costs.
// REAL-WORLD SCENARIO
Imagine you are designing the electrical system for a new apartment building. Option A: run one wire down the hallway and tap each apartment off it. Cheap, but if the wire breaks anywhere, every apartment goes dark. Option B: run a separate wire from the fuse box to each apartment individually. More cable, but each apartment is independent — one failure never affects another. Option C: run two separate wire paths to each apartment, so even if the main wire fails, a backup takes over. The most expensive, but zero single points of failure. You have just designed a bus, star, and redundant star. Every network topology decision follows exactly this logic.
Physical topology describes how devices are physically wired to each other — the actual shape of the cables. There are six fundamental topologies. Every real-world network is built from some combination of them.
Busshared backbone cable
Starcentral switch hub
Ringtoken passing ring
Mesh (Full)every node connected
Tree3-tier hierarchy
Hybridenterprise mix
Interactive — Topology Explorer
Select a topology to see its structure, strengths, weaknesses, and failure behavior.
⭐Star TopologyEra: 1980s–present
Every device connects to one central hub or switch. No direct device-to-device links. Almost all modern networks use this.
Loading 3D diagram…
// CHAPTER 04
Bus Topology — The Network That Taught Us What Not to Do
Understanding why it was built the way it was, and why it disappeared.
In the early 1980s, a coaxial cable ran through an office building and every computer was physically clamped to it with a vampire tap — a connector that pierced the cable shielding to make contact. This was 10BASE5 (Thick Ethernet), and it was revolutionary. One cable, unlimited devices, no dedicated hardware beyond the cable itself. By 1985, it evolved to 10BASE2 (Thin Ethernet, BNC connectors) which you could wire yourself with cheap coaxial cable.
The fundamental problem was collision domains. Since all devices shared the same wire, only one device could transmit at a time. If two devices transmitted simultaneously, their signals collided and destroyed each other — both had to wait a random interval and retry. This is called CSMA/CD (Carrier Sense Multiple Access with Collision Detection). As devices were added, collisions multiplied, performance dropped. A 10 Mbps bus with 20 devices might only deliver 2-3 Mbps effective throughput.
CSMA/CD — how bus devices took turns
1. Listen: Is anyone transmitting? (Carrier Sense)
2. If yes: wait until channel is free
3. If no: start transmitting your data
4. While transmitting: keep listening (Collision Detection)
5. If collision detected:
a. Stop transmitting immediately
b. Send jam signal (tell everyone there was a collision)
c. Wait a random "backoff" time (exponential backoff)
d. Go back to step 1
6. After 16 failed attempts: give up, report error
Efficiency drops sharply with more devices:
5 devices → ~85% channel efficiency
20 devices → ~40% channel efficiency
50 devices → ~10% channel efficiency
The single biggest failure mode of bus topology was physical: one break, everyone goes down. A cable cut, a bad connector, even a loose BNC terminator at either end — and every device on the bus lost connectivity instantly. There was no alternative path. Network troubleshooting in the bus era involved walking the entire cable run with an ohmmeter looking for a break. Engineers who grew up in this era still flinch at coaxial cable.
✗ Common Mistake — Bus topology is still used in modern networks
You will not build a bus topology LAN today. But you will encounter the concept in two places: (1) exam questions, where understanding bus is the starting point for understanding why star topology became dominant; (2) industrial networks — the CAN bus (Controller Area Network) in every modern car is literally a bus topology. Your car's ECU, ABS controller, airbag system, and infotainment all share a two-wire CAN bus. Industrial settings tolerate bus topology because the devices are few, the cable runs are short, and the environment is controlled. Never design a new office or data center network with bus topology.
// CHAPTER 05
Star Topology — Why Every Network Today Looks Like This
The switch changed everything. Here is why star topology won and how it actually works at scale.
// REAL-WORLD SCENARIO
In 1990, 3Com released the first Ethernet hub — a small box with 8 ports that every device plugged into instead of a shared coaxial cable. Instead of vampire-tapping a single cable running down the hall, you ran a separate cable from each device back to a central hub. Suddenly, adding a new device meant plugging in one cable. Removing a device meant unplugging one cable. A broken cable affected exactly one device. The star topology era had arrived.
Today, virtually every network — from your home WiFi (all devices connect to one router) to Google's data centers (all servers connect to a Top-of-Rack switch) — is a star at its core. The key innovation was replacing the hub with a switch.
Hub vs Switch — A Critical Distinction
Both create a star topology, but they behave completely differently:
🔴 Hub (Layer 1)
Repeats every incoming signal to ALL ports
All devices still share one collision domain
Half-duplex only (can't send and receive at once)
10 Mbps shared among all ports
Everyone sees everyone else's traffic
Dead for new installations (ca. 2000)
🟢 Switch (Layer 2)
Learns MAC addresses, forwards only to correct port
Each port is its own collision domain
Full-duplex (send and receive simultaneously)
Each port gets dedicated bandwidth (1–100 Gbps)
Traffic is private between source and destination
Standard for all modern networks
When data arrives at a switch port, the switch reads the destination MAC address from the Ethernet frame header and looks it up in its MAC address table (also called the CAM table — Content Addressable Memory). If it knows which port that MAC is on, it forwards the frame only to that port. If it does not know yet (no entry in the table), it floods the frame to all ports except the one it came from — and then learns from the response.
Switch MAC learning and forwarding
Switch CAM table (builds up over time):
MAC Address Port VLAN Age
A4:C3:F0:11:22:33 1 10 50s ← Device A on port 1
B8:E8:56:44:55:66 2 10 30s ← Device B on port 2
DC:A6:32:77:88:99 3 20 10s ← Device C on port 3
When a frame arrives (src: A4:C3:F0:11:22:33 → dst: B8:E8:56:44:55:66):
1. Learn: A4:C3:F0:11:22:33 is on port 1 (already known)
2. Look up: B8:E8:56:44:55:66 → port 2
3. Forward: send frame ONLY to port 2
When dst MAC is unknown:
1. Look up: not in table → FLOOD to all ports (except source port)
2. When B replies, learn B's MAC → add to table
3. Future frames to B go only to port 2
Spanning Tree Protocol — Preventing Loops
A star topology with redundant switches creates a problem: loops. If Switch A is connected to Switch B, which is connected to Switch C, which is connected back to Switch A, a broadcast frame would loop forever — a broadcast storm that consumes 100% of bandwidth and crashes the network within seconds.
STP (Spanning Tree Protocol — IEEE 802.1D) prevents this by logically blocking redundant paths. STP elects a root bridge, calculates the shortest path from every switch to the root, and puts redundant paths in blocking state. If the active path fails, STP unblocks an alternative path — but this takes 30–50 seconds with classic STP. Modern networks use RSTP (Rapid Spanning Tree — 802.1w) which converges in 1–2 seconds, or port channel/LAG aggregation which bonds multiple links without needing STP at all.
💡 Why your network switch restarts slowly after a power cut
When a switch boots, it runs STP discovery. For 30 seconds (classic STP) or 4 seconds (RSTP), ports are in a listening/learning state — they are not yet forwarding traffic. This is the STP convergence delay. If you plug in a laptop and the network seems dead for 4-30 seconds before coming up, you are watching STP run. This is also why PortFast is configured on access ports — it bypasses STP delay for ports that connect to end devices (not other switches), bringing them up instantly.
// CHAPTER 06
Ring Topology — Deterministic and Resilient When Done Right
Token Ring is dead, but ring topology lives on in backbone networks carrying national telephone traffic.
Ring topology was IBM's answer to Ethernet's collision problem in 1984 — Token Ring (IEEE 802.5). Instead of random collision detection, a special packet called a token circulated around the ring. Only the device holding the token was allowed to transmit. Deterministic access: no collisions, equal fairness, predictable performance. But Token Ring was slow to expand (adding a device required breaking the ring), expensive (IBM's MAU — Multistation Access Unit — cost a fortune), and fundamentally lost the market to switched Ethernet by 1998.
Token Ring died. Ring topology did not. The world's telephone networks and long-haul internet backbone still use ring topology in the form of SONET/SDH (Synchronous Optical Networking / Synchronous Digital Hierarchy) — the standard physical layer for carrier networks since the 1990s.
Dual-Ring Self-Healing — How SONET Achieves 99.999% Uptime
The weakness of a simple ring — one break = total failure — is solved by running two rings in opposite directions simultaneously. This is the SONET/SDH BLSR (Bidirectional Line-Switched Ring) architecture.
SONET dual-ring self-healing (in under 50ms)
Normal operation: traffic flows clockwise on working ring
Node A ──→──→──→──→ Node B
↑ ↓
Node D ←──←──←──←── Node C
(protection ring flows counter-clockwise, idle)
Cable cut between B and C:
Node A ──→──→──→──→ Node B
↑ ↓ ← traffic "wraps" here
Node D ←──←──←──←── Node C
↑ ← traffic wraps here ↓
← now flowing counter-clockwise on protection ring →
Result: all traffic continues in under 50 milliseconds.
This is why fiber cuts rarely cause noticeable telephone outages.
The 50ms protection switching time of SONET/SDH is a standard specification — the ITU requires it for carrier-grade networks. This is tight enough that voice calls don't experience audible disruption. For comparison, a human typically does not notice audio interruptions under 200ms. Modern networks use OTN (Optical Transport Network) which extends SONET concepts with more capacity and better overhead management.
// CHAPTER 07
Mesh Topology — Why the Internet Never Goes Down
The internet is a global partial mesh of 80,000 autonomous systems. Here is how routing works in a mesh.
// REAL-WORLD SCENARIO
On October 4, 2021, Facebook's entire global network went offline for 6 hours. Their DNS servers became unreachable, their BGP routes were withdrawn, and 3.5 billion users couldn't access Facebook, Instagram, or WhatsApp. But the rest of the internet worked perfectly. You could still access Google, YouTube, and Netflix without interruption. This is mesh topology's greatest property: Facebook's portion of the internet mesh failed, but the mesh routed around it. The failure was contained.
The internet is the world's largest mesh network — specifically, a partial mesh of ~80,000 Autonomous Systems (ASes) connected by BGP peering relationships. No single AS connects to every other AS (that would be a full mesh requiring billions of physical links). Instead, each AS connects to a few well-chosen peers, and BGP propagates reachability information so every AS can eventually reach every other.
Full Mesh vs Partial Mesh
Mesh link count math
Full mesh links = n × (n - 1) / 2
4 nodes → 6 links (feasible)
10 nodes → 45 links (expensive)
20 nodes → 190 links (very expensive)
50 nodes → 1,225 links (impractical)
Partial mesh: each node connects to 2-4 strategic peers
→ Reduces links while maintaining redundancy
→ Used by: the internet, corporate WANs, data center spines
In data centers, the dominant topology today is spine-leaf — a two-tier partial mesh. Every leaf switch (ToR — Top of Rack) connects to every spine switch. No leaf connects directly to another leaf. This creates equal-cost multi-path routing (ECMP) — traffic from any server to any other server takes exactly 2 hops through the fabric, and there are always multiple equal-cost paths to load-balance across.
Spine-leaf topology (modern data center)
Spine 1 Spine 2 Spine 3 Spine 4
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─┼─┼─┼──────┼─┼─┼─┘ └─┼─┼─┼──────┼─┼─┘
│ │ │ │ │ │ │ │ │ │ │
Leaf 1 Leaf 2 Leaf 3 Leaf 4
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
Servers Servers Servers Servers
Every leaf connects to every spine (partial mesh between tiers)
Traffic from Server A to Server B: A → Leaf 1 → any Spine → Leaf 3 → B
Always 2 hops regardless of which server pair. Always ECMP load balanced.
Used by: Google, Facebook, AWS, Azure, Netflix, every hyperscale data center.
📐 Why Clos networks are mathematically elegant
The spine-leaf topology is a modern implementation of the Clos network, invented by Charles Clos at Bell Labs in 1953 for telephone switching. Clos proved mathematically that a 3-stage non-blocking switching fabric can be built using smaller switches — no single switch needs to handle all traffic. Google's data center networks, Facebook's fabric, and AWS's VPC networking all implement variations of Clos. A 50-year-old mathematical theorem is running the internet.
// CHAPTER 08
Tree Topology — The Enterprise Network Standard
How Fortune 500 companies wire tens of thousands of devices across dozens of floors and buildings.
When a company needs to connect 5,000 employees across a 20-floor office building, star topology at one level is not enough. You need a hierarchy — a tree of star networks, where each level aggregates the bandwidth from the level below.
The Three-Tier Enterprise Model
Core Layer
The backbone. Connects all distribution switches and provides access to the internet/WAN. High-speed, low-latency switches (40-400 Gbps per port). Redundant core switches in pairs.
Aggregates access layer traffic, applies routing between VLANs, enforces QoS policies, provides inter-VLAN routing. One distribution switch per zone (building, campus wing, department).
4–20 switches (Cisco Catalyst 9300)
Access Layer
Directly connects end devices (laptops, phones, printers, IP cameras). One switch per room or cluster of rooms. VLAN assignment happens here. PoE for powering IP phones and cameras.
20–200 switches (Cisco Catalyst 9200)
The critical insight of the three-tier model is traffic locality. Most office communication stays within a department — emails, file shares, printers. By organizing the tree so that each department is under the same distribution switch, most traffic never needs to go higher than the distribution layer. Only inter-department or internet traffic climbs to the core. This is why enterprise networks can handle 10,000 devices with only a handful of core switches.
Collapsed Core — For Smaller Networks
For networks under ~500 devices (small offices, branch offices), the distribution and core layers merge into a single collapsed core layer. Two high-performance switches handle everything that distribution and core would normally split. This reduces hardware cost while maintaining the essential isolation that access layer star topology provides.
Collapsed core design (small office)
[Core/Distribution Switch A] ←→ [Core/Distribution Switch B]
╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
Floor1 Floor2 Floor3 Floor4 Floor5 Floor6 Floor7 Floor8
(Access switches with end devices)
Both core switches active (HSRP/VRRP for gateway redundancy)
STP or port channels prevent loops between core switches
If one core switch fails, HSRP failover in ~3 seconds
// CHAPTER 09
Hybrid Topology — What Real Networks Actually Look Like
No production network of any size is a single pure topology. They are all hybrids.
Pure topologies exist in textbooks. Real networks combine multiple topologies at different scales, choosing the right shape for each requirement. Understanding this is what separates someone who can recite topology names from someone who can design real infrastructure.
A Real Enterprise Network Architecture
Hybrid topology: real Fortune 500 network (simplified)
Personal devices:
PAN (Bluetooth): employee phone ↔ headset, mouse, keyboard
Building LAN (Star + Tree):
Access switches (Star) → Distribution switches (Tree) → Core switches
Between buildings on campus (Star + Partial Mesh):
Each building's core switch connects to 2+ campus core switches
(partial mesh for redundancy, star within each building)
Between cities (Ring + Partial Mesh WAN):
SONET/SDH dual rings carry voice and critical traffic
MPLS partial mesh carries data between city offices
To the internet (Partial Mesh):
Dual ISP connections for redundancy
BGP peering with multiple upstream providers
To cloud (Hybrid WAN + VPC):
AWS Direct Connect: private fiber to AWS (bypasses internet)
VPN tunnels: encrypted overlay on top of internet WAN
Inside AWS VPC: virtual star/tree topology (subnets = segments)
Storage (SAN):
Fibre Channel SAN fabric in data center (dual fabric for HA)
All database servers connect to both SAN fabrics simultaneously
Notice how each layer uses the appropriate topology: star for end-device connections (simple, manageable), tree for building-scale aggregation (hierarchical, scalable), partial mesh for building-to-building (redundant), ring for long-haul backbone (self-healing), and mesh peering for internet connectivity (maximum resilience).
// CHAPTER 10
Modern Topology Trends — How Networks Are Evolving
Software-defined networking, the cloud, and intent-based networking are changing how topology decisions are made.
SD-WAN — Topology as Software
SD-WAN (Software-Defined Wide Area Network) abstracts the physical WAN topology from the logical network. Instead of manually configuring MPLS circuits between offices, SD-WAN creates a virtual full mesh — any branch can talk directly to any other branch over whatever physical links are available (MPLS, broadband, 4G/5G, satellite). The SD-WAN controller decides in real-time which physical path each traffic flow should take based on latency, packet loss, and cost.
A branch office in Tulsa might send Zoom video directly to a branch in Charlotte via broadband (low cost, acceptable latency), while SAP traffic goes via MPLS (guaranteed QoS, predictable latency), and backup data goes via LTE (expensive per MB, but available when MPLS is down). The topology is virtual, dynamic, and policy-driven. Cisco Viptela, VMware VeloCloud, and Fortinet Secure SD-WAN are the major vendors.
Leaf-Spine Goes Mainstream
The three-tier enterprise model (core/distribution/access) was designed for north-south traffic — client to server, up and down the hierarchy. Modern workloads are increasingly east-west — server to server, microservice to microservice, container to container. The three-tier model is inefficient for east-west: traffic from any server to any other server has to climb to the core and back down.
Leaf-spine (spine-leaf) topology solves this: every server is always exactly two hops from every other server, regardless of which leaf they are on. As workloads shift from client-server to microservices, leaf-spine is replacing three-tier even in enterprise data centers. If you are designing a new data center today, leaf-spine is the answer.
Intent-Based Networking (IBN)
Traditional networks are configured device by device, command by command. Intent-Based Networking lets you declare what you want ("all HR computers should not be able to talk to engineering servers") and software translates that into thousands of ACL rules, VLAN assignments, and routing policies automatically. Cisco DNA Center and Juniper Apstra implement this concept. The topology still matters — but you are increasingly describing intent rather than configuring individual devices.
// CHAPTER 11
Choosing the Right Topology — A Decision Framework
Real-world topology decisions are driven by cost, scale, availability requirements, and traffic patterns.
Interactive — Which Topology Should You Use?
Answer three questions and get a topology recommendation.
1. How many devices do you need to connect?
2. How critical is uptime?
3. What is your budget?
The Five Questions to Ask Before Any Topology Decision
1. What is the failure blast radius?
If this component fails, how many users are affected? Bus = everyone. Star port = one user. Core switch = many. Design so the blast radius matches the component's MTBF (Mean Time Between Failures). More reliable components can have larger blast radii.
2. What is the traffic pattern?
North-south (client → server) = three-tier works well. East-west (server → server) = leaf-spine is better. Mixed = hybrid design. Getting this wrong means you over-provision expensive high-tier links while low-tier links sit idle.
3. What is the growth rate?
A network that doubles every year needs topology that can add capacity incrementally. Leaf-spine is ideal — add leaf switches for more devices, add spine switches for more bandwidth. Bus topology can't scale at all. Full mesh becomes impractical past ~10 nodes.
4. What are the latency requirements?
Every additional hop adds latency. Latency-sensitive applications (trading, real-time gaming, VoIP) should be wired with as few hops as possible. Leaf-spine's fixed 2-hop path is predictable. Three-tier can have 4-6 hops across segments.
5. What is the budget?
Full mesh is the most resilient and most expensive. Bus is the cheapest and most fragile. Most organizations land somewhere in the middle — redundant star or partial mesh — spending money on redundancy proportional to the value of the data traversing it.
// CHAPTER 12
Failure Analysis — What Breaks in Each Topology
The best way to understand a topology is to imagine all the ways it can fail.
Every topology has a characteristic failure mode. Knowing these is essential for both design and troubleshooting.
Topology
Single Link Fail
Single Node Fail
Multiple Failures
Self-Healing?
Bus
💥 All down
💥 All down
💥 All down
❌ No
Star (hub)
⚡ 1 device
💥 All down
⚡ Partial
❌ No
Star (switch)
⚡ 1 device
💥 Segment
⚡ Partial
⚠️ With redundant switch
Ring (single)
💥 All down
💥 All down
💥 All down
❌ No
Ring (dual-SONET)
✅ No impact
✅ Wraps in <50ms
⚡ Depends
✅ Yes (<50ms)
Partial Mesh
✅ Reroutes
✅ Reroutes
⚡ Depends
✅ Yes (BGP ~minutes)
Full Mesh
✅ Reroutes
✅ Reroutes
✅ Very resilient
✅ Yes
Tree (3-tier)
⚡ Segment
💥 Zone
⚡ Partial
⚠️ With redundant core
Leaf-Spine
✅ ECMP reroutes
⚡ Partial BW loss
⚡ Depends
✅ Yes (ECMP)
The pattern is clear: resilience requires redundant paths, and redundant paths require mesh characteristics — either a partial mesh between critical nodes, or a redundant star where two switches both connect to all devices. The most cost-effective approach for most enterprise networks is redundant star topology — two switches in every critical position, connected to each other, with devices dual-homed where necessary.
// CHAPTER 13
Common Misconceptions That Will Get You in Trouble
These are the assumptions that cause real outages, failed interviews, and poorly designed networks.
✗ Common Mistake — A hub and a switch are the same thing
Hubs and switches both create a star topology, but they behave completely differently. A hub (Layer 1) repeats every incoming signal to all ports — every device sees every other device's traffic, all devices share one collision domain, and bandwidth is shared. A switch (Layer 2) learns MAC addresses and forwards frames only to the correct port — each port gets dedicated full-duplex bandwidth, no collisions, and traffic is private between source and destination. A hub with 10 devices sharing 100 Mbps gives each device about 5–10 Mbps effective throughput due to collisions. A switch gives each device the full 100 Mbps dedicated. Hubs have not been sold for new deployments since around 2000.
✗ Common Mistake — Star topology has no single point of failure
Star topology has one critical single point of failure: the central switch. If the switch dies, every device connected to it loses connectivity — even though no individual cable has failed. This is often misunderstood because star topology correctly isolates individual device failures (one bad cable = one device offline). To eliminate the SPOF at the switch level, you need redundant switches (two switches connected to each other, with all critical devices dual-homed to both) or a switch stack (multiple physical switches acting as one logical unit). High-availability environments always deploy redundant core switches, not single switches.
✗ Common Mistake — LAN is always faster than WAN
LAN technologies (Gigabit Ethernet, 10GbE WiFi 6) are typically faster than consumer WAN connections, but this is not universal. A direct 400 Gbps fiber WAN link between two data centers can vastly outperform a congested WiFi LAN sharing 300 Mbps among 50 devices. In cloud environments, your "LAN" might be a virtual network inside AWS with 10–25 Gbps between instances — while some enterprise WAN links (MPLS, leased fiber) deliver higher throughput than many office LANs. The defining characteristic of LAN vs WAN is geographic scope and ownership, not speed.
✗ Common Mistake — Ring topology is completely dead
Token Ring (IBM's LAN implementation) is dead — no enterprise uses Token Ring for local networks. But ring topology itself is very much alive in backbone networks. SONET/SDH rings carry national telephone traffic and internet backbone links in every country. The dual counter-rotating ring with automatic 50ms protection switching makes it ideal for carrier infrastructure where continuous operation is mandatory. When your ISP's backbone fails and fails back in under a minute, SONET ring protection is likely responsible. Confusing "Token Ring is dead" with "ring topology is dead" is a common exam error.
✗ Common Mistake — Mesh topology means every device connects to every other device
Full mesh (every node connects to every other node) is one specific type of mesh — and it is rarely used because the link count grows as n×(n-1)/2 (10 nodes = 45 links, 100 nodes = 4,950 links). Most real-world mesh networks are partial meshes — each node connects to a strategic subset of others, chosen for redundancy and traffic patterns. The internet itself is a partial mesh of 80,000 Autonomous Systems. Data center spine-leaf is a structured partial mesh (every leaf connects to every spine, but leaves don't connect to each other). When someone says "we use mesh topology," they almost always mean partial mesh.
✗ Common Mistake — Three-tier network design is always the right answer for enterprise
Three-tier (core/distribution/access) was the enterprise standard for north-south traffic in the client-server era. It becomes a bottleneck for east-west traffic (server-to-server, microservice-to-microservice) — all east-west traffic must climb to the core and back down. Modern virtualized data centers and containerized workloads generate primarily east-west traffic. For these environments, leaf-spine is the correct architecture: always exactly 2 hops, always ECMP load-balanced, scales linearly by adding switches. Three-tier for a new data center design in 2025 is an outdated choice; three-tier for a campus LAN serving end-user devices is still appropriate.
// CHAPTER 14
Interview Questions — Test Your Understanding
From entry-level definitions to senior architecture discussions.
Beginner
What is the difference between LAN, WAN, and MAN?
A LAN (Local Area Network) covers a single location — one building or floor — at high speeds (1–100 Gbps) under single-organization control. A WAN (Wide Area Network) spans cities, countries, or continents, typically crossing multiple organization boundaries and operating at variable speeds over leased or public infrastructure. A MAN (Metropolitan Area Network) sits between them — city-scale, typically ISP-operated fiber, connecting multiple buildings or campuses within a metropolitan area. The practical difference for engineers: LAN traffic is cheap and fast (you own the infrastructure), WAN traffic is expensive and variable (you're paying per megabit), MAN is in between.
Beginner
Why is star topology preferred over bus topology?
Star topology isolates failures — if one device's cable fails, only that device is affected. In bus topology, any fault on the shared cable takes every device offline simultaneously. Star also eliminates collision domains when using switches (each port is dedicated, full-duplex bandwidth). Bus has one shared collision domain — performance degrades as devices increase due to CSMA/CD collisions. Star is easier to troubleshoot (isolate to one port), easier to expand (just plug in), and enables centralized monitoring. The only advantage bus ever had was cost (one cable), but with modern switch prices under $5/port, that advantage disappeared long ago.
Intermediate
What is Spanning Tree Protocol and why is it needed?
STP (IEEE 802.1D) prevents Layer 2 switching loops. When you connect two switches together via two links for redundancy, you create a loop — a broadcast frame would circulate forever, consuming all bandwidth (a broadcast storm). STP prevents this by electing a root bridge, calculating the shortest path tree from every switch to the root, and putting redundant links into blocking state (they carry no traffic). If an active link fails, STP unblocks a blocked link, restoring connectivity — but classic STP takes 30-50 seconds to converge. RSTP (802.1w) reduced this to 1-2 seconds. Modern networks increasingly replace STP with port-channel/LAG bundling (which bonds multiple links without needing STP) or with routed access (running Layer 3 all the way to access switches, eliminating Layer 2 loops entirely).
Intermediate
When would you choose mesh topology over tree topology?
Choose mesh when redundancy requirements exceed cost constraints. Specifically: (1) East-west traffic dominates — if most communication is server-to-server rather than client-to-server, the hierarchy of tree topology forces inefficient paths (up to core, back down). Leaf-spine mesh provides equal-cost 2-hop paths between any pair. (2) High availability is critical — a single core switch failure in tree topology can affect thousands of users. In partial mesh/leaf-spine, losing one spine reduces bandwidth but never isolates nodes. (3) Scale beyond 500-1000 devices — three-tier tree topology becomes unwieldy and over-subscribed at large scale. Leaf-spine scales linearly by adding switches. Choose tree when budget is constrained, traffic is north-south, or the network is under 500 devices.
Senior
Explain spine-leaf topology and why it replaced the three-tier model in data centers.
The three-tier model (core/distribution/access) was designed for client-server workloads where most traffic flows vertically (north-south: client → server). Modern microservices, container orchestration (Kubernetes), and distributed storage (Ceph, HDFS) generate massive east-west traffic (server → server). In a three-tier design, east-west traffic between two servers on different access switches must traverse up to 6 hops and compete for bandwidth at every aggregation point. Spine-leaf guarantees exactly 2 hops (source leaf → any spine → destination leaf) for all east-west traffic, with ECMP load balancing across all spines simultaneously — no single bottleneck. Adding capacity is linear: add a leaf for more ports, add a spine for more bandwidth. The design is non-blocking when properly provisioned — spine count × uplinks-per-leaf = total fabric bandwidth. Additionally, spine-leaf uses Layer 3 routing (BGP or OSPF/ECMP) rather than Layer 2 switching, eliminating STP convergence delays and enabling faster failure recovery via routing protocol reconvergence (~1 second with BFD).
PhD
How does the internet's mesh topology relate to BGP's path vector algorithm, and what are the implications for routing policy?
The internet is a partial mesh of ~80,000 Autonomous Systems (ASes) connected by BGP peering relationships. BGP is a path vector protocol: each AS advertises not just reachability (I can reach 8.8.0.0/16) but the complete AS path (reach it via AS15169, AS1299, AS3356). This prevents routing loops (an AS that sees its own AS number in a path discards it). The partial mesh structure creates several policy-relevant properties: (1) Valley-free routing: ASes enforce economic policies via BGP communities and local preference — typically, customer routes are preferred over peer routes, which are preferred over provider routes. An AS will never carry traffic from one upstream provider to another (that would be transit they're not paid for). This constraint means not all mathematically shortest paths are actually taken. (2) BGP convergence under failure: when a link fails, BGP must propagate withdrawal messages through the mesh. Convergence time depends on mesh density and timer configuration — typically 30 seconds to several minutes for global propagation, far slower than SONET's 50ms but adequate for the internet's design goals. (3) Policy expressiveness vs. optimality: because BGP is policy-driven, the internet may route around a mathematically shorter path to satisfy business relationships. This is intentional and foundational to the internet's economic structure. (4) Partition resilience: the AS mesh is designed with enough redundancy that no single AS failure disconnects the global internet — but individual prefixes can become unreachable if their originating AS or their upstreams all simultaneously fail, as seen in Facebook's 2021 outage where their BGP routes were withdrawn and they became unreachable from the global mesh.
🎯 Key Takeaways
✓Network type (LAN/WAN/MAN/PAN/SAN) describes geographic scope and ownership. LAN = one location, high speed, you own it. WAN = multi-city or global, you pay someone else for it.
✓Physical topology (Bus/Star/Ring/Mesh/Tree) describes wiring shape and determines resilience, cost, and scale. These are independent axes — a WAN can use ring topology internally.
✓Bus topology is dead for LANs — one cable break kills everyone. It survives only in embedded/industrial contexts (CAN bus in cars).
✓Star topology (with switches) dominates because each device has dedicated bandwidth, failures are isolated, and it is easy to manage. Switches forward only to the correct port using MAC address tables.
✓STP prevents broadcast storms in redundant star topologies by blocking redundant links. RSTP converges in ~1 second. Modern designs avoid STP via routing or port-channel aggregation.
✓Mesh topology (full or partial) provides the highest resilience — multiple paths mean routing around failures. The internet is a global partial mesh. Data center spine-leaf is a structured partial mesh.
✓Three-tier (core/distribution/access) is the enterprise LAN standard for north-south traffic. Leaf-spine is the data center standard for east-west traffic — always exactly 2 hops, always ECMP load balanced.
✓Real networks are always hybrid — star within buildings, tree across floors, partial mesh between buildings, ring or mesh for backbone, VPC/SD-WAN for cloud connectivity.
Share
Discussion
0
Have a better approach? Found something outdated? Share it — your knowledge helps everyone learning here.