Protocol Independent Routing
Beyond a single static route
Protocol independent routing covers the pieces that do not belong to a dynamic protocol: static routes, aggregates, generated routes, martian filters, routing instances, and filter-based forwarding. A static route (set routing-options static route 10.0.0.0/8 next-hop 192.0.2.1) can carry preference and metric, and a route with several next hops can use qualified-next-hop with a different preference per next hop for primary/backup behaviour. discard silently blackholes traffic while reject returns ICMP unreachable - exam questions love that distinction.
Aggregates and generated routes
An aggregate (set routing-options aggregate route 10.0.0.0/16) becomes active only when at least one contributing more-specific route is present; contributing routes are suppressed by default unless you set active or use policy. A generated route stays inactive until a policy matches, so it is the tool for conditional default routes. Both need a contributing or matching condition to be installed, which is why a lab aggregate can show as hidden.
Preferences and instances
Junos default preferences: direct 0, static 5, OSPF internal 10, IS-IS L1 15 and L2 18, RIP 100, OSPF external 150, BGP 170. Lower wins. A routing instance (set routing-instances RED instance-type virtual-router) gets its own tables, and a firewall filter action of routing-instance implements filter-based forwarding.
Traps
- Expecting an aggregate to appear with no contributing routes.
- Forgetting that static routes need a resolvable or on-link next hop, and that an interface next hop behaves differently from an IP next hop.
- Martian addresses are configured to block bogus source or destination space, not to steer traffic.
Worked example
Two ISPs: give ISP-A's qualified next hop preference 5 (the global default) and ISP-B's preference 10, so failover happens only when A's next hop becomes unreachable.