What type of static route can be configured to be a backup route in case the primary route fails?

Static routing is a form of routing that occurs when a router uses a manually-configured routing entry, rather than information from dynamic routing traffic.[1] In many cases, static routes are manually configured by a network administrator by adding in entries into a routing table, though this may not always be the case.[2] Unlike dynamic routing, static routes are fixed and do not change if the network is changed or reconfigured. Static routing and dynamic routing are not mutually exclusive. Both dynamic routing and static routing are usually used on a router to maximise routing efficiency and to provide backups in case dynamic routing information fails to be exchanged. Static routing can also be used in stub networks, or to provide a gateway of last resort.

Static routing may have the following uses:

  • Static routing can be used to define an exit point from a router when no other routes are available or necessary. This is called a default route.
  • Static routing can be used for small networks that require only one or two routes. This is often more efficient since a link is not being wasted by exchanging dynamic routing information.
  • Static routing is often used as a complement to dynamic routing to provide a failsafe backup if a dynamic route is unavailable.
  • Static routing is often used to help transfer routing information from one routing protocol to another (routing redistribution).

Static routing, if used without dynamic routing, has the following advantages:[citation needed]

  • Static routing causes very little load on the CPU of the router, and produces no traffic to other routers.
  • Static routing leaves the network administrator with full control over the routing behavior of the network.
  • Static Routing Is very easy to configure on small networks.

Static routing can have some potential disadvantages:[3]

  • Human error: In many cases, static routes are manually configured. This increases the potential for input mistakes. Administrators can make mistakes and mistype in network information, or configure incorrect routing paths by mistake.
  • Fault tolerance: Static routing is not fault tolerant. This means that when there is a change in the network or a failure occurs between two statically defined devices, traffic will not be re-routed. As a result, the network is unusable until the failure is repaired or the static route is manually reconfigured by an administrator.
  • Administrative distance: Static routes typically take precedence over routes configured with a dynamic routing protocol. This means that static routes may prevent routing protocols from working as intended. A solution is to manually modify the administrative distance.[4]
  • Administrative overhead: Static routes must be configured on each router in the network(s). This configuration can take a long time if there are many routers. It also means that reconfiguration can be slow and inefficient. Dynamic routing on the other hand automatically propagates routing changes, reducing the need for manual reconfiguration.

To route IP traffic destined for the network 10.10.20.0/24 via the next-hop router with the IPv4 address of 192.168.100.1, the following configuration commands or steps can be used:

Linux

In most Linux distributions, a static route can be added using the iproute2 command. The following is typed at a terminal:-[5]

root@router:~# ip route add 10.10.20.0 via 192.168.100.1

Cisco

Enterprise-level Cisco routers are configurable using the Cisco IOS command line, rather than a web management interface.

Add a static route

The commands to add a static route are as follows:[6]

Router> enable Router# configure terminal Router(config)# ip route 10.10.20.0 255.255.255.0 192.168.100.1

Network configurations are not restricted to a single static route per destination:[6]

Router> enable Router# configure terminal Router(config)# ip route 197.164.73.0 255.255.255.0 197.164.72.2 Router(config)# ip route 197.164.74.0 255.255.255.0 197.164.72.2

Configuring administrative distance

The administrative distance can be manually (re)configured so that the static route can be configured as a backup route, to be used only if the dynamic route is unavailable.[7]

Router(config)# ip route 10.10.20.0 255.255.255.0 exampleRoute 1 254

Setting the administrative distance to 254 will result in the route being used only as a backup.

  • Routing
  • Dynamic routing
  • Routing protocol
  • Routing table
  • Router
  • Route
  • Metrics

  1. ^ TCP/IP Tutorial and Technical Overview (IBM RedBooks Series)
  2. ^ "Cisco IOS Dial Technologies Configuration Guide, Release 12.2SR - Reliable Static Routing Backup Using Object Tracking [Cisco IOS Software Releases 12.2 SR]".
  3. ^ Tetz E (n.d), Pros and Cons of Static Routing www.dummies.com, accessed 5 November 2013
  4. ^ Cisco Systems (n.d), Configuring Static Routing, accessed 5 November 2013
  5. ^ "16.4. Static Routes and the Default Gateway Red Hat Enterprise Linux 5".
  6. ^ a b ip route
  7. ^ Cisco Systems (2013), What is Administrative Distance?, retrieved 12 June 2014

Retrieved from "https://en.wikipedia.org/w/index.php?title=Static_routing&oldid=1056748451"

What is a floating static route, and what are its characteristics? This post will show how to configure a floating static route and provide a workflow and example configuration for real-world scenarios.

What is a floating static route?

As the name suggests, a floating static route is used in lifesaving situations as a float when the primary route to a destination network is down. A floating static route is a type of static route that can provide a backup path for a primary static or dynamic route in the event of a link failure.

Because lower AD (Administrative Distance) is always preferred, you must configure it with a higher administrative distance than the original routing protocol to ensure that it is only used when the primary route (dynamic or static) is unavailable.

What is a characteristic of a floating static route?

Below are some of the characteristics of a floating static route.

  • It is a type of static route; you can only create it manually.
  • It is a static route with an administrative distance set high enough to make it a less preferred route but not so high that it will become inaccessible.
  • This route can be a backup route when the primary route goes down.
  • It can be configured as a backup for static routing and dynamic routing protocols both.
  • It can be configured to serve as a gateway of last resort.​

Why is a floating static route important?

A floating static route is important because it is used as a backup link to a destination network. If a route to the primary link fails, the floating static route will take over. This ensures a route is always available, and traffic can flow even if the primary route fails.

A floating static route with IP SLA also allows a network administrator to dynamically change the route without reconfiguring anything in the entire network. This route is often used with a default route to provide better redundancy toward a destination network.

How to configure a floating static route?

What type of static route can be configured to be a backup route in case the primary route fails?
Floating Static Route Example without IP SLA

A simple floating static route is easier to configure. You create two identical routes with different next-hop addresses and administrative distances.

– Configuration Example:

  • ip route 192.168.101.0 255.255.255.0 12.12.12.2 – Primary route with Default Administrative Distance of 1
  • ip route 192.168.101.0 255.255.255.0 13.13.13.3 5 – Backup route with a higher AD than the default AD value

Always remember that the local interface status does not represent end-to-end transport, especially on multipoint interfaces or if any layer2 devices (switch or hub) in-between reside and fail. 

This will work if you do a recursive lookup that gives end-to-end next-hop reachability. However, a black hole (when the packets loop till the TTL expires) will create in this situation if there is no end-to-end next-hop reachability.

Let’s take an example; assume the first route above is going across a layer2 switch. If the switchport facing the Router2 fails but the other local interface connected to the switch stays up, the local interface would still appear as UP/UP, creating a black hole for some duration. You can use Enhanced object tracking (IP SLA) to tackle these situations. Although generally advised is to use IP SLA tracking with floating static routes.

Floating static route Cisco example use case

Let’s take a more practical approach and include IP SLA to track the reachability.

What type of static route can be configured to be a backup route in case the primary route fails?
What is a Floating Static Route – Example with IP SLA

I have used cisco routers here for this example. If you use any device other than Cisco, please check with the vendor if they support this feature.

  • ip sla monitor 1 – Creates an RTR/IP SLA
    • type echo protocol IpIcmpEcho 12.12.12.2 [source] – Creates a ping to destination
    • timeout 200 – Configures the timeout in milliseconds
    • frequency 5 – configures the frequency in seconds
  • ip sla monitor schedule 1 start now – Starts running the SLA now
  • track 10 rtr 1 – Creates a track that calls RTR (Response Time Reporter) / IP SLA monitor
  • ip route 192.168.101.0 255.255.255.0 12.12.12.2 track 10 – Primary route with an administrative distance of 1 and the most trustful connection after directly connected network: If object-1 of track-10 goes down, the router will remove this route.
  • ip route 192.168.101.0 255.255.255.0 13.13.13.3 5 – Backup route

Show commands.

  • sh ip sla monitor statistics – Shows brief status: UP, DOWN, last error
  • sh ip sla monitor collection-statistics – Shows detailed stats, i.e., successful, disconnects, timeouts, busy, errors
  • sh track {number} – Shows the configured track statement
  • show ip route 192.168.101.0 – Check the routing table to show the active route for the network.

A Quick Floating Static Route Workflow

Step 1:- Identify the primary route you want to configure as a backup.

Step 2:- Check if you have any backup path or backup link that exists in your network towards the destination network.

Step 3:- Identify the appropriate device where you want to configure the floating static route.

Step 4:- Check the routing table with the “show ip route” command to identify existing routes and their metric.

Step 5:- Configure the IP SLA monitor and schedule it.

Step 6:- Create a Track which calls the IP SLA monitor.

Step 7:- Attach the Track to the primary route to monitor it.

Step 8:- Configure the static floating route with a higher admin distance and a different next-hop than the primary one.

Step 9:- That’s it; you are done. Now track will use an IP SLA monitor to monitor the primary route and switch to a floating static route if the primary route goes down. And don’t worry, if the primary route becomes available again, then IP SLA will notify the track, and it switches back to the primary route again without any extra configuration.

Step 10:- Use the above show commands to check and monitor SLA and routing table.

Conclusion

In summary, if you want to quickly create a high availability or redundancy route across your network, floating static routes are one of the best solutions. I hope you liked the article; please share.