Types of Static Routes Explained

A router uses routing table entries to make forwarding decisions. A routing table entry specifies a path to a network. A router automatically discovers networks connected to its own interfaces and adds entries for them in the routing table. However, it can not add entries for networks available on other routers. You must either manually add entries for them or configure a routing protocol to automatically add them. A manually added route is called a static route. A routing table assigns the letter S to identify a static route entry.

The 'ip route' command adds a static route to the routing table. It uses the following syntax.

Router(config)# ip route destination_network_# [subnet_mask]
next_hop_ip_address
[administrative_distance] [permanent]
or
Router(config)# ip route destination_network_# [subnet_mask]
exit_interface
[administrative_distance] [permanent]

It requires the following information.

  • The destination network or host
  • The way to reach the destination network or host
  • Additional control options

Based on configuration style and how the router uses it, there are four types of static routes: static network routes, static host routes, fixed static routes, and floating static routes. Each type utilizes the required parameters differently. The following sections discuss these parameters and the way they are used in each type.

The destination network or host

This is the destination network or host for which you create the static route. If you create a static route for a network, the route is known as a static network route. And if you create a static route for a host, it's called a static host route.

To create a static network route, specify the subnet mask corresponding to the network. To create a static host route, use the subnet mask 255.255.255.255. For example, to create a static route for the network 30.0.0.0/8, the destination network is specified as 30.0.0.0 with a subnet mask of 255.0.0.0. To create a static route for the host 30.0.0.100/8, specify the destination host as 30.0.0.100 with a subnet mask of 255.255.255.255.

The way to reach the destination network or host

This parameter defines the method for forwarding data packets to the specified destination network or host. There are two options: specifying a local interface or the IP address of the next-hop router. When a local interface is specified, the router forwards packets to the destination network through that interface. When the IP address of the next-hop router is specified, the router forwards packets to it for delivery to the destination network.

The following image shows an example network.

Example network

In this network, either the value GigabitEthernet0/1 (local interface) or the IP address 20.0.0.2 (next-hop router) can be used on Router0 to forward data packets to the network 30.0.0.0/8 via Router1.

The following image shows the first option.

The next hop router

The following image shows the second option.

Local interface to forward packets

The 'ip route' command supports two additional parameters: administrative distance and the permanent option. Routers use the administrative distance (AD) value to select the optimal route to a destination when multiple routes are available. The route with the lowest administrative distance is preferred.

When two routes to the same destination exist, one can be designated as the primary route and the other as a backup. To configure a backup route, set its administrative distance to a value higher than that of the primary route. If multiple routes to the same destination exist, the router always uses the route with the lowest administrative distance. Since you have configured the administrative distance of the backup route higher than that of the main route, the router will not use the backup route as long as the main route is up.

If the primary route becomes unavailable, the backup route is automatically selected, as no other route remains. If the main route turns up again, because of its lower administrative distance, it becomes the winner again. The router removes the backup route from the routing table and adds the main route back. Because the router adds the backup route to the routing table only when the primary route fails and removes it when the primary route is restored, the backup route is called a floating static route. A floating static route is one that the router adds or removes from the routing table based on the status of the link.

Consider the previous example. In this design, Router0 has two routes to the network 30.0.0.0/8. The first route connects Router0 to 30.0.0.0/8 via Router1, while the second route connects Router0 to 30.0.0.0/8 via Router2 and Router1.

Different routes to the destination

To configure the first route as the primary route, set its administrative distance to a value lower than that of the second route. For example, set the administrative distance of the first route to 10 and the second route to 20.

By default, the router automatically removes a route from the routing table if the route’s link is down. The permanent parameter overrides this behaviour. If you use this parameter, the router always keeps the route in the routing table, no matter whether the route’s link is up or down. This route is known as the fixed static route. A fixed static route is one that the router always keeps in its routing table.

This tutorial is part of the tutorial series "Static Routing Configuration, Commands, and Concepts Explained". Other parts of this series are the following.
Chapter 1  Static Routes and Static Routing Explained
Chapter 2  Types of Static Routes Explained
Chapter 3  IP Route Command Explained with Examples
Chapter 4  Static Routing Configuration Guide with Examples

Conclusion

Static routes offer precise control over data forwarding within a network. There are four types of static routes: network routes, host static routes, fixed static routes, and floating static routes. Understanding these route types enables you to optimize routing for both reliability and efficiency. Effective use of administrative distance and route parameters ensures seamless failover and persistent connectivity, establishing static routing as a valuable tool in network design and troubleshooting.

ComputerNetworkingNotes CCNA Study Guide Types of Static Routes Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com