In Module 2 you learned how VLANs split one network. But how do packets travel from one network to another? That's the job of a router. Think of it as the GPS of the internet — it looks at the map, picks the best road, and sends your data on its way. 🚗💨
Routing is the process of choosing the best path for a packet to travel from its source network to its destination network. A router does this by checking its routing table — a list of "to reach network X, go through gateway Y." It's like a delivery driver planning their route. 🚚
When you drive somewhere new, signs point you to the right highway. A router's routing table is just a list of those signs for data. 🪧
Your GPS picks the fastest route. A router does the same — it picks the best path based on rules, distance, or speed. 📍
You drop a letter in your local postbox. It hops through sorting offices until it reaches the right address. Routers are the sorting offices for packets. 📮
A router's routing table tells it where to send packets. Each row has a destination network, a next hop (where to send it), and a type (how the route was learned). Here's a sample:
| Destination network | Next hop | Type |
|---|---|---|
| 192.168.1.0/24 | — (directly connected) | connected |
| 192.168.2.0/24 | 192.168.1.2 | static |
| 10.0.0.0/8 | 192.168.1.3 | static |
| 0.0.0.0/0 | 192.168.1.1 | default route |
The 0.0.0.0/0 route is the default route — the "catch-all" for anything the router doesn't recognise. It's usually your internet gateway. 🌍
Routing protocols are the "rules" routers use to share routes with each other. The two big ones you'll see in Level Two are RIP and OSPF.
The old, simple protocol. It counts hops (how many routers a packet passes through) and picks the path with the fewest. Max 15 hops — so it only works for small networks. Slow to update, but easy to understand. 🐢
The modern, smart protocol. Every router builds a map of the whole network and uses it to find the fastest path (based on speed/cost, not just hops). Scales to huge networks, updates quickly. 🐇
Not really a protocol — just a catch-all route. "If you don't know where to send a packet, send it here." Usually points to your internet gateway. 🚪
A trust score (0–255) that tells a router which route to prefer when there are multiple. Lower = more trusted. Connected routes (AD 0) beat static (AD 1), which beats OSPF (AD 110), which beats RIP (AD 120). 📊
Every time a packet passes through a router, that's called a hop. The router checks the destination IP, looks up the best route, and forwards it to the next hop. Repeat until it arrives! 🏁
You can actually see each hop with traceroute (or tracert on Windows). It lists every router along the way! 🕵️
When your device wants to send data to a different network, it doesn't know the way. So it hands the packet to its default gateway — usually your router. The router then figures out the rest of the journey. 🚪➡️🌍
On your device, you can see it with ipconfig (Windows) or ifconfig (Mac/Linux) — look for "Default Gateway." It's usually something like 192.168.1.1. 🏠
Router> enable Router# configure terminal ! Send all traffic for 192.168.2.0/24 to next-hop 192.168.1.2 Router(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.2 ! The default route: send everything unknown to the ISP Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 ! View the routing table Router(config)# end Router# show ip route
This just says: "To reach 192.168.2.0/24, go through 192.168.1.2." Simple! You'll try this in Packet Tracer. 🖥️
You just learned: what routing is, how routing tables work, static vs dynamic routing, RIP vs OSPF, hop-by-hop packet travel, the default gateway, and how to add a static route.