By default, static routes can point only to a directly connected next hop. You can configure an IPv4 route to a prefix that is not directly connected by resolving the route through the inet.0 and inet.3 routing tables. To configure an IPv4 static route to a prefix that is not a directly connected next hop, include the resolve statement:
-
static (defaults | route) {
-
resolve;
- }
You can configure an IPv6 route to a prefix that is not directly connected by resolving the route through the inet6.0 routing table. To configure an IPv6 static route to a prefix that is not a directly connected next hop, include the resolve statement:
-
rib inet6.0 static (defaults | route) {
-
resolve;
- }
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.