In the absence of a dynamic routing protocol, sometimes you will find your routers fail to re-route traffic when a link becomes unavailable. This is a typical problem faced by most small networks that have a router connected to a tier 3 ISP which doesn’t run a dynamic routing protocol. It’s all good if you have ensured you have multiple links to multiple ISPs ensuring redundancy is in place. But if you don’t have IP SLA configured, at some point you will be left frustrated like I was when one of the ISPs on my routers had an internal network outage.
A static route stays up until the interface goes down. That is, if the interface that is part of the same subnet as the next hop goes down, the router thinks the next hop is unavailable and therefore, marks the route down. Traffic should then simply re-route using the secondary default static route you have in place.
However, if the interface stays up but the ISP starts discarding your traffic internally, than you will simply be blackholing your own traffic! This means a network outage is on the cards.
So how can we insert some intelligence on the router itself so that it can mark a route down in a situation like this?
Cisco’s IP SLA is great feature to tackle this problem.
To configure IP SLA refer to the following configuration snippet.
Static route config:
ip route 0.0.0.0/0 126.96.36.199 distance 5 track 1
ip route 0.0.0.0/0 188.8.131.52 distance 250
The above configuration is pretty standard. It configures two static routes pointing towards two different next-hop addresses with a difference in the distance for both to ensure the route via 184.108.40.206 is always preferred.
In order to ensure our router is actively performing some sort of tracking we have inserted the configuration command track 1.
What this would do is refer the router to look for IP SLA config and perform tracking based on that.
Refer to the IP SLA config snippet below.
IP SLA Config:
ip sla 1
icmp-echo 220.127.116.11 source-interface GigabitEthernet1/0/1
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
All the above configuration would do is keep sending ICMP requests to the next hop 18.104.22.168 every 5 seconds as defined by the frequency command.
It would wait for 2000 milliseconds to receive a response from the pinged destination.
Upon configuration of the command track 1 ip sla 1 reachability, IP SLA tracking would begin which would then record any lapses in ping responses from 22.214.171.124. Upon a lapse, the primary static route would go down making way for the secondary route to become active.
However, the router would keep sending ICMP probes and as soon as it would receive a response, the primary static route would be re-added into the routing table. Based on our configuration, this would demote the active route with next-hop 126.96.36.199 as it’s administrative distance is configured higher at 250.
So there it is! Your guide to ensuring your routers with static configuration always have a valid path to the internet.
Got questions? Leave a comment! Let’s chat.