Basic Concepts of Static Routes
A router forwards data packets based on routing entries in a routing table. These routing entries can be manually configured or calculated using dynamic routing protocols. A static route typically refers to a manually configured route.
Static routes use less bandwidth than dynamic routes and do not occupy CPU resources for route calculation and update analysis. When a network fault occurs or the topology changes, static routes cannot be automatically updated and must be manually reconfigured to adapt to the network change. A static route has five parameters: destination IP address, mask, outbound interface, next hop, and preference.
Destination Address and Mask
The destination IPv4 address of a static route is expressed in dotted decimal notation. The mask of the route can be expressed either in dotted decimal notation or by the mask length. The mask length is the number of consecutive 1s in the mask. For details about the destination IPv6 address and mask of a static route, see "Basic IPv6 Configurations - Principles - IPv6 Addresses" in the Configuration Guide - IP Service. Setting the destination address and mask to all 0s configures a default static route. For details about the default static route, see Static Default Routes.
Outbound Interface and Next-Hop IP Address
When configuring a static route, you need to specify either the outbound interface or the next-hop IP address depending on the outbound interface type.
For a point-to-point (P2P) interface, you only need to specify an outbound interface. This automatically sets the IP address of the remote interface connected to the outbound interface as the next-hop address.
For a non-broadcast multiple access (NBMA) interface such as an Asynchronous Transfer Mode (ATM) interface, specify a next-hop IP address. This type of interfaces support point-to-multipoint (P2MP) networks and require mappings between IP addresses and link-layer addresses to be configured during the configuration of static routes. In this case, no outbound interface needs to be specified.
For a broadcast interface (such as an Ethernet interface) and a virtual template (VT) interface, specify a next-hop IP address. Ethernet interfaces are broadcast interfaces, and VT interfaces can be associated with several virtual access (VA) interfaces. If an Ethernet interface or a VT interface is specified as the outbound interface, there will be multiple next hops, and the system will not be able to decide which next hop to use.
Static Route Preference
Different static routes can be configured with different preference values. A smaller value indicates a higher preference. Specifying the same preference value for static routes with the same destination implements load balancing among these routes. Conversely, specifying different preference values for static routes with the same destination implements route backup among the routes. For details, see Load Balancing and Route Backup.