5.3 Route Preference & Dynamic Routing Overview
Key Takeaways
- Junos route preference is the equivalent of administrative distance; the lower the value, the more trusted the route, and it is the first tiebreaker in active-route selection.
- Key Junos defaults: Direct/Local 0, Static 5, OSPF internal 10, RIP 100, OSPF AS external 150, BGP (internal and external) 170.
- Routing protocols fall into distance-vector (RIP), link-state (OSPF, IS-IS), and path-vector (BGP) categories.
- OSPF is a link-state interior gateway protocol that floods link-state advertisements, builds an identical link-state database per area, and runs the SPF algorithm to compute shortest paths.
- Route advertisement is how routers learn remote prefixes from neighbors so the RIB can be populated beyond directly connected and static routes.
Route Preference Is Junos Administrative Distance
Route preference is the Junos term for what other vendors call administrative distance (AD). It is a numeric trust value that lets Junos pick one route when several protocols offer a route to the same prefix. The lower the preference, the more trusted the route, and preference is the first tiebreaker in active-route selection.
Every route source has a default preference. You should memorize this table for JNCIA-Junos; preference questions are common.
| Route source | Default Junos route preference |
|---|---|
| Direct (connected) | 0 |
| Local (device's own interface address) | 0 |
| Static | 5 |
| OSPF internal route | 10 |
| RIP | 100 |
| OSPF AS external route | 150 |
| BGP (internal and external) | 170 |
Note the Junos-specific details that frequently trip up candidates: OSPF internal is 10 but OSPF AS external is 150, and both internal BGP (IBGP) and external BGP (EBGP) default to 170 in Junos, unlike some other vendors. Preference can be overridden per protocol or per route, but the exam tests the defaults.
Why Dynamic Routing Exists
Static routes do not scale and do not react to topology changes. Dynamic routing protocols let routers exchange reachability information automatically, so the RIB learns remote prefixes and reconverges when links fail. Route advertisement is the core idea: a router tells its neighbors which prefixes it can reach, and those neighbors install and re-advertise the information, propagating reachability across the network.
Routing Protocol Categories
JNCIA-Junos expects you to classify protocols, not configure them in depth.
| Category | How it works | Examples |
|---|---|---|
| Distance-vector | Advertises its whole routing table to directly connected neighbors; chooses routes by hop count or distance | RIP |
| Link-state | Floods link-state information so every router builds an identical map, then runs a shortest-path algorithm | OSPF, IS-IS |
| Path-vector | Advertises full AS path information between autonomous systems; used for policy-rich inter-domain routing | BGP |
Protocols are also split by where they run: Interior Gateway Protocols (IGPs) like OSPF, IS-IS, and RIP run within one autonomous system, while BGP is the Exterior Gateway Protocol (EGP) used between autonomous systems on the internet.
OSPF Basics at the Associate Level
Open Shortest Path First (OSPF) is a link-state IGP and the most commonly referenced dynamic protocol on JNCIA-Junos. At the associate level you should understand the behavior, not advanced design:
- Routers discover and form adjacencies (neighbor relationships) with directly connected OSPF routers.
- Each router originates Link-State Advertisements (LSAs) describing its links and costs.
- LSAs are flooded so every router in an area builds an identical Link-State Database (LSDB).
- Each router independently runs the Shortest Path First (SPF), or Dijkstra, algorithm against the LSDB to compute loop-free shortest paths.
- OSPF uses areas for scalability; Area 0 is the backbone that all other areas connect to.
- OSPF path cost is metric-based (lower total cost preferred), and internal OSPF routes carry Junos preference 10 while OSPF AS external routes carry 150.
In Junos, OSPF is enabled under [edit protocols ospf] by placing interfaces into areas, but JNCIA-Junos focuses on the concepts and resulting route behavior rather than full configuration.
Two routes to 10.5.0.0/16 exist: one from OSPF (internal) and one from a static route, each with default Junos preference. Which route does Junos install as active?
Which statement best describes a link-state routing protocol such as OSPF?
What is the default Junos route preference for BGP routes, including both internal and external BGP?
Which protocol is an Exterior Gateway Protocol (EGP) used for routing between autonomous systems?