Routing operations: static routing and dynamic routing protocols compared
In short: Routers forward packets using their routing table. Static routes are simple and predictable for small networks; dynamic routing protocols adapt to change automatically. RIP counts hops, OSPF and IS-IS build a full map, EIGRP uses DUAL for fast convergence, and BGP connects organisations across the internet.
How routers make decisions
Switches forward frames within a network; routers connect networks. When a packet arrives, the router looks up the destination in its routing table and picks the most specific matching route (the longest prefix). Routes come from three sources: directly connected networks, static routes typed in by an administrator, and dynamic routes learned from other routers. Hosts send anything for other networks to their default gateway.
Static versus dynamic routing
| Static | Dynamic | |
|---|---|---|
| Set up | Typed in by hand for each destination | Routers exchange information automatically |
| Change | Must be updated by hand | Adapts to failures and new networks |
| Overhead | None on CPU or links | Uses CPU, memory and some bandwidth |
| Best for | Small, stable networks, default routes, stub sites | Medium to large networks that change |
ip route 0.0.0.0 0.0.0.0 203.0.113.1 ! default route to the ISP
ip route 10.20.0.0 255.255.0.0 10.0.0.2 ! static route to a branch
Families of routing protocols
- Distance vector: routers share their tables with neighbours and judge paths by distance (hops). Simple but slow to converge.
- Link state: every router learns the full topology and runs the Dijkstra shortest-path-first algorithm. Fast and scalable.
- Advanced distance vector (often called hybrid): distance vector with link-state-like speed. EIGRP is the example.
- Path vector: chooses paths by policy and the list of networks (autonomous systems) a route passes through. BGP is the example.
The main protocols
| Protocol | Type | Metric | Notes |
|---|---|---|---|
| RIP v2 | Distance vector | Hop count (max 15) | Updates every 30 s; slow; only for small or lab networks |
| OSPF | Link state | Cost (based on bandwidth) | Open standard; areas with backbone area 0; the enterprise favourite |
| IS-IS | Link state | Cost | Popular with service providers; runs directly over Layer 2 |
| EIGRP | Advanced distance vector | Bandwidth and delay (by default) | DUAL algorithm with backup routes ready; Cisco-developed, partly published as RFC 7868 |
| BGP | Path vector | Attributes and policy | Runs over TCP 179; the routing protocol of the internet |
IGRP, an older Cisco distance vector protocol, was replaced by EIGRP and is no longer supported in current software.
Administrative distance: which source wins
If two sources offer a route to the same network, the router trusts the one with the lower administrative distance:
| Source | AD | Source | AD |
|---|---|---|---|
| Connected | 0 | OSPF | 110 |
| Static | 1 | IS-IS | 115 |
| External BGP | 20 | RIP | 120 |
| EIGRP (internal) | 90 | Internal BGP | 200 |
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.0.0.255 area 0
passive-interface gigabitEthernet 0/1
Prefix length, AD and metric together
Three rules decide where a packet goes, and they apply in a clear order. Administrative distance only compares routes to the same prefix from different sources, and the metric only compares paths within one protocol; together they decide which routes are installed. When a packet arrives, the router then uses the installed route with the longest matching prefix. So a static route for 10.1.1.0/24 (AD 1) and an OSPF route for 10.1.0.0/16 (AD 110) are both installed, and traffic to 10.1.1.9 follows the /24 because it is more specific, not because of its AD.
For worked examples see How routers forward packets, then go deeper into static and floating routes, OSPF and EIGRP.
Real-world example: from static routes to OSPF
A company with six offices joined by a provider network used static routes on every router. When a new subnet was added at one office, an engineer forgot to add the matching route at two other sites, and those sites could not reach the new printers for most of a day. With six routers and growing, keeping every static route correct by hand had become risky.
The team moved the internal network to OSPF in a single area. Each router now advertises its own subnets, and new networks appear everywhere automatically. A default static route at head office is redistributed into OSPF so that every site learns the way to the internet. The routers use OSPF authentication, and passive interfaces stop routing updates from being sent towards user VLANs.
Practice
OSPF and RIP both offer a route to 10.5.0.0/16. Which is used?
Which protocol routes between internet service providers?
Name one advantage and one disadvantage of static routes.
Key takeaways
- Routers use the most specific route in the routing table.
- Static routing suits small, stable networks; dynamic routing adapts.
- Families: distance vector, link state, advanced distance vector, path vector.
- OSPF is the open-standard enterprise IGP; BGP runs the internet.
- Lower administrative distance wins between route sources.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.