Routing Fundamentals · Topic 4 of 4

Dynamic Routing Protocols: Advantages and Use Cases

Learn why dynamic routing protocols scale better than static routes, the roles of RIP, OSPF, IS-IS and BGP, and when to use each, for JNCIA-Junos JN0-106.

  • 6 min
In a nutshell
  • Dynamic routing advantages: scalability, automatic failover, less administration, best path selection.
  • Static routing advantages: no overhead, fully predictable, ideal for stub networks and defaults.
  • IGPs: RIP (distance vector), OSPF and IS-IS (link state). EGP: BGP (path vector).

What it is

A dynamic routing protocol lets routers tell each other about the networks they can reach. Each router builds its routing table from what its neighbors advertise, and recalculates automatically when a link or router fails.

Static routes are fine for a few fixed paths, but in a larger network they become hard to manage and they cannot react to failures. Dynamic routing solves both problems. The exam asks you to know the advantages and when each approach fits.

Link failsNeighborsdetect the changeUpdatessent between routersNew best pathcalculatedRouting tableupdated automatically

How it works

Static vs. dynamic routing

Static routingDynamic routing
ConfigurationOne route per prefix per router, by handEnable the protocol on interfaces; routes are learned
Reaction to failureNone, unless a backup route was configuredAutomatic reconvergence around the failure
ScalabilityPoor; every new network means editing many routersGood; new networks are advertised automatically
OverheadNo protocol traffic, no CPU for route calculationProtocol messages and some RE CPU and memory
PredictabilityFully predictablePaths follow the protocol's metrics
Junos default preference5OSPF 10, IS-IS 15 or 18, RIP 100, BGP 170

Advantages of dynamic routing

  • Scalability. Adding a subnet means advertising it once, not adding a route on every router.
  • Automatic failover. When a link or router fails, the protocol finds another path without an administrator.
  • Less administration. Fewer manual routes mean fewer typing errors and less work as the network grows.
  • Best path selection. The protocol chooses paths by its metric, such as cost or hop count, and can use equal-cost paths.

Interior and exterior protocols

CategoryUsedJunos protocols
Interior gateway protocol (IGP)Inside one organization, one autonomous systemRIP, OSPF, IS-IS
Exterior gateway protocol (EGP)Between autonomous systems, such as to ISPsBGP

The main protocols

ProtocolTypeMetricTypical use
RIPDistance vectorHop count, maximum 15Small, simple networks
OSPFLink stateCostEnterprise and campus networks, using areas
IS-ISLink stateMetricLarge service provider cores
BGPPath vectorPath attributesBetween autonomous systems, the internet, ISP connections

A distance vector protocol sends its routes to its neighbors, and each router trusts what the neighbor says. A link state protocol floods information about links, and each router builds a full map of the area and calculates the shortest paths itself, which converges faster and scales better.

Link stateOSPF or IS ISFull mapof the areaShortest pathcalculated locallyDistance vectorRIPRoutes fromneighborsBest hop count

Enabling a protocol in Junos OS

Dynamic protocols are configured under [edit protocols]. A basic OSPF example:

user@router# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
user@router# set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
user@router# set protocols ospf area 0.0.0.0 interface lo0.0 passive
user@router# commit

passive advertises the loopback address without sending hellos on it. You check the result with show ospf neighbor and show route protocol ospf. Other protocols have their own commands, such as show bgp summary and show rip neighbor.

What each protocol advertises by default is set by its default routing policy. For example, RIP in Junos OS advertises nothing until you configure an export policy, while OSPF advertises the interfaces it runs on. The Routing Policy and Firewall Filters chapter covers default and export policies.

Use cases: when to choose which

SituationGood choiceWhy
Branch with one link to the coreStatic default routeOne path, nothing to choose
Stub network with one exitStatic routeNo alternate path to learn
Backup path when a protocol failsFloating static routeHigher preference keeps it inactive until needed
Campus or enterprise with many routers and redundant linksOSPF or IS-ISAutomatic failover and scale
Connection to two ISPs, or between organizationsBGPPolicy control between autonomous systems
Very small lab or legacy networkRIPSimple, but slow and limited to 15 hops

Many networks combine both: an IGP inside, BGP at the edge and static routes for stub sites.

A worked example

A company grows from three routers to twenty, with redundant links. With static routes, each new subnet means editing many routers, and a fiber cut drops traffic until someone updates the routes.

The engineers enable OSPF on all internal links, so new subnets are advertised automatically and failed links are routed around. At the edge they keep a static default route, and move to BGP when they add a second ISP.

How the exam asks about this

  • "What is the main advantage of a dynamic routing protocol over static routes?" → It adapts to topology changes automatically and scales to large networks.
  • "Which protocol is used between autonomous systems?" → BGP.
  • "When is a static route the better choice?" → For a stub network with a single exit, such as a branch default route.

Common mistakes

Thinking dynamic routing is always better. It adds protocol traffic and CPU load. For a stub site with one exit, a static default route is simpler and correct.

Calling BGP an IGP. BGP is the exterior gateway protocol used between autonomous systems. RIP, OSPF and IS-IS are IGPs.

Assuming a dynamic protocol overrides a static route. By default the static route at preference 5 beats OSPF at 10 and BGP at 170 for the same prefix.

What to remember for the exam

  • Dynamic routing advantages: scalability, automatic failover, less administration, best path selection.
  • Static routing advantages: no overhead, fully predictable, ideal for stub networks and defaults.
  • IGPs: RIP (distance vector), OSPF and IS-IS (link state). EGP: BGP (path vector).
  • Protocols are configured under [edit protocols], for example set protocols ospf area 0.0.0.0 interface ge-0/0/0.0.
  • Junos RIP advertises nothing until an export policy is configured.
Exam tip

When a scenario mentions growth, redundancy or automatic failover, the answer points to a dynamic protocol. When it mentions a single exit, a stub site or no protocol overhead, it points to a static route.

Check yourself

  • Name two advantages of dynamic routing over static routing.

    It reroutes automatically when a link fails and scales to large networks without a manual route on every router.

  • Which Junos protocols are interior gateway protocols?

    RIP, OSPF and IS-IS; BGP is the exterior gateway protocol.

  • Why is a static default route a good fit for a branch with one uplink?

    There is only one path, so a dynamic protocol would add overhead without giving any choice of route.

Topic 4 of 4 in Routing Fundamentals

Test yourself on Routing Fundamentals

The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.