How a Route Gets Into the Table
Two protocols, one destination, and the rule that decides
Step 1 of 2 — understand the idea. Read this first and the packet trace will confirm what you already expect, instead of teaching you two things at once.
What you'll be able to do
- ▸Explain the difference between the RIB and the forwarding table, and why both exist
- ▸Apply administrative distance and metric in the right order, and say why the order matters
- ▸Explain why a less-trusted, more-specific route still wins the packet
✗ Common misunderstanding: The route with the best metric is the one that gets used.
Why that's wrong: Metric is the SECOND comparison, not the first. Administrative distance — how much the router trusts the source — is checked before the metric is looked at, and a difference there ends the comparison immediately.
Correct model: Trust first, then cost. A metric only ever decides between routes whose sources are equally trusted, which in practice means routes from the same protocol.
The packets prove it: In the trust-beats-cost trace a static route with metric 500 is installed over an OSPF route with metric 20, and the rejection line on the OSPF route says the distance decided it.
✗ Common misunderstanding: If a route is not in the routing table, the router never heard about it.
Why that's wrong: The routing table shows one winner per prefix. A route can be received, valid and current, and simply have lost the comparison — it is sitting in the RIB as a candidate.
Correct model: Two layers: the RIB holds everything offered, the forwarding table holds what won. `show ip route` is a filtered view of the first.
The packets prove it: In the trust-beats-cost trace the RIB tab shows two rows for 10.0.40.0/24 — one installed, one candidate — while the routing table shows only one.
Watch these fields in the lab: ipv4.destIp
- RIBglossary
- The Routing Information Base: every route offered by every source, including the ones that lost. Nothing is thrown away, which is what makes failover instant.
- Forwarding tableglossary
- The result of selection: one winning route per prefix. This is what packets are matched against, and what `show ip route` prints.
- Administrative distanceglossary
- How much the router trusts a source of routing information. Connected 0, static 1, eBGP 20, OSPF 110, iBGP 200. Lower is more trusted. Compared FIRST.
- Metric
- A protocol's own measure of how good a path is. Only meaningful inside that protocol, and only consulted when the distance ties. Compared SECOND.
Watch these fields in the lab: ipv4.destIp
✓ Concept check — before you open the packets
These test the idea, not the trace. You should be able to answer them from the explanation above.
Now that you understand the concept, observe how it appears in the packet exchange.
The lab runs a real simulated capture — pause, step, click any packet, and inspect every byte.