Routelearn.net
Course menu

Course 8: RoutingLesson 3.1 (8 of 12 in this course)57 of 91 in the CCNA series

Why dynamic routing?

What routing protocols do, IGP vs. EGP, and distance-vector vs. link-state.

Intermediate · 7 min read

Dynamic routing is a method of building routing tables in which routers run a routing protocol to share information about the networks they can reach, choose the best paths, and recalculate them automatically when the topology changes.

In simple terms: Instead of you typing every route, routers tell each other what they know. If a link breaks, they find another way on their own.

A real-life situation

Three routers and seven static routes were easy. Now the company has grown to 30 sites. Every new LAN means logging in to every router to add a route. And when a link fails, a floating static route only helps if the failure is right next to the router. Someone will get it wrong. This is the point where routers should tell each other about networks.

What dynamic routing is

With dynamic routing, routers run a routing protocol: a set of rules for sharing route information. Each router announces the networks it knows. Its neighbours learn them, pick the best paths, and pass them on. When something changes, the routers update each other and recalculate.

The time it takes for all routers to agree on the new best paths after a change is called convergence. Fast convergence means a short outage.

10.0.12.0/3010.0.23.0/3010.0.13.0/30 (backup)PC1192.168.1.10R1R2R3Server192.168.3.10
  1. 1. R3 announces its LAN to both neighbours. No one types a route on R1 or R2.
  2. 2. R1 picks the best path: through R2, over the faster links. The backup link is known but not used.
  3. 3. The R2–R3 link fails. R2 tells its neighbours the path is gone. A static route on R1 would never have noticed this.
  4. 4. Converged: R1 recalculates and moves traffic to the backup link, within seconds.

Static or dynamic?

Static routingDynamic routing
SetupEvery route by handEnable the protocol; routes are learned
Reacts to failuresOnly local onesYes, anywhere in the network
Router CPU and memoryAlmost noneSome, for the protocol
PredictabilityTotal: you chose every pathPaths follow the protocol's rules
Best forSmall networks, stubs, default routesAnything that grows or needs automatic failover

Most real networks mix both: a dynamic protocol inside, with a static default route toward the ISP.

Two ways to sort protocols

By where they run. An autonomous system (AS) is a network run by one organisation. An IGP (interior gateway protocol) routes inside one AS. An EGP (exterior gateway protocol) routes between ASes. Today the only EGP in use is BGP.

By how they work:

TypeHow it worksAnalogyExamples
Distance vectorEach router tells its neighbours the networks it knows and how far away they are. It only knows what its neighbours told it.Road signs: "Leeds, 40 km, this way"RIP, EIGRP (an advanced version)
Link stateEvery router learns every link in the area, builds a full map, and calculates its own shortest paths.Everyone holds the same full mapOSPF, IS-IS
Path vectorRoutes carry the list of ASes they passed through. Choices follow policy, not just distance.Travel plans by country, with rules about which ones to avoidBGP

Why it works this way

Distance-vector protocols are simple but each router sees only second-hand information, which can make them slow to notice bad news. Link-state protocols use more memory, because every router holds the full map, but they react faster and can't be fooled by a neighbour's stale view. That trade-off is why link-state OSPF is the usual IGP in enterprise networks today, and why it gets its own lesson next.

How to verify it

show ip protocols lists every routing protocol running on a router and its key settings. This output is based on Cisco documentation, not run on a lab device.

Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 1.1.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    10.0.12.0 0.0.0.3 area 0
    10.0.13.0 0.0.0.3 area 0
    192.168.1.0 0.0.0.255 area 0
  Routing Information Sources:
    Gateway         Distance      Last Update
    2.2.2.2              110      00:04:51
    3.3.3.3              110      00:04:51
  Distance: (default is 110)
One protocol, OSPF process 1, with two neighbours feeding it routes. "Maximum path: 4" means up to four equal-cost paths can be used at once.

Check yourself

Predict · scenario 1

Which protocol type gives every router a full map of the network?

Predict · scenario 2

Which protocol connects different organisations' networks across the internet?

Predict · scenario 3

What does 'the network has converged' mean?