Static route

From Hill2dot0
Jump to: navigation, search

In a packet network, a static route to a particular destination is one that is manually configured, typically by the network administrator. For a particular router or end station, a static route fixes the relationship between a particular destination network or device and the nearby router that should be used to reach it. It can help secure certain communications by limiting them to particular routes within the network. It can also be used when learning a route is not possible, or when it produces unwanted side effects. In most situations, if a static route has been configured for a particular network, the router or originating end station must use it.

General Background

Static Routing

To create a static route, the network administrator manually configures an entry in the routing table of a router or end station. Static routing is useful when there are no redundant paths between two or more locations. If there is no new path to learn when a failure occurs, a dynamic routing protocol capable of learning routes provides little or no benefit.

If only static routing is used (i.e., no dynamic routing protocol), care must be taken to define all possible destinations reachable from the device. If a destination is not in the routing table, the router will drop the packet and send back an Internet Control Message Protocol (ICMP) Destination Unreachable message to the source.

Static routes are entered into a routing table. Once installed, they can be redistributed into a dynamic routing protocol (e.g., Border Gateway Protocol (BGP)) so that other routers can dynamically learn the statically defined route, saving administrative overhead.

Static routes should be used sparingly within a network because they are administratively intensive. A small change in the network might require several routers to be reconfigured to reflect the change.

Benefits of Static Routing

Eliminating the routing protocol in favor of a static route provides a slight benefit: a reduction of bandwidth consumed on a wide area network (WAN) connection. A routing protocol requires some amount of the bandwidth be used to send updates across the network. Eliminating it saves that much bandwidth. The net gain will vary depending on the speed of the link, the type of WAN technology, and the type of routing protocol. The most gain is on low speed packet services that implement multiple virtual circuits and where a distance vector routing protocol (DVRP) is being used. A classic example is a frame relay hub location when the Routing Information Protocol (RIP) is in use. The least gain would be on high-speed services that support multicasting and where a link state routing protocol (LSRP) is in use. The classic example is a Metro Ethernet service implementing an E-LAN service and where the Open Shortest Path First (OSPF) routing protocol is in use.

Static routing also reduces the routing protocol overhead in times of instability. For example, an ISP will typically use static routing to point to a particular customer's network. This way the ISP is not dependent on the customer for providing accurate routing information, which reduces the routing updates it needs to pass around as customer networks are reset or go offline.

Static Routes and Default Routes

The default route is an important route in a network. It is the "all others go here" route. When a packet arrives at a router that has no explicit route listed for the intended destination, it will fall back to the default route, if it exists. The default route has to introduced into a network environment. Although it can be distributed by the routing protocol, the device at the leading edge of the default route typically has this route statically configured.

When a link to the Internet is installed, for example, the router directly connected to the Internet is statically programmed with the default route. It then uses the routing protocol to teach any internal routers that it is the best route to the rest of the Internet. The same can happen for a branch office network. The router connecting it to the main corporate location is statically configured with a default route that points to the hub location. It can then teach any routers within the branch that it is "the way out."

Static Routes and Backup Connections

Static routing is usually mandatory when some sort of dial-up access is used in the network. When a router has a dial-up connection (e.g., an ISDN BRI, a POTS link with a modem, or a VPN), the network administrator must define when to bring up the link. The router needs to know what destinations are reachable across the link. We cannot use a dynamic routing protocol because we can’t listen to route updates when the link is down.

A static route, however, normally takes priority over a learned one. If the administrator does not tread with care, they could end up defining a route that will cause the router to dial up the connection and leave it up permanently, preferring it over any other learned route. To avoid this, the administrative distance of the route needs to be adjusted to make it less preferable. Administrative distance is merely a measure of the confidence the router has in the quality of a route. The static route, being manually configured, is always preferable. But by changing the administrative distance to make it less preferred, the router will only initiate the backup connection when it loses the learned route and cannot find another. In this case, the network administrator would define a floating static route. The router would only use this route if the primary link failed.


<mp3></mp3> | Static route