Lesson Objective
Understand How Traffic Moves Through Networks
Routing and switching are two of the most important processes in networking. Switching moves traffic between devices inside the same local network, while routing moves traffic between different networks. Every time a device contacts a server, opens a website, sends a file or connects to a cloud service, switches and routers help guide that data towards the correct destination.
In this lesson, you will learn how switches use MAC addresses, how routers use IP addresses, how gateways forward traffic, how routing tables guide packet movement, and how VLANs can separate traffic inside larger networks. By the end of the lesson, you should understand the basic difference between local delivery and routed delivery.
Audio Lesson
Listen to This Lesson
The audio version explains routing and switching in a practical way. It covers switches, routers, MAC addresses, IP addresses, gateways, VLANs, routing tables, packet forwarding and basic network troubleshooting.
Concept Overview
Switches Handle Local Traffic and Routers Connect Networks
A switch forwards traffic between devices on the same local area network by using MAC addresses. A router forwards traffic between different networks by using IP addresses and routing tables. Together, they allow devices to communicate locally, reach external networks and access the internet.
Learning Algorithm
Routing and Switching Workflow
| Step | Process | Technical Meaning |
|---|---|---|
| Step 1 | Identify local traffic | The device checks whether the destination is on the same local network. |
| Step 2 | Use MAC addresses | Switches use hardware addresses to forward frames locally. |
| Step 3 | Forward frames through switches | The switch sends traffic to the correct local port. |
| Step 4 | Identify external traffic | The device sends non-local traffic to the default gateway. |
| Step 5 | Use routing tables | Routers choose the best next path for the packet. |
| Step 6 | Forward packets between networks | Routers move packets across different networks. |
| Step 7 | Segment traffic with VLANs | Networks can be logically separated for control and security. |
| Step 8 | Monitor and troubleshoot traffic | Network tools help identify forwarding, gateway and routing problems. |
Step 1
Identify local traffic
A device first checks whether the destination address belongs to the same local subnet. If the destination is local, the device can send traffic through the local network. If the destination is outside the subnet, the traffic must be sent to the default gateway.
Technical Point
The subnet check decides whether traffic stays local or moves to a router.
Step 2
Use MAC addresses
MAC addresses identify network interfaces on a local network. Switches use MAC addresses to decide where Ethernet frames should go. Unlike IP addresses, which support routing between networks, MAC addresses are used for local delivery inside the same network segment.
Technical Point
MAC addresses support local frame delivery inside a network segment.
Step 3
Forward frames through switches
A switch learns which devices are connected to its ports by reading source MAC addresses. When traffic arrives, the switch checks its MAC address table and forwards the frame only to the correct port where possible. This makes local communication efficient.
Technical Point
Switches use MAC tables to forward frames efficiently inside local networks.
Step 4
Identify external traffic
If a device needs to reach another network, it cannot use switching alone. The device sends the traffic to its default gateway, usually the local router. The router then handles the next stage of forwarding beyond the local subnet.
Technical Point
Traffic leaving a local subnet must be sent to the default gateway.
Step 5
Use routing tables
Routers use routing tables to decide where packets should go next. A routing table contains known networks, next-hop addresses, interfaces and sometimes route priorities. The router compares the destination IP address against the table and chooses the best available path.
Technical Point
Routing tables guide packets between networks by selecting the next forwarding path.
Step 6
Forward packets between networks
Routing forwards packets from one network to another. The packet may pass through several routers before reaching its destination. Each router makes a forwarding decision based on its routing table, the destination IP address and available network paths.
Technical Point
Routers forward packets between networks until they reach the correct destination.
Step 7
Segment traffic with VLANs
A VLAN is a virtual local area network. VLANs allow a switch to separate traffic into logical groups, even when devices are connected to the same physical switch. Organisations often use VLANs to separate staff devices, guest Wi-Fi, servers, cameras and management systems.
Technical Point
VLANs separate traffic logically without requiring completely separate physical switches.
Step 8
Monitor and troubleshoot traffic
Routing and switching problems can cause slow connections, unreachable services or complete network outages. Tools such as ping, traceroute, switch port checks, routing table inspection, interface status and logs help identify whether the problem is local switching, gateway access or routing between networks.
Technical Point
Troubleshooting helps identify whether traffic is failing at the switch, gateway or routing stage.
Key Takeaways
What You Should Remember
1. Switching Is Local
Switches move traffic between devices on the same local network.
2. MAC Addresses Support Switching
Switches use MAC addresses to forward Ethernet frames.
3. Routing Connects Networks
Routers move packets between different networks.
4. Gateways Handle External Traffic
Devices send non-local traffic to the default gateway.
5. Routing Tables Guide Packets
Routers use routing tables to choose the next path.
6. VLANs Segment Traffic
VLANs separate logical networks on shared switching hardware.
7. Segmentation Improves Control
Separate traffic groups can improve organisation and security.
8. Troubleshooting Follows the Path
Testing local access, gateway access and routing helps locate faults.
Knowledge Check
Quick Routing & Switching Quiz
Test your understanding. The questions can change when you refresh them.
Lesson Summary
Routing & Switching Summary
Switching moves traffic between devices inside the same local network using MAC addresses. Routing moves traffic between different networks using IP addresses, gateways and routing tables. VLANs help segment network traffic, while troubleshooting tools help identify whether a problem is local, gateway-related or routing-related.