Lesson 33: How the Routing Table is Populated
The routing table is populated by three primary mechanisms:
1. Directly Connected Networks (Code C)
A router automatically adds any network directly connected to an active, configured interface to the routing table. These routes are always the best paths.
2. Static Routes (Code S)
Manually configured routes defined by the administrator. Static routes are excellent for simplicity, small networks, or connecting to Stub Networks (networks with only one entrance/exit point).
3. Dynamic Routing Protocols (Codes O, D, R, etc.)
Routers automatically share and learn network information from other routers using protocols like OSPF or EIGRP. This is scalable and automatically adapts to topology changes.
The Best Path Selection
When multiple routes exist to the same destination, the router uses a two-step process to select the best route:
- Administrative Distance (AD): The trustworthiness of the route source. Lower AD is preferred.
- Metric: If ADs are equal, the protocol-specific metric (e.g., OSPF cost, EIGRP bandwidth) is used to find the shortest path.