cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2843
Views
0
Helpful
7
Replies

How to track a learned default route

Patrick Bixler
Enthusiast
Enthusiast

I have 2 core routers, 2 data centers and each has an ISP.

R1 is a VSS pair of 6807s in our main data center and is advertising a static default route for our primary Internet connection.  This route is advertised via EIGRP to the rest of the network including the Colo.

R2 is a Nexus 7010 in the Colo receives the default route through EIGRP advertisements.  It is the core router for our Colo and will need to take over routing to ensure the Colo is survivable.  When doing a "show ip route" it shows the following learned default route which originates from the main data center.

0.0.0.0/0, ubest/mbest: 1/0

    *via 10.20.30.225, Vlan960, [170/259328], 1w3d, eigrp-CCHCS500, external

On R1, I am looking to implement and IP SLA and tracker that checks to see if main ISP router is reachable and if not, it will remove the static default route and will no longer advertise it in EIGRP.  This router is configured to redistribute static. That IP SLA and Tracker looks like this.

ip sla 1

icmp-echo 206.121.115.61 source-interface VLAN 105

 

track 1 ip sla 1 reachability

delay down 15 up 30

 

event manager applet Default_Route

event track 1 state down

action 010 syslog msg "AT&T Internet Down"

action 020 cli command "enable"

action 030 cli command "config t"

action 040 cli command "no ip route 0.0.0.0 0.0.0.0 10.10.105.10"

action 090 syslog msg "Failing over to Verizon Internet"

 

event manager applet Default_Route

event track 1 state up

action 010 syslog msg "AT&T Internet Up"

action 020 cli command "enable"

action 030 cli command "config t"

action 040 cli command "ip route 0.0.0.0 0.0.0.0 10.10.105.10"

action 090 syslog msg "Returned traffic to AT&T"

R2 needs to see that there has been an EIGRP change and the default route has been removed.  When it does, it will configure a new static default route and advertise that through EIGRP to the rest of the network.  There are several scenarios as to why the Colo will need to do this for survivability or to advertise back to the data center networks a path to the secondary Internet.  I have a partial script written, but need to fill in the blanks. This router is also configured to redistribute static, but it has no static routes until it configures one.

ip sla 1

  ?? How to check for no 0.0.0.0/0 route in EIGRP ??

 

track 1 ip sla 1 (?? What needs to go here for tracking ??)

delay down 15 up 30

 

event manager applet Default_Route

event track 1 state down

action 010 syslog msg "AT&T Internet Down"

action 020 cli command "enable"

action 030 cli command "config t"

action 040 cli command "ip route 0.0.0.0 0.0.0.0 10.200.25.6"

action 090 syslog msg "Failing over to Verizon Internet"

 

event manager applet Default_Route

event track 1 state up

action 010 syslog msg "AT&T Internet Up"

action 020 cli command "enable"

action 030 cli command "config t"

action 040 cli command "ip route 0.0.0.0 0.0.0.0 10.200.25.6"

action 090 syslog msg "Returned traffic to AT&T"

I know that I could do this by having both routers ping the next hop to AT&T to determine if it is down, but I really want R2 to rely on the decision of R1 to remove the default route before R2 inserts a new default route.  TAC is unable to provide assistance with IP SLA, Tracking and EEM scripting, per a TAC case that I currently have open.  Quote from TAC

"I also  understand the fact that the EEM and IP SLA solution was given by a previous TAC engineer but that support should go through the support community, can you try reaching support through that channel I can assure you  that if there’s a process  for EEM to accomplish what you required the answer will come from there."

7 Replies 7

Mark Malone
Mentor
Mentor

Hi

Cant see a way of using ip sla to track an exact default route like that without using next-hop but take a look at this it may be useful , instead of eem use a weighted default route that only comes into effect when you cant reach something upstream of the current default route , as your already redistributing static if the link fails to current ISP the weighted route becomes valid and gets put into the table it should be redistributed through EIGRP anyway to the colo giving R2  a new default route

https://supportforums.cisco.com/document/30296/using-ipsla-change-routing

Peter Paluch
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Hi Mark,

Sorry to jump into your thread - I was slower in writing my response.

In any case, I was thinking about using object tracking on R2 to check on the route's metric which would obviously be different for a static and for an EIGRP-learned route, but NX-OS does not seem to support the track ip route metric threshold command so that approach was not an option.

Best regards,
Peter