Static routes have actually a really low governmental distance of 1, this method that your router will like a static route over any routes that were learned through a dynamic routing protocol. If we desire to use a static path as a back-up route, we’ll have actually to readjust its governmental distance. This is dubbed a floating static route.
You are watching: What is the correct syntax of a floating static route?
In this lesson, I’ll show you how to carry out this. Us will usage the complying with topology because that this:
R1 can use R2 or R3 to gain to the 192.168.23.0/24 network.
Let’s configure R1 and also R2 to usage RIP so that it can reach this network:
R1(config)#router ripR1(config-router)#version 2R1(config-router)#no auto-summary R1(config-router)#network 192.168.12.0R2(config-router)#version 2R2(config-router)#no auto-summary R2(config-router)#network 192.168.12.0R2(config-router)#network 192.168.23.0R1 should now be able to reach this network through R2:
R1#show ip route | start 192.168.23.0R 192.168.23.0/24 <120/1> via 192.168.12.2, 00:00:22, GigabitEthernet0/1There we go, R1 has actually a route. What if we want to use R3 as a backup? R3 is no running any kind of routing protocols, for this reason we need to use a static route. This is a possibility as soon as the router is outside of her control.
Let’s produce a static course for 192.168.23.0/24 v R3:
R1(config)#ip path 192.168.23.0 255.255.255.0 192.168.13.3This static route works yet there’s one catch, check the routing table:
R1#show ip course | begin 192.168.23.0S 192.168.23.0/24 <1/0> via 192.168.13.3Because of the lower administrative distance (1 for a static route), our RIP route is now gone…let’s remove this static route:
R1(config)#no ip course 192.168.23.0 255.255.255.0 192.168.13.3The cheat is the you should configure an advertisement when friend configure your revolution route. Here’s how:
R1(config)#ip path 192.168.23.0 255.255.255.0 192.168.13.3 ? street metric because that this path multicast multicast route name Specify name of the following hop permanent permanent path tag collection tag for this path track download route depending upon tracked items The bureaucratic distance the RIP is 120 so if we choose a higher number, our static course will be supplied as a backup. Let’s shot 121:
R1(config)#ip course 192.168.23.0 255.255.255.0 192.168.13.3 121When we now inspect our routing table:
R1#show ip route | start 192.168.23.0R 192.168.23.0/24 <120/1> via 192.168.12.2, 00:00:26, GigabitEthernet0/1We view that the RIP entry is used again. The static path is still over there somewhere behind the scenes…let’s see if that is true. To test this, I will certainly shut the interface on R2 the connects come R1:
R2(config)#interface GigabitEthernet 0/1R2(config-if)#shutdownRIP is a pretty sluggish routing protocol, so you need to wait awhile for the route to disappear. After ~ awhile, you will see the alters in the routing table the R1:
R1#show ip course | start 192.168.23.0S 192.168.23.0/24 <121/0> via 192.168.13.3There it is, our floating static route is now installed in the routing table. You deserve to see it mirrors the advertisement of 121. If you would un-shut the user interface of R2, it will install the RIP route again.
See more: Round And Round It Goes Where It Stops Nobody Knows, Round And Round It Goes
hostname R1!ip cef!interface GigabitEthernet0/1 ip address 192.168.12.1 255.255.255.0!interface GigabitEthernet0/2 ip attend to 192.168.13.1 255.255.255.0!router rip network 192.168.12.0 no auto-summary!ip path 192.168.23.0 255.255.255.0 192.168.13.3 121!end
hostname R2!ip cef!interface GigabitEthernet0/1 ip deal with 192.168.12.2 255.255.255.0!interface GigabitEthernet0/2 ip deal with 192.168.23.2 255.255.255.0!router rip network 192.168.12.0 network 192.168.23.0 no auto-summary!end
hostname R3!ip cef!interface GigabitEthernet0/1 ip deal with 192.168.13.3 255.255.255.0!interface GigabitEthernet0/2 ip resolve 192.168.23.3 255.255.255.0!end