Setting up a failover ADSL connection on a Cisco Router

Posted by

This method will monitor a connection via ICMPWikipedia: The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational informati... ping and, on failure, it will bring up the ADSLWikipedia: Asymmetric digital subscriber line (ADSL) is a type of digital subscriber line (DSL) technology, a data communications technology that enables faster data transmission over copper telephone lines than... line. Below is my setup – you may need to tailor this guide to yours. This method is useful if both connections cannot be up at the same time (possibly because they share an IP address).

Cisco 1841 Router
Cisco 1841 Router with HWIC1-ADSL
  • Dialer0 is a PPPoE dialer to a VDSL modem via fa0/0
  • Dialer1 is a PPPoATM dialer of ADSL via ATM0/1/0
  • The IP I am pinging to detect failure is
  • The ATM0/1/0 interface is shutdown when not in use

First we’ll add a Track and IP SLA to monitor our primary connection (Dialer0) by pinging our monitor IP ( This track configuration delays actioning a failure for 10 seconds and a restore by 60 seconds. This is to prevent flip-flopping on the lines:

track 1 rtr 123 reachability
 delay down 10 up 60

ip sla 123
 icmp-echo source-interface Dialer0
 timeout 2000
 frequency 4
ip sla schedule 123 life forever start-time now

Next we’ll add default routes for Dialer0 (linked to Track1) and Dialer1 (with a higher metric). If you already have default routes, remove these first:

ip route Dialer0 track 1
ip route Dialer1 254

Finally we’ll use EEMWikipedia: Cisco Embedded Event Manager (EEM) is a feature included in Cisco's IOS operating system (and some other Cisco OSes such as IOS-XR, IOS-XE, and NX-OS) that allow programmability and automation capabi... applets to monitor track 1 and bring up the ATM interface on failure (and visa versa). This also e-mails us about the event:

event manager applet TRACK-1-TIMEOUT
 event track 1 state down
 action 1.0 cli command "enable"
 action 2.0 cli command "config terminal"
 action 3.0 cli command "interface atm0/1/0"
 action 4.0 cli command "no shutdown"
 action 5.0 mail server "" to "" from "" subject "IP SLA 123 Timeout" body "Timeout on primary line"
event manager applet TRACK-1-OK
 event track 1 state up
 action 1.0 cli command "enable"
 action 2.0 cli command "config terminal"
 action 3.0 cli command "interface atm0/1/0"
 action 4.0 cli command "shutdown"
 action 5.0 mail server "" to "" from "" subject "IP SLA 123 Restored" body "Primary line restored"

You should replace with a valid SMTP server that this router has access to send through and change to the to/from e-mail addresses respectively.


A full example config (with some bits redacted) can be found here.

Leave a Reply

Your email address will not be published. Required fields are marked *