Skip to content
Computer Science · 12th Grade · Network Architecture and Cryptography · Weeks 28-36

Routing and Switching

Students explore how routers and switches direct network traffic, understanding concepts like IP addressing and subnetting.

Common Core State StandardsCSTA: 3B-NI-03CCSS.ELA-LITERACY.RST.11-12.3

About This Topic

Routing and switching are the mechanisms that direct network traffic from its source to its destination. Switches operate at the local network level, using MAC addresses to forward frames only to the specific device that needs them , rather than broadcasting to every device on the segment. Routers operate between networks, using IP addresses and routing tables to determine the best path for packets across multiple interconnected networks. For 12th graders, understanding this distinction is essential for making sense of how large, complex networks function without collapsing under their own traffic.

In the U.S. K-12 context, CSTA standard 3B-NI-03 asks students to evaluate how data is transmitted and how networks handle routing across interconnected systems. Concepts like subnetting (dividing a large network into smaller logical segments) and CIDR notation help students understand how billions of devices maintain distinct addresses in an increasingly crowded address space. IPv4 exhaustion and the transition to IPv6 provide a real-world motivation for understanding why IP addressing design matters.

Active learning works well here because the routing decision process , consulting a table, choosing the best path, forwarding a packet , maps neatly onto a role-play or card-based simulation that makes the logic tangible before students work with actual networking tools.

Key Questions

  1. What happens when a critical node in a global network fails and how is traffic rerouted?
  2. Differentiate between the functions of routers and switches in a network.
  3. Design a simple network topology and explain how data would be routed between devices.

Learning Objectives

  • Analyze the decision-making process a router uses to forward a packet based on its routing table.
  • Compare and contrast the primary functions of network switches and routers in directing data traffic.
  • Design a simple network topology, illustrating how IP addresses and subnet masks facilitate communication.
  • Calculate appropriate subnet masks and network addresses for a given set of network requirements.
  • Evaluate the impact of a critical node failure on network traffic and explain potential rerouting strategies.

Before You Start

Introduction to Computer Networks

Why: Students need a foundational understanding of what a network is, including concepts like nodes, links, and basic data transmission before learning how traffic is directed.

Binary Number System

Why: Understanding binary is crucial for comprehending IP addresses and subnet masks, which are represented in binary form.

MAC Addresses

Why: Knowledge of MAC addresses is necessary to differentiate the function of switches, which operate at Layer 2 using MAC addresses, from routers.

Key Vocabulary

IP AddressA unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It identifies the host and its network.
Subnet MaskA number that defines the range of IP addresses available within a network. It separates the network portion from the host portion of an IP address.
RouterA networking device that forwards data packets between computer networks. Routers perform traffic directing functions on the Internet.
SwitchA networking device that connects devices together on a computer network, using packet switching to receive, process, and forward data to the destination device.
Routing TableA data table stored in a router or networked computer that lists the routes to particular network destinations or the addresses of neighboring routers.

Watch Out for These Misconceptions

Common MisconceptionRouters and switches do the same job.

What to Teach Instead

Switches forward traffic within a single local network using MAC addresses; routers forward traffic between different networks using IP addresses. Use a building analogy: switches are like mail sorting within one floor, routers are like postal services moving mail between cities.

Common MisconceptionSubnetting just means dividing a network into equal halves.

What to Teach Instead

Subnetting allows flexible division based on actual organizational need. One department might need 126 addresses while another needs only 14. Have students work through an unequal subnetting scenario to see how the subnet mask directly controls the number of hosts available per subnet.

Active Learning Ideas

See all activities

Real-World Connections

  • Network engineers at major internet service providers like Comcast or AT&T configure and maintain routers and switches that form the backbone of the internet, ensuring reliable data transmission for millions of users.
  • Cloud computing professionals managing data centers for companies such as Amazon Web Services (AWS) or Microsoft Azure design complex network architectures using sophisticated routing and switching strategies to optimize performance and availability for hosted applications.
  • Cybersecurity analysts monitor network traffic flows, identifying unusual patterns that might indicate malicious activity. Understanding routing helps them trace the origin and destination of suspicious data packets.

Assessment Ideas

Quick Check

Present students with a diagram of a small network including two routers and several end devices. Ask them to identify which device is a router and which is a switch, and to label the IP address and subnet mask for two devices on different networks.

Discussion Prompt

Pose the scenario: 'Imagine a major internet exchange point in a large city experiences a power outage, rendering its core routers offline. How would traffic destined for continents across the ocean be rerouted, and what technologies enable this resilience?' Facilitate a class discussion on redundancy and dynamic routing protocols.

Exit Ticket

Provide students with a simple IP address (e.g., 192.168.1.50) and a subnet mask (e.g., 255.255.255.0). Ask them to calculate the network address and determine if another device with IP address 192.168.1.100 is on the same subnet.

Frequently Asked Questions

What is the difference between a router and a switch?
A switch connects devices within the same local network and uses MAC addresses to deliver traffic only to the intended device. A router connects different networks and uses IP addresses to determine the best path for packets to reach their destination across multiple networks, including the internet.
What is subnetting and why is it used?
Subnetting divides a large network into smaller logical segments, improving security, performance, and address management. A school might subnet by department so that student and administrative traffic is separated, reducing broadcast congestion and limiting the damage from a security incident to one segment.
Why did IPv4 addresses run out?
IPv4 uses 32-bit addresses, allowing about 4.3 billion unique addresses. The explosive growth of internet-connected devices , smartphones, IoT sensors, smart appliances , consumed available space far faster than anticipated. IPv6 uses 128-bit addresses, providing approximately 340 undecillion unique addresses.
How do hands-on simulations help students understand routing?
Routing decisions are mechanical , consult the table, pick the path, forward the packet , but that logic is hard to follow from a diagram. When students physically act as routers, consulting their own routing table cards and passing messages hop by hop, they directly experience how routing decisions chain together and build intuition for troubleshooting real networks.