This episode breaks down the routing table: destination network, subnet mask, next-hop, administrative distance, and metric, plus the longest prefix match principle. You configure static routing between three routers, a default static route toward an ISP, and a floating static route as an automatic backup with a higher administrative distance.

In episode 6 you already did inter-VLAN routing. Now we discuss the heart of Layer 3 in depth: how a router decides where a packet is sent. Episode 9 opens the world of routing with static routing — manual path configuration that becomes the foundation for understanding dynamic routing protocols in episodes 10 to 13.
We will learn the structure of the routing table, the longest prefix match principle, then build static routing between three routers in PNETLab, add a default route, and close with a floating static route as a backup path that activates automatically.
Every router stores a routing table that contains:
Show the routing table in PNETLab:
R1# show ip route
Codes: C - connected, S - static, R - RIP, O - OSPF, D - EIGRP
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
C 10.0.0.0/30 is directly connected, GigabitEthernet0/1
S 192.168.20.0/24 [1/0] via 10.0.0.2show ip route displays routes with their source codes. The [1/0]
on the static route means an administrative distance of 1 and a metric of 0.
If a packet matches more than one route, the router uses the route with the
longest prefix. Example: a packet to 192.168.10.55 matches both
192.168.10.0/24 and 192.168.10.0/25. The router picks /25 because it is
more specific, regardless of AD or metric. This principle is why summary
routes and host routes can coexist.
Build R1, R2, and R3 interconnected through /30 subnets. On R1, add routes
toward the two networks on R3's side:
configure terminal
ip route 192.168.30.0 255.255.255.0 10.0.0.6
ip route 192.168.20.0 255.255.255.0 10.0.0.2
exitThe syntax is ip route <dest-network> <subnet-mask> <next-hop-ip>.
The route 192.168.30.0/24 via 10.0.0.6 tells R1 that the network behind R3
is reached through the interface connected to R3. Repeat a similar pattern on
R2 and R3 so all three know each other — static routing never propagates on
its own; every router must be configured manually.
An alternative to the next-hop is naming the exit interface directly:
configure terminal
ip route 192.168.30.0 255.255.255.0 g0/2
exitBoth forms are valid, but on point-to-point links, naming the exit interface avoids an extra next-hop lookup and is often more efficient.
The default route is the safety net for all traffic that matches no other route. Its configuration uses all-zero network and mask:
configure terminal
ip route 0.0.0.0 0.0.0.0 203.0.113.1
exitip route 0.0.0.0 0.0.0.0 203.0.113.1 sends all unknown packets to
the ISP gateway. In the routing table, this route appears as S* 0.0.0.0/0.
Enterprise routers typically have a default route out to the Internet while
still holding specific routes for internal networks.
A floating static route is a backup route that stays inactive while the main route is available. The key: give it a higher administrative distance than the main route. The route with the lowest AD always wins:
configure terminal
ip route 192.168.30.0 255.255.255.0 10.0.0.6
ip route 192.168.30.0 255.255.255.0 10.0.0.10 130
exitThe first route uses the default AD of 1 and is active. The second route with
AD 130 only appears in the routing table if the first route disappears — for
example, when the main link goes down. When the main link recovers, the router
automatically returns to the main route. Test this scenario in PNETLab by
shutting down the main interface and observing show ip route.
Build three routers with /30 transit subnets and two LAN networks. Sketch the
IP diagram on paper first (the habit from episode 3), then configure static
routes on all three routers. Verify with ping from the farthest network to
the other end, and use traceroute to see the path packets take.
Key takeaways:
ip route <dest> <mask> <next-hop>.ip route 0.0.0.0 0.0.0.0 <gateway> catches unknown traffic.In the next episode, episode 10, we switch to automatic routing: dynamic routing fundamentals and EIGRP — the classification of IGP and EGP protocols, the difference between distance vector and link-state, the Autonomous System concept, neighbor adjacency, bandwidth and delay based metrics, and understanding successor and feasible successor in the EIGRP topology table.