JUNOSe 11.0.x IP, IPv6, and IGP Configuration Guide
Configuring Static Routes with Indirect Next Hops
You can configure static routes where next hops are not on directly connected
interfaces. Such a route is usable, and appears in the route table, only if another
route in the route table can resolve the next hop.
The resolving route can be either statically created or dynamically learned by a routing
protocol (like RIP, BGP, OSPF, and so on).
NOTE: When configuring this type of static route, the route that resolves the next
hop must have an administrative distance value that is better (lower) than the distance
of the static route you want to resolve.
Figure 11: Static Routes with Indirect Next Hops
On the Boston router in the network shown in Figure 11 on page 30:
1.
2.
NOTE: The previous example shows the default administrative distance value, 1, to
illustrate the difference between the two static route commands. However, you do
not have to enter this value when issuing the command.
30
IP Routing
Use the no version to remove a static route from the routing table.
See ip route
Configure a static route to 10.2.0.0/16 with a next hop of 10.5.0.2 (which is not
directly connected) and an administrative distance of 254 (which is worse [higher]
than the default administrative distance for static routes [1]).
host1(config)#ip route 10.2.0.0 255.255.0.0 10.5.0.2 254
Configure another static route that resolves 10.5.0.2 and uses the default
administrative distance.
host1(config)#ip route 10.5.0.0 255.255.255.252 10.1.0.2 [ 1 ]
A static route to 10.2.0.0 is added to the route table with a next hop of 10.1.0.2
(on the directly connected Ethernet interface).
Need help?
Do you have a question about the IGP - CONFIGURATION GUIDE V11.1.X and is the answer not in the manual?
Questions and answers