Protocol-independent routing refers to routing features and configurations that do not depend on specific routing protocols like OSPF, BGP, or RIP. These features allow greater flexibility and can work independently or alongside routing protocols to optimize traffic flow.
Static routing is a straightforward and manual method for configuring routes in a network.
What is Static Routing?
When to Use Static Routing?
0.0.0.0/0 sends all traffic to the internet gateway.Advantages:
Disadvantages:
Configuration Example:
This command creates a static route for the network 192.168.1.0/24 and sets the next-hop IP address to 10.0.0.1:
set routing-options static route 192.168.1.0/24 next-hop 10.0.0.1
Explanation:
192.168.1.0/24: The destination network.next-hop 10.0.0.1: The IP address of the next device to forward packets toward the destination.Route aggregation is a method to combine multiple specific routes into a single summary route.
What is Route Aggregation?
When to Use Route Aggregation?
Example Scenario:
192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24), you can aggregate them into a single route (192.168.0.0/22).Advantages:
Configuration Example:
Create an aggregate route in Junos OS:
set policy-options policy-statement aggregate-policy term 1 then aggregate
Explanation:
Generated routes are dynamically created routes that rely on the presence of other routes in the routing table.
What is a Generated Route?
When to Use Generated Routes?
Example Scenario:
192.168.0.0/16 might be created only if 192.168.1.0/24 and 192.168.2.0/24 exist.Configuration Example:
set routing-options generate route 192.168.0.0/16 next-hop 10.0.0.1
192.168.0.0/16: The summary route created dynamically.next-hop 10.0.0.1: Where traffic matching the summary route should be forwarded.Martian addresses are IP addresses considered invalid or reserved and should not be used in routing.
What are Martian Addresses?
127.0.0.0/8 for loopback, 192.0.2.0/24 for documentation purposes).Purpose:
Default Martian Address Filters in Junos OS:
Configuration Example:
set routing-options martians 10.0.0.0/8 exact reject
10.0.0.0/8 as a Martian address and explicitly rejects traffic to/from this range.Load balancing distributes traffic across multiple available paths to improve performance and redundancy.
What is Load Balancing?
When to Use Load Balancing?
Types of Load Balancing in Junos OS:
Configuration Example:
set forwarding-options hash-key family inet layer4
Routing instances allow logical separation of routing tables within the same physical device. This enables multi-tenancy or specific traffic segregation.
What are Routing Instances?
Types of Routing Instances:
When to Use Routing Instances?
Example Scenario:
192.168.1.0/24).Configuration Example for VRF:
set routing-instances customerA instance-type vrf
set routing-instances customerA interface ge-0/0/1
set routing-instances customerA route-distinguisher 100:1
set routing-instances customerA vrf-target target:100:1
instance-type vrf: Indicates this is a VRF instance.interface ge-0/0/1: Assigns this interface to the VRF.route-distinguisher 100:1: Differentiates overlapping routes between VRFs.vrf-target target:100:1: Defines the VPN target community for route advertisement.Filter-Based Forwarding (FBF) enables routing decisions based on packet attributes rather than just destination IP addresses.
What is Filter-Based Forwarding?
When to Use FBF?
Example Scenario:
192.168.1.0/24 is routed through ISP A, while other traffic uses ISP B.FBF Process:
Configuration Example:
set firewall family inet filter traffic-filter term 1 from source-address 192.168.1.0/24
set firewall family inet filter traffic-filter term 1 then routing-instance ISP_A
set firewall family inet filter traffic-filter term 2 then accept
set interfaces ge-0/0/1 unit 0 family inet filter input traffic-filter
traffic-filter term 1 from source-address 192.168.1.0/24: Matches traffic from this subnet.then routing-instance ISP_A: Directs matched traffic to the ISP_A routing instance.filter input traffic-filter: Applies the filter to incoming traffic on the interface.Protocol-independent routing refers to routing features and mechanisms that are not tied to any specific routing protocol such as OSPF, IS-IS, or BGP. These features form the foundation of the routing system and include route filtering, routing preferences, routing tables, and route selection logic. They apply universally, regardless of which protocols are in use.
When multiple routing protocols learn routes to the same destination, Juniper devices use preference values to determine which route to install in the routing table. This selection process is protocol-independent and plays a critical role in ensuring routing stability and predictability.
Route preference is a numerical value assigned to each route.
The lower the value, the higher the preference.
If multiple routes exist to the same destination, the route with the lowest preference value is selected.
| Route Type | Default Preference |
|---|---|
| Direct | 0 |
| Static | 5 |
| OSPF Internal | 10 |
| IS-IS Level 1 | 15 |
| IS-IS Level 2 | 18 |
| BGP Internal (iBGP) | 170 |
| BGP External (eBGP) | 170 |
If a destination network 192.0.2.0/24 is learned through both OSPF (preference 10) and BGP (preference 170), Junos installs the OSPF route in the routing table because it has a lower preference.
You can manually override default preferences:
set protocols ospf preference 80
This would set the OSPF preference to 80, lowering its priority compared to the default.
Understanding the difference between these two tables is crucial, especially when troubleshooting or interpreting command outputs in Junos.
Also called RIB (Routing Information Base).
Logical table containing all learned routes from various protocols: static, direct, OSPF, IS-IS, BGP, etc.
Junos stores this in the inet.0 table for IPv4 routes.
Routes here are evaluated and selected based on route preference, metric, and protocol-specific rules.
Command Example:
show route table inet.0
Also called the Forwarding Information Base.
Contains only the best routes selected from the routing table.
Used by the Packet Forwarding Engine (PFE) to actually forward packets.
Faster, hardware-optimized, and stripped of alternate routes.
Command Example:
show route forwarding-table
| Feature | Routing Table (inet.0) |
Forwarding Table (FIB) |
|---|---|---|
| Purpose | Stores all candidate routes | Stores only active forwarding routes |
| Includes alternate paths | Yes | No |
| Used by forwarding plane | No | Yes |
| Output Command | show route |
show route forwarding-table |
Route preference governs which route is preferred among competing protocols; lower values are more preferred.
Routing table shows all available routes; forwarding table includes only the best route per destination, used for actual packet forwarding.
Both are protocol-independent concepts, making them foundational to routing operations in Junos OS.
What is the difference between the routing table (RIB) and the forwarding table (FIB) in Junos OS?
The routing table (RIB) stores all learned routes, while the forwarding table (FIB) contains only the best routes used for packet forwarding.
In Junos OS, protocols such as OSPF, BGP, and static routes install routes into the Routing Information Base (RIB), typically inet.0. The router evaluates metrics, preferences, and policies to determine the best path for each destination. Only these selected best routes are then installed into the Forwarding Information Base (FIB), which resides in the Packet Forwarding Engine (PFE). The FIB is optimized for high-speed lookup and contains minimal information required for forwarding packets. If a route exists in the RIB but not the FIB, it means it was not selected as the active route. Understanding this distinction is critical for troubleshooting routing issues where routes appear correct but traffic is not forwarded.
Demand Score: 64
Exam Relevance Score: 70
Why does a route appear in the Junos routing table but not forward traffic?
Because the route may not be the active route installed into the forwarding table.
A route can appear in the routing table (show route) even if it is not selected as the active path. Junos may learn multiple routes for the same destination through different protocols such as OSPF, BGP, or static routes. The router compares route preference, metrics, and policy decisions to determine the best path. Only the best route is installed in the forwarding table (show route forwarding-table). If the route shown is inactive, it will not be used for packet forwarding. Troubleshooting should include checking route preference, protocol metrics, and policy statements that may affect route selection.
Demand Score: 58
Exam Relevance Score: 66
What is the purpose of routing instances in Junos OS?
Routing instances allow multiple independent routing tables to exist on the same router.
Routing instances enable network virtualization by creating separate routing domains within a single physical device. Each instance maintains its own routing table and protocol processes. This capability is commonly used for MPLS VPNs, logical routing separation between customers, or lab environments where multiple routing contexts must coexist. In Junos, routing instances are configured under routing-instances and can operate in several modes such as virtual-router, vrf, or forwarding. Because each instance maintains its own RIB, routes learned in one instance do not automatically appear in another unless route leaking or policies are configured. Understanding routing instances is important for service provider environments and for isolating routing domains.
Demand Score: 55
Exam Relevance Score: 72