A floating static route is a backup route configured with a higher administrative distance than the primary route. It serves as a failover mechanism in case the primary route becomes unavailable.
A floating static route is mainly used when there are two connections from a router to a subnetwork. The first connection may be using a static route to connect to the remote subnet, while the second connection may be using a route learned via a dynamic routing protocol like OSPF. Because OSPF has a higher administrative distance value of 110, traffic destined for the subnetwork by default will travel using the static route because it has a lower AD value of 1. But in most cases, due to certain reasons, it is preferred for the traffic to go to the subnetwork using the route learned via the dynamic routing protocol. In this case, the static route needs to be configured as a floating static route. To configure a floating static route in this case, we need the AD value of the static route to be higher than the administrative distance(AD) value of the OSPF. In the event of a failure of the connection using OSPF, the floating static will take over and start forwarding traffic to the subnet.
Also, if both connections to the subnet are configured with static routes, the two routes will have an administrative distance of 1. However, one connection may be preferred to forward the traffic over the other. In this case, the second static route will need to be configured as a floating static route by increasing the administrative distance to be higher than 1.
In this post, I will be showing you how to configure a floating static route on a network topology we described below.
Network Topology
The network topology we will be making use of in this post is shown below. As you can see, it consists of two routers joined together using two cables. In this demonstration, we will demonstrate how to configure a floating static route using the two connections.
How to Configure Floating Static Route
Here are the steps to configure a floating static route on the network topology shown above.
Step 1: Configure the interfaces of the routers
Router 1
R1(config)#interface ethernet0/0
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface ethernet0/1
R1(config-if)#ip address 192.168.21.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.12.1 YES manual up up
Ethernet0/1 192.168.21.1 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Loopback0 10.10.10.1 YES manual up up
Router 2
R2(config)#interface ethernet0/0
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface ethernet0/1
R2(config-if)#ip address 192.168.21.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 0
R2(config-if)#ip add 172.16.0.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.12.2 YES manual up up
Ethernet0/1 192.168.21.2 YES manual up up
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
Loopback0 172.16.0.1 YES manual up up
Step 2: Test Connectivity between R1 and R2
R1#ping 192.168.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#ping 192.168.21.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.21.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#ping 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#ping 192.168.21.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.21.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Step 3: Configure the Floating Static route
On R1, create the route via 192.168.12.2 as the main one and the route via 192.168.21.2 as the backup one (Hint: Increase the Distance metric for the route via 192.168.21.2)
R1(config)#ip route 172.16.0.0 255.255.255.0 192.168.12.2 1
R1(config)#ip route 172.16.0.0 255.255.255.0 192.168.21.2 2
Step 4: Confirm the Floating Static Route Configuration
You can confirm that the route with higher AD is floating by using the “show IP route” command to check which route is added in the routing table. A floating static route will not appear on the routing table.
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, Loopback0
L 10.10.10.1/32 is directly connected, Loopback0
172.16.0.0/24 is subnetted, 1 subnets
S 172.16.0.0 [1/0] via 192.168.12.2 <-- Floating static Route (The route 172.16.0.0/24 [2/0] via 192.168.21.2 is not displayed in the routing table because it is a backup route.)
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Ethernet0/0
L 192.168.12.1/32 is directly connected, Ethernet0/0
192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.21.0/24 is directly connected, Ethernet0/1
L 192.168.21.1/32 is directly connected, Ethernet0/1
Step 5: Create 2 static routes to reach 10.10.10.0/24 from both gateway
R2(config)#ip route 10.10.10.0 255.255.255.0 192.168.12.1
R2(config)#ip route 10.10.10.0 255.255.255.0 192.168.21.1
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 [1/0] via 192.168.21.1
[1/0] via 192.168.12.1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Loopback0
L 172.16.0.1/32 is directly connected, Loopback0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Ethernet0/0
L 192.168.12.2/32 is directly connected, Ethernet0/0
192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.21.0/24 is directly connected, Ethernet0/1
L 192.168.21.2/32 is directly connected, Ethernet0/1
Other Connectivity Checks
Check if IP Address of loopback0 on R1 can connect to IP Address of loopback0 on R2
R1#ping 172.16.0.1 source 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Check if IP Address of loopback0 on R2 can connect to IP Address of loopback0 on R1
R2#ping 10.10.10.1 source 172.16.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Check if IP Address of loopback0 on R2 can connect to IP Address of loopback0 on R1
R2#ping 10.10.10.1 source 172.16.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
That is all for this post. If you have any questions, do leave them in the comment section below.
Reference: https://github.com/misterkrittin/CCNA-Labs
I am a passionate Networking Associate specializing in Telecommunications.
With a degree in Electronic engineering, I possess a strong understanding of electronic systems and the intricacies of telecommunications networks. I gained practical experience and valuable insights working for a prominent telecommunications company.
Additionally, I hold certifications in networking, which have solidified my expertise in network architecture, protocols, and optimization.
Through my writing skills, I aim to provide accurate and valuable knowledge in the networking field.
Connect with me on social media using the links below for more insights.
You can contact me using [email protected] or connect with me using any of the social media account linked below