Sub topic 2
Dynamic Routing: Routers Sharing What They Know
This chapter assumes IPv4 addressing, CIDR prefixes, the roles of hosts, switches, and routers, and basic router or Linux command-line use.
Dynamic Routing
Dynamic routing protocols let routers exchange network information. Each router learns reachable prefixes, next hops, and path quality. It then places the best routes in its routing table.
When the network changes, routers send updates or recalculate paths instead of requiring an administrator to edit every router.
Convergence and Failure Handling
Convergence is the process by which routers agree on usable paths after a change. A failed link can make a route invalid. Routers detect the failure, withdraw or replace the route, and distribute the new information.
Fast convergence reduces packet loss, but faster protocols may use more memory, processing, or bandwidth.
Metrics: Ranking Paths
A metric is a value a routing protocol uses to rank paths. The meaning depends on the protocol.
| Protocol | Typical metric | Path preference |
|---|---|---|
| RIP | Hop count | Fewer routers is better |
| OSPF | Cost based mainly on bandwidth | Lower total cost is better |
A common error is treating a metric as a universal measure. A path with fewer hops is not always faster.
Distance-Vector Routing and RIP
A distance-vector protocol tells neighbors which destinations it knows and the distance to each one. Routers learn indirectly from neighboring routers.
RIP is a distance-vector protocol. It uses hop count and supports a maximum of 15 hops. RIP is simple, but its limits and slower convergence make it unsuitable for most modern large networks.
Link-State Routing and OSPF
A link-state protocol distributes information about links and their states. Each router builds a map of the network and calculates paths locally.
OSPF is a link-state protocol. It commonly uses bandwidth-based cost and converges faster than traditional RIP. OSPF needs more planning and resources because routers maintain a topology database.
Administrative Distance
Administrative distance (AD) ranks route sources on one router. A lower value wins when static routes, OSPF, RIP, or another source offer the same destination prefix. AD is different from a protocol metric: the metric chooses within one protocol, while AD chooses between sources.
Exercise
OSPF and RIP both advertise 10.2.0.0/16. Which route normally wins if OSPF has AD 110 and RIP has AD 120?
Show answer
The OSPF route wins because its administrative distance is lower. OSPF then uses its metric to choose among OSPF paths.