Study guide
5.2 Static & Default Routing
JNCIA-Junos Juniper Networks Certified Associate
Track your progress as you read
Finished sections get a check mark.
1 Introduction & JNCIA-Junos Exam Overview
1.1 JNCIA-Junos Exam Facts 1.2 Juniper Certification Track 1.3 Exam Blueprint & Study Strategy
2 Networking & Junos OS Fundamentals
2.1 Networking Fundamentals 2.2 Junos OS Architecture 2.3 Transit Traffic & Packet Flow
3 User Interfaces & Configuration Basics
3.1 Junos CLI & J-Web 3.2 Configuration Model 3.3 Initial Configuration & Interfaces
4 Operational Monitoring & Maintenance
4.1 Monitoring with Operational Commands 4.2 Logging & Traceoptions 4.3 Device Maintenance
5 Routing Fundamentals
5.1 Routing & Forwarding Tables 5.2 Static & Default Routing 5.3 Route Preference & Dynamic Routing Overview
6 Routing Policy, Firewall Filters & Final Review
6.1 Routing Policy 6.2 Stateless Firewall Filters 6.3 High-Yield Review & Test Strategy
5.2 Static & Default Routing
Key Takeaways Explain This Topic AI
Static routes are configured under 'routing-options static route' and have a default route preference of 5 in Junos.
Common next-hop types are an IP address, an egress interface, and the actions discard (silent drop) and reject (drop with ICMP unreachable).
The default route is 0.0.0.0/0 for IPv4 and ::/0 for IPv6; it is the least specific match and is used when no more specific route exists.
Qualified next hops let you attach a different preference or metric to specific next hops of one static route, which is how floating static routes are built.
A floating static route uses a raised preference so it stays inactive until a preferred dynamic or primary route is withdrawn.
Last updated: May 2026
Why Static Routing Is Tested
Static routing is the most predictable routing tool in Junos and a heavily tested part of the Routing Fundamentals domain. JNCIA-Junos expects you to know the configuration hierarchy, the next-hop options, the default route concept, and how preference makes a static route act as a backup.
Static Route Configuration
Static routes live under the [edit routing-options static] hierarchy. Each route specifies a destination prefix and at least one next hop. [edit routing-options]
- static {
- route 192.0.2.0/24 next-hop 198.51.100.1;
- route 10.10.0.0/16 next-hop ge-0/0/3.0;
- }
You can also configure IPv6 static routes under rib inet6.0 or directly with an IPv6 prefix, since they are placed in inet6.0 . By default a Junos static route has a route preference of 5 , which is lower (more trusted) than every dynamic protocol default but higher than direct and local routes.
Next-Hop Types
Junos supports several next-hop forms. You must be able to recognize each on the exam.
- Next-hop value Behavior
- IP address (for example 198.51.100.1) Forward to that reachable next-hop router
- Egress interface (for example ge-0/0/3.0) Forward out that interface (typical on point-to-point links)
- discard Silently drop matching packets, no ICMP sent
- reject Drop matching packets and send an ICMP unreachable to the source
- next-table inet.0 Resolve the lookup in another routing table
discard is useful for null routing and aggregation black-holes; reject is friendlier for troubleshooting because the source learns the destination is unreachable. Both prevent forwarding loops for unreachable space.
The Default Route
A default route is the route of last resort, used only when no more specific prefix matches. Because it is the least specific possible prefix, it always loses longest-prefix match to any real route.
- Address family Default route prefix
- IPv4 0.0.0.0/0
- IPv6 ::/0 [edit routing-options]
- static {
- route 0.0.0.0/0 next-hop 203.0.113.1;
- }
This is the most common way an access or edge device reaches the rest of the network or the internet without running a dynamic protocol.
Qualified Next Hops
A qualified next hop lets a single static route carry more than one next hop, each with its own preference or metric . This is how Junos expresses primary and backup paths for the same prefix without two separate route statements. [edit routing-options]
- static {
- route 192.0.2.0/24 {
- next-hop 198.51.100.1;
- qualified-next-hop 198.51.100.65 {
- preference 7;
- }
- }
- }
Here the primary next hop keeps preference 5; the qualified next hop has preference 7, so it is only used when the primary next hop becomes unreachable.
Floating Static Routes
A floating static route is a static route configured with a deliberately raised preference so that it stays inactive while a preferred route (often a dynamic protocol route) is present. If the preferred route is withdrawn, the floating static becomes active and provides a backup path. [edit routing-options]
- static {
- route 172.16.0.0/16 {
- next-hop 203.0.113.9;
- preference 250;
- }
- }
With preference 250, this static route loses to OSPF (10), RIP (100), and BGP (170) for the same prefix, so it floats unused until those routes disappear. Floating statics are a frequent JNCIA-Junos scenario question.
Useful Route Attributes
- Attribute Effect on a static route
- preference Sets route preference (default 5); raise it to create a backup/floating route
- metric Tiebreaker among same-preference routes/next hops
- qualified-next-hop Per-next-hop preference or metric on one route
- no-readvertise Marks the route so it is not redistributed by policy
- discard / reject Drop actions instead of forwarding