static
Syntax
static{
defaults {
static-options;
}
rib-groupgroup-name;
routedestination-prefix{
next-hop;
qualified-next-hopaddress{
metricmetric;
preferencepreference;
}
static-options;
}
}Hierarchy Level
[edit routing-options],[edit routing-options ribrouting-table-name],
[edit routing-instancesrouting-instance-namerouting-options]Description
Configure static routes to be installed in the routing table. You can specify any number of routes within a single
staticstatement, and you can specify any number ofstaticstatements in the configuration.Options
defaults—Configure default static route.
routedestination-prefix—Destination of the generated route.
defaults—For the default route to the destination. This is equivalent to specifying an IP address of0.0.0.0/0.destination-prefix/prefix-length—destination-prefixis the network portion of the IP address, andprefix-lengthis the destination prefix length.
next-hop—How to reach the destination.
discard—Do not forward packets addressed to this destination. Instead, drop the packets, do not send ICMP unreachable messages to the packets' originators, and install a reject route for this destination into the routing table.next-hopaddress—Reach the next-hop router by specifying an IP address or an interface name.next-tablerouting-table-name—Name of the next routing table to the destination.receive—Install a receive route for this destination into the routing table.eject—Do not forward packets addressed to this destination. Instead, drop the packets, send ICMP unreachable messages to the packets' originators, and install a reject route for this destination into the routing table.
static-options—(Optional underroute) Additional information about static routes, which is included with the route when it is installed in the routing table.You can specify one or more of the following in
static-options. Each of the options is explained separately.
- (
active|passive);as-path<as-path> <origin(egp|igp|incomplete)> <atomic-aggregate> <aggregatoras-number in-address>;community[community-ids]- (
install|no-install);- (
metric|metric2|metric3|metric4)value<typetype>;- (
preference|preference2|color|color2)preference<typetype>;- (
readvertise|no-readvertise);- (
resolve|no-resolve);- (
no-retain|retain);tagstring;The remaining statements are explained separately.
Usage Guidelines
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.