Static vs Dynamic Routing: Failover, Scale and When to Use Each
A router looks up its routing table to decide where to send each packet next. Routes can enter the table in two ways: static routing, where an administrator configures them by hand, and dynamic routing, where routers exchange information with a routing protocol and build the table automatically. Static routing is simple, puts no extra load on the router and behaves predictably, but it does not switch over automatically after a failure, and configuration and management grow as the network grows. Dynamic routing finds routes automatically with protocols such as OSPF and BGP and switches to another path after a failure. Real networks usually combine the two, for example a static default route at a site with a single exit and dynamic routing where there are redundant paths.
| Aspect | Static routing | Dynamic routing |
|---|---|---|
| How routes are set | The administrator configures the destination network and the next hop on each router | Routers exchange information with a routing protocol (OSPF, BGP, RIP, etc.) and find routes automatically |
| Behavior on failure | Does not switch over automatically; it does not notice failures beyond the neighboring router and can keep using a route that no longer works | When a failure is detected, it recomputes and switches to another route |
| Router load and bandwidth | Exchanges no route information, so it uses no CPU, memory or link bandwidth for that | Uses CPU, memory and bandwidth to exchange route information and compute routes |
| Configuration effort and scale | The amount of configuration and the risk of mistakes grow with the number of networks and routes; every change means editing all the routers involved | Additions and changes spread automatically, so even large networks are easy to manage; but designing and configuring the protocol takes knowledge |
| Predictability | Behaves exactly as configured, so it is easy to predict | The route used can change depending on the protocol's calculations |
| Security | Receives no route information, so there is no risk of being fed false routes | Needs neighbor authentication and limits (filters) on accepted routes to avoid accepting false routes |
| Administrative distance | Generally a low value, preferred over dynamic routes (the value varies by device, for example 1) | Set per protocol (some devices use, for example, 110 for OSPF and 120 for RIP) |
| Where it fits | Small networks, the default route at a site with one exit, the exit to a service provider | Networks with redundant paths, enterprise networks with many sites, and between ASes on the internet (BGP) |
Figures are typical orders of magnitude and vary by process generation and product.