Free tech learning for everyone, from basics to pro

Transport Network DesignNetworking SecurityIntermediate

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

StaticDynamic
Set upTyped in by hand for each destinationRouters exchange information automatically
ChangeMust be updated by handAdapts to failures and new networks
OverheadNone on CPU or linksUses CPU, memory and some bandwidth
Best forSmall, stable networks, default routes, stub sitesMedium 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

How routing protocols are classifiedDynamic routingInterior (IGP)inside one organisationExterior (EGP)between organisationsDistance vectorRIPLink stateOSPF, IS-ISAdvanced DVEIGRPPath vectorBGP
Figure 1. IGPs route inside an organisation; BGP routes between organisations across the internet.
  • 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

ProtocolTypeMetricNotes
RIP v2Distance vectorHop count (max 15)Updates every 30 s; slow; only for small or lab networks
OSPFLink stateCost (based on bandwidth)Open standard; areas with backbone area 0; the enterprise favourite
IS-ISLink stateCostPopular with service providers; runs directly over Layer 2
EIGRPAdvanced distance vectorBandwidth and delay (by default)DUAL algorithm with backup routes ready; Cisco-developed, partly published as RFC 7868
BGPPath vectorAttributes and policyRuns 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:

SourceADSourceAD
Connected0OSPF110
Static1IS-IS115
External BGP20RIP120
EIGRP (internal)90Internal BGP200
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?
OSPF, because its administrative distance (110) is lower than RIP (120).
Which protocol routes between internet service providers?
BGP.
Name one advantage and one disadvantage of static routes.
Advantage: no overhead and fully predictable. Disadvantage: they do not adapt to failures.

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.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

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.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.