AP Networking 3.2: Creating a Network - Switching and Topologies

AP Networking 3.2: Creating a Network - Switching and Topologies

Data crossing a segmented LAN pass three checkpoints: the host decides local-or-not with its subnet mask, the switch forwards by its MAC address table, and the router forwards by its routing table. Learn all three lookups, the four ways to segment, and how to pick star, mesh, or hybrid for stated constraints.

This is Topic 3.2 of AP Networking Unit 3, where the Game Day tournament network gets built. Topic 3.1 chose the devices; now you wire them together and trace a frame from a console on the gym floor to the scoring server two segments away. That trace, and the topology trade-offs behind it, is what gets tested.

What a segmented network is

A segmented network divides devices into groups, each with its own range of IP addresses. The Game Day venue uses four: 10.30.10.0/24 for player consoles, 10.30.20.0/24 for judges and scoring, 10.30.30.0/24 for streaming and production, and 10.30.40.0/24 for spectator Wi-Fi. Segments separate user types, functions, or resources, and pay off in performance (each segment carries only its own chatter), management, and security (a spectator phone cannot reach the scoring server directly). Segmentation can be physical, built from hardware, or logical, built from software configuration.

How data travel: the three lookups

Every frame crossing the venue meets the same three decisions. Memorize them as a chain.

  1. The host decides: local or not. The packet header carries source IP, destination IP, and routing fields. The sender compares its own IPv4 address and subnet mask against the destination. Same segment: address the frame to the destination's MAC. Different: send it to the default gateway, the router.
  2. The switch forwards by MAC. It looks the destination up in its MAC address table and sends the frame out exactly the right port. Unknown destination or broadcast: flood every port except the arrival port.
  3. The router forwards by IP. It matches the destination IP against its routing table, picks the segment, and hands the packet to a switch on that segment for final delivery.

Worked example: console to scoring server

Console 10.30.10.21 (mask 255.255.255.0) reports results to the scoring server at 10.30.20.9. With that mask the first three octets must match to be local; 10.30.10 versus 10.30.20 do not. So the frame goes to the gateway at 10.30.10.1, the router matches 10.30.20.0/24 in its routing table, and the scoring-room switch delivers the packet to the server's MAC. The local case: the same console pings the scoreboard at 10.30.10.9. The octets match, so the frame goes straight to the scoreboard's MAC through the pod switch. The gateway never sees it.

Inside the switch: the MAC address table

A switch is not a splitter. It learns which MAC lives on which port from the source address of every arriving frame, then forwards by table lookup. A pod switch mid-tournament:

Port MAC address Device
2 B8-27-EB-70-4C-11 Console 7
4 00-1B-44-11-3A-B7 Scoreboard
6 D0-37-45-9C-88-02 Casters laptop

Three frames, three behaviors:

  • Known unicast. A frame from port 2 addressed to 00-1B-44-11-3A-B7 exits port 4 only.
  • Unknown unicast. A destination not in the table floods out every port except the arrival port. When the destination replies, the switch learns its port and returns to single-port delivery.
  • Broadcast. A frame to FF-FF-FF-FF-FF-FF, like an ARP request or a DHCP discover, exits every port except the arrival port, every time.
Why this matters: broadcasts stop at the segment boundary. Forty spectator phones broadcasting on their own segment never cost the scoring room a single frame (EK 3.2.B.1).

Inside the router: the routing table

The router is the only device that moves packets between segments, and it does it with a routing table: a list of possible routes. It compares each arriving packet's destination IP against the table entries, finds the segment it belongs on, and forwards it to a switch on that segment. The Game Day table is short: four connected segments plus a default route to the internet uplink. Unit 4 adds multi-hop tables; the lookup logic never changes.

Four ways to segment a network

Devices, applications, and services get grouped by sensitivity, access requirements, and traffic needs. Separating guests, IoT devices, workstations, and internal services cuts broadcast congestion and limits lateral movement.

Method How it works Use it when
Physical segmentation Separate switches, routers, or cabling build isolated subnetworks Maximum isolation is required (the scoring room). Costs more, strongest separation.
VLANs Ports on one managed switch are assigned to different virtual LANs Groups share hardware but need separate traffic: consoles, headsets, printers on one switch.
Subnetting One large network divided into smaller logical IP ranges Firewall enforcement between IP groups, broadcast control, or organized addressing.
Multiple SSIDs Separate wireless names, each mapped to its own VLAN or subnet Wireless user groups need separate access: staff Wi-Fi and spectator Wi-Fi.

These stack. The spectator network is a separate SSID on its own VLAN and subnet; the scoring room is physically separate on top of that. Real designs mix methods by zone.

Star, mesh, hybrid: choosing a topology

Topology is how devices connect and how traffic flows, chosen on reliability, cost, and ease of maintenance. Modern networks use star, mesh, and hybrid; bus and ring are generally avoided for their limited fault tolerance and scalability.

Factor Star Mesh
Layout Every node through one central switch Every node linked directly to every other
Reliability Nodes independent, but the central switch is a single point of failure Highest fault tolerance: multiple paths survive a failed link
Cost Cost-effective: minimal cabling and hardware Expensive: connections grow fast per added node
Maintenance Easy to install, scale, troubleshoot; fits limited support Complex to install and maintain; wants dedicated support

Hybrid combines the two, and large LANs almost always land here: star inside each zone where cheap and simple wins, mesh across the core links where one failure cannot take the network down. Game Day is a textbook hybrid: star pods, star scoring room, full mesh between the four zone switches and the production rig, because the finals cannot go dark over one failed cable.

Exam habit: never name a topology without the constraint it satisfies. "Mesh, because any single core link may fail" earns credit; "mesh, because it is the most reliable" does not.

Practice: Topology Lab

Warm up with three sample questions, then work the cases: constraints first, then the MAC table.

Three free sample questions

1. A judge's laptop at 10.30.20.14/24 sends to the scoring server at 10.30.20.200. Gateway or direct?

Show answer

Direct. Both are on 10.30.20.0/24, so the frame goes straight to the server's MAC through the scoring-room switch (EK 3.2.A.2).

2. A frame arrives on port 2 addressed to a MAC that is not in the switch's table. What happens?

Show answer

The switch floods it out every port except port 2, then learns the destination's port from its reply (EK 3.2.A.2).

3. The pods need cheap, swappable connections; the core links must survive a failure. One topology for the venue?

Show answer

Hybrid: star inside each pod, mesh across the core. That cost-reliability balance is what hybrid is for (EK 3.2.C.4).

Now the full case set, shuffled every run so you reason from the constraints and the table, not the order.

AP Networking - Unit 3 - Topic 3.2

Topology Lab

Two steps per zone: pick the topology that satisfies every stated constraint, then read the zone switch's MAC address table and predict exactly which ports a frame exits.

Case 1

    Step 1. Which topology satisfies all of the constraints?

    Solved: 0 / 0 (both steps right)

    AP is a trademark of the College Board, which was not involved in the production of, and does not endorse, this resource.

    Evaluating an AI-generated network design

    AI tools will happily generate a topology, a segmentation strategy, and a device list for the whole venue. The output is only as good as the prompt: state the traffic flow, security policies, redundancy needs, and physical layout constraints. Prompt "design a network for a gaming tournament in a gym" and you get a design flawed by omission, often one flat network with spectators and scoring side by side.

    Even with a good prompt, audit the output against the requirements before implementing anything. AI designs fail three characteristic ways: a missing segment (no guest network), requirements only partially addressed (redundant core, nothing isolating spectators), and over-engineering that works but is unjustified, like a full mesh between twelve consoles that only needed a star. AI is genuinely useful for ideas and for flagging concerns you missed. It proposes; you verify against the needs, goals, and constraints. That division of labor is a graded skill.

    Key terms

    Segment
    A group of devices sharing an IP address range, separated for performance, management, and security.
    Default gateway
    The router address a host sends to when the destination is on a different segment.
    Subnet mask
    The pattern a host compares against the destination address to decide same-segment or not.
    MAC address table
    The switch's learned map of which MAC address lives on which port.
    Flooding
    Sending a frame out every port except the arrival port; for unknown destinations and broadcasts.
    Routing table
    The router's list of routes, matched against destination IPs to pick the segment.
    VLAN
    Logical separation of devices on shared switch hardware, assigned per port.
    Star topology
    Every node through one central switch; cheap and easy, but a single point of failure.
    Mesh topology
    Every node linked to every other; high fault tolerance, high cabling cost.
    Hybrid topology
    Star and mesh combined to balance reliability and cost across zones.
    PREMIUM

    Full quiz, saved progress, and the practice bank

    Unlock the full 8-question Topic 3.2 quiz, every Topology Lab case, and saved progress that reports to your class gradebook. Ad-free.

    Get AP Networking premium

    Frequently asked questions

    How does a device know whether to use the default gateway?

    It compares its IP address and subnet mask with the destination. Network portions match: local, straight to the destination MAC. No match: send to the default gateway.

    What is a MAC address table on a switch?

    A learned list of which MAC address is reachable through which port. The switch builds it from source addresses and uses it to forward each frame out exactly one port.

    What does a switch do with a destination it does not know?

    It floods the frame out every port except the one it arrived on. When the destination replies, the switch learns its port and returns to single-port delivery.

    What is the difference between a switch and a router?

    A switch forwards frames inside one segment using MAC addresses. A router forwards packets between segments using IP addresses and its routing table.

    Why segment a network at all?

    Performance, management, and security: each segment carries only its own broadcast traffic, and a compromised device can only reach its own segment directly.

    When should I use a VLAN instead of separate hardware?

    Use VLANs when groups share a switch but need separate traffic: no new hardware needed. Use separate physical hardware when maximum isolation is required, and accept the cost.

    What is the best network topology?

    There is no universal best. Star wins on cost and easy maintenance, mesh wins on fault tolerance, hybrid mixes them. The right answer names the constraint.

    Why are bus and ring topologies avoided now?

    Limited fault tolerance and poor scalability: one break can take down the chain. Modern designs use star, mesh, or hybrid instead.

    Is mesh always worth it for reliability?

    No. Mesh buys fault tolerance with cabling, hardware, and management cost. If uptime is not the binding constraint, star or hybrid is the better engineering answer.

    Can I trust an AI-generated network design?

    Treat it as a draft. Give it complete requirements, then audit the output for missing segments, half-met requirements, and unneeded cost before implementing anything.

    AP is a trademark of the College Board, which was not involved in the production of, and does not endorse, this resource.

    Get in Touch

    Whether you're a student, parent, or teacher — I'd love to hear from you.

    Just want free AP CS resources?

    Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

    Typically responds within 24 hours

    Message Sent!

    Thanks for reaching out. I'll get back to you within 24 hours.

    🏫 Welcome, fellow educator!

    I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

    Email

    [email protected]

    📚

    Courses

    AP CSA, CSP, & Cybersecurity

    Response Time

    Within 24 hours

    Prefer email? Reach me directly at [email protected]