Backup routes and host routes

Floating static routes

A floating static route is a backup: a static route with a higher AD than the main route, so it stays out of the table while the main route is there. When the main route goes away (its interface goes down), the backup "floats" into the table.

Here R1 and R3 have a direct link (10.0.13.0/30). It's the main path between the two LANs. The path through R2 is the backup, with AD 5. Look at R1's table, then break the direct link:

In NetLab

▶ R1
R1>enable
R1#show ip route static
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
       + - replicated route, % - next hop override

Gateway of last resort is not set

S     192.168.3.0/24 [1/0] via 10.0.13.2
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface g0/2
R1(config-if)#shutdown
*Mar  1 00:00:05.000: %LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down
*Mar  1 00:00:05.000: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
R1(config-if)#end
*Mar  1 00:00:06.000: %SYS-5-CONFIG_I: Configured from console by console
R1#show ip route static
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
       + - replicated route, % - next hop override

Gateway of last resort is not set

S     192.168.3.0/24 [5/0] via 10.0.12.2
▶ PC1
NetLab Windows-style command prompt. Type help to see the commands.
C:\Users\student>tracert 192.168.3.10

Tracing route to 192.168.3.10 over a maximum of 30 hops

  1   <1 ms    <1 ms    <1 ms  192.168.1.1
  2       *     2 ms     2 ms  10.0.12.2
  3       *     3 ms     3 ms  10.0.23.2
  4       *     4 ms     4 ms  192.168.3.10

Trace complete.

With the direct link up, only the AD 1 route is in the table. Once Gi0/2 is down, the next hop 10.0.13.2 can't be reached, that route goes, and the AD 5 route via R2 takes its place. The trace now crosses three routers.

Remember: A floating static route has the same prefix as the main route and a higher AD.

Tip: A static route only goes away when the router itself sees the failure: its own interface goes down. If a link two routers away fails, static routes don't notice, and traffic is dropped further on. Routing protocols such as OSPF (next module) fix that.

Host routes

A host route is a route to a single address: a /32 (mask 255.255.255.255). Use it to send traffic for one server a different way:

ip route 192.168.3.10 255.255.255.255 10.0.13.2

Longest match means this /32 beats the /24 for that one address only.

HOME LABS COMMUNITY DASHBOARD