Static routes are only removed from the routing table if the next hop becomes unreachable. This can occur if the local or neighbor interface goes down. To have an IPv4 static route remain installed in the routing and forwarding tables, include the passive statement:
-
static (defaults | route) {
-
passive;
- }
To have an IPv6 static route remain installed in the routing and forwarding tables, include the passive statement:
-
rib inet6.0 static (defaults | route) {
-
passive;
- }
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.
Routes that have been configured to remain continually installed in the routing and forwarding tables are marked with reject next hops when they are inactive.
To explicitly remove IPv4 static routes when they become inactive, include the active statement. Include this statement when configuring an individual route in the route portion of the static statement to override a passive option specified in the defaults portion of the statement.
-
static (defaults | route) {
-
active;
- }
To explicitly remove IPv6 static routes when they become inactive, include the active statement. Include this statement when configuring an individual route in the route portion of the static statement to override a passive statement specified in the defaults portion of the statement.
-
rib inet6.0 static (defaults | route) {
-
active;
- }
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.