Specify Static Route Options
In the
defaultsandrouteparts of thestaticstatement, you can specifystatic-options,which define additional information about static routes that is included with the route when it is installed in the routing table. All static options are optional. Static options that you specify in thedefaultspart of thestaticstatement are treated as global defaults and apply to all the static routes you configure in thestaticstatement. Static options that you specify in theroutepart of thestaticstatement override any global static options and apply to that destination only.To configure static route options for IPv4 static routes, include one or more options in the
defaultsorroutepart of thestaticstatement. Each of these options is explained in the sections that follow.[edit]routing-options {static {defaults {(active | passive);as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate><aggregatoras-number in-address>;community [community-ids];(install | no-install);metricmetric<typetype>;(preference | preference2 | color | color2)preference<typetype>;(readvertise | no-readvertise);(retain | no-retain);tagstring;}rib-groupgroup-name;routedestination-prefix{(active | passive);as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate><aggregatoras-number in-address>;community [community-ids];(install | no-install);metricmetric<typetype>;(preference | preference2 | color | color2)preference<typetype>;(readvertise | no-readvertise);(resolve | no-resolve);(retain | no-retain);tagstring;}}}For a list of hierarchy levels at which you can configure this statement, see the statement summary section for this statement.
To configure static route options for IPv6 static routes, include one or more options in the
defaultsorroutepart of thestaticstatement. Each of these options is explained in the sections that follow.[edit routing-options]rib inet6.0 {static {defaults {(active | passive);as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate><aggregatoras-number in-address>;community [community-ids];(install | no-install);metricmetric<typetype>;(preference | preference2 | color | color2)preference<typetype>;(readvertise | no-readvertise);(no-resolve | resolve);(no-retain | retain);}rib-groupgroup-name;routedestination-prefix{(active | passive);as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate><aggregatoras-number in-address>;community [community-ids];(install | no-install);metricmetric<typetype>;(preference | preference2 | color | color2)preference<typetype>;(readvertise | no-readvertise);(resolve | no-resolve);(retain | no-retain);}}}For a list of hierarchy levels at which you can configure this statement, see the statement summary section for this statement.
The following sections explain how to specify static route options:
- Specify the Route Metric
- Specify the Route Preference
- Specify Community Information
- Specify the AS Path
- Specify the OSPF Tag
- Specify Whether a Route Is Installed in the Forwarding Table
- Specify Whether the Route Is Permanently Installed in the Forwarding Table
- Specify Whether Inactive Routes Are Removed from the Routing or Forwarding Table
- Specify When the Route Can Be Readvertised
- Specify When the Route Can Be Resolved to a Prefix not Directly Connected