Configuring Static Routes
The routing device uses dynamic routes to learn how to reach network destinations. Dynamic routes are determined from the information exchanged by the routing protocols and, as the name implies, the routes might change as network conditions change and these changes are discovered by the routing protocols. You can configure static (nonchanging) routes to some network destinations. The routing device uses static routes when it does not have a route to a destination that has a better (lower) preference value, when it cannot determine the route to a destination, or when it is forwarding unroutable packets.
Static routes are used when the network connects to a routing device or other system outside the network and either that system cannot run a routing protocol or you do not want to run a routing protocol on it. In these situations, a static route is created from an edge routing device to the outside system and then the edge routing device redistributes the static route to IGP.
A static route is installed in the routing table only when the route is active; that is, the list of next-hop routing devices configured for that route contains at least one next hop on an operational interface.
You can add the same routes to more than one routing table.
To configure static routes in the default IPv4 routing table (inet.0), include the static statement:
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
To configure static routes in one of the other routing tables, to explicitly configure static routes in the default IPv4 route table (inet.0), or to explicitly configure static routes in the primary IPv6 routing table (inet6.0), include the static statement:
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
![]() | Note: You cannot configure static routes for the IPv4 multicast routing table (inet.1) or the IPv6 multicast routing table (inet6.1). |
The static statement consists of two parts:
- defaults—(Optional) Specify global static
route options. These options only set default attributes inherited
by all newly created static routes. These are treated as global defaults
and apply to all the static routes you configure in the static statement.

Note: Specifying the global static route options does not create default routes. These options only set default attributes inherited by all newly created static routes.
- route—Configure individual static routes. In this part of the static statement, you optionally can configure static route options. These options apply to the individual destination only and override any options you configured in the defaults part of the static statement.
The following topics provide more information about configuring static routes:
- Configuring the Destination of Static Routes
- Configuring the Next Hop for Static Routes
- Configuring an Independent Preference for Static Routes
- Specifying an LSP as the Next Hop for Static Routes
- Installing Static Routes into More than One Routing Table
- Configuring CLNS Static Routes
- Configuring Static Route Options
- Configuring Default Routes
- Propagating Static Routes into Routing Protocols
- Examples: Configuring Static Routes
Hide Navigation Pane
Show Navigation Pane
Download
SHA1