CCNA — NorthRidge Station · Module 4: Routing concepts · Estimated 45 minutes
show ip route.A router forwards a packet only if its destination matches an entry in the routing table. Without configuration, that table contains only directly connected networks — the ones its own interfaces sit on. Every other destination is unreachable and the packet is dropped.
A static route is an entry you place in the table by hand. It does not adapt, it does not advertise itself, and it does not disappear when a distant link fails. That is both its weakness and, in a small or stub topology, its virtue: the table says exactly what you put in it.
Router(config)# ip route network-address subnet-mask { next-hop-ip | exit-interface }
| Form | Written as | Lookups |
|---|---|---|
| Directly connected | ip route 10.0.111.0 255.255.255.0 s0/1/1 | one |
| Recursive | ip route 10.0.111.0 255.255.255.0 10.0.255.6 | two |
| Fully specified | ip route 10.0.111.0 255.255.255.0 s0/1/1 10.0.255.6 | one |
| Default | ip route 0.0.0.0 0.0.0.0 10.0.255.1 | varies |
A recursive route names an IP the router must look up a second time to learn where to send the frame. On a point-to-point serial link the exit interface form avoids that lookup. On a multi-access link such as Ethernet, the exit-interface-only form is not recommended — the router cannot know which of many neighbours to address, so use the fully specified form instead.
| Device | Interface | Address | Mask |
|---|---|---|---|
| R1 | G0/0/0 | 10.0.100.1 | 255.255.255.0 |
| R1 | S0/1/0 | 10.0.255.1 | 255.255.255.252 |
| R2 | S0/1/0 | 10.0.255.2 | 255.255.255.252 |
| R2 | S0/1/1 | 10.0.255.5 | 255.255.255.252 |
| R2 | G0/0/0 | 10.0.107.1 | 255.255.255.0 |
| R3 | S0/1/1 | 10.0.255.6 | 255.255.255.252 |
| R3 | G0/0/0 | 10.0.111.1 | 255.255.255.0 |
| PC-A | NIC | 10.0.100.10 | 255.255.255.0 |
| PC-C | NIC | 10.0.111.10 | 255.255.255.0 |
show ip route. Record how many
routes are present and what code each carries.
You should see only C and L
entries. C is the connected network; L is the
/32 local address of the interface itself.
10.0.255.2. It should succeed — it is on a
directly connected network.10.0.111.1. It will fail. Issue
show ip route 10.0.111.1 and confirm the router reports
% Network not in table.R1(config)# ip route 10.0.107.0 255.255.255.0 s0/1/0
R1(config)# ip route 10.0.111.0 255.255.255.0 10.0.255.2
show ip route static. Both entries appear with code
S. Note the administrative distance and metric in brackets —
[1/0] — and be able to say what each number means.10.0.111.1 again. It will still fail.
Do not configure anything else on R1. Work out why before reading Part 3 — the answer is the single most common static routing mistake.
R1 now knows how to reach Depot 11. R3 does not know how to reach anything beyond its own two networks, so the echo reply has nowhere to go. A route is one-directional; reachability is not.
R3(config)# ip route 0.0.0.0 0.0.0.0 10.0.255.5
R3 is a stub — it has exactly one way out, so a default route is correct here and enumerating individual networks would be noise.
| Command | What it answers |
|---|---|
| show ip route | the whole table, with codes |
| show ip route static | only what you configured |
| show ip route 10.0.111.10 | which entry would be used, and why |
| show ip interface brief | whether a link is the problem |
| traceroute 10.0.111.10 | where the path actually stops |
0.0.0.0 0.0.0.0.
Explain, in terms of the longest-match rule, why this never prevents a
more specific route from being used.[1/0]. What would you change
to make one of them a floating static route, and when is that useful?Lab 19 · three routers, two serial links, two host LANs
| Router | Serial 0/1/0 | Serial 0/1/1 | Gig 0/0/0 |
|---|---|---|---|
| R1 | 10.0.255.1 | — | 10.0.100.1 |
| R2 | 10.0.255.2 | 10.0.255.5 | 10.0.107.1 |
| R3 | — | 10.0.255.6 | 10.0.111.1 |
R1 and R3 each touch exactly one serial link, which makes them stubs. R2 touches both, which makes it the only device that needs to know about networks on either side. Deciding that from the diagram, before typing, is most of the work in this lab.