CAP7001 · Unit 4: Network layer
Static and default routing
10 practice questions · in the ETE syllabus
Key points
- Static routes are manual and do not adapt to failures
- Default route is 0.0.0.0/0 and matches everything
- Forwarding uses the longest matching prefix
- Lower administrative distance is more trusted
- A floating static route has a high distance and acts as a backup
Static routing means an administrator enters routes by hand. Nothing is learned and nothing changes when a link fails, but there is no update traffic and no routing protocol to run, which suits small or stub networks.
A default route is the static entry 0.0.0.0/0. It matches every destination and is used only when no longer prefix matches, so a stub network with one exit sends everything unknown to the ISP.
Forwarding rule: longest prefix match. Among all entries that contain the destination address, the one with the most prefix bits wins.
Worked example: table 10.0.0.0/8 via R1, 10.1.0.0/16 via R2, 10.1.2.0/24 via R3, 0.0.0.0/0 via R4. A packet for 10.1.2.77 matches all four entries and goes to R3, because /24 is the longest. A packet for 10.1.9.5 goes to R2, and one for 11.0.0.1 goes to R4.
Administrative distance ranks the trust in route sources when two sources offer the same prefix: connected 0, static 1, OSPF 110, RIP 120 (lower wins). A floating static route is given a high distance, such as 130, so it stays unused until the dynamic route disappears.
Exam trap: compute the real address range of each prefix. A /25 or /22 may look close to the destination yet not contain it.
Try two questions
A router holds 192.168.10.0/24 via R1 and a default route via R2. A packet for 192.168.10.50 arrives. Why does it go to R1 rather than R2?
- Routes are checked in the order typed, and the R1 entry was entered first
- The router prefers the next hop with the lower IP address
- The /24 entry is the longer matching prefix, so it beats the /0 default
- Default routes are used only for traffic that began inside the LAN
Show the answer
C. Both entries match, but forwarding takes the most specific one.
Why not A: Forwarding depends on prefix length, not entry order.
Why not B: Next-hop addresses are not compared when prefix lengths differ.
Why not D: A default route serves any packet with no better match, wherever it came from.
A routing table holds 10.0.0.0/8 via R1, 10.1.0.0/16 via R2, 10.1.2.0/24 via R3 and 0.0.0.0/0 via R4. Where does the router send a packet for 10.1.2.77?
- R1
- R2
- R4
- R3
Show the answer
D. All four entries match 10.1.2.77, and the longest prefix, the /24, wins.
Why not A: The /8 matches but is the shortest matching prefix.
Why not B: The /16 matches but a longer match exists.
Why not C: The default route only applies when nothing else matches.