Two Modems, One Router. How do i setup one of the modems as a backup/failover?

aspirant09

Reputable
Oct 29, 2014
27
0
4,530
I have a cisco 1941 router and two modems from two different ISPs. The configuration i want to achieve is to have one of the ISPs as the primary network and the other as a back up such that if the primary link fails, the backup kicks off automatically.

The architecture currently is such that the LAN interface of the primary ISP is configured with 192.168.1.1 and directly connected to the 1941 router. Both GE ports on the router are in use, though there ehiwic ports not in use.

Please in what ways can i achieve this..? I’ve tried using ip route commands and setting admin distance as shown.:

**Note while i was executing these commands, i connected the back up modem to a switch, which is part of the LAN.

ip route 0.0.0.0 0.0.0.0 192.168.1.1 [for primary ISP]

ip route 0.0.0.0 0.0.0.0 10.225.178.177 100 [for backup ISP]

Executing the first command, i get the error: invalid next hop (it’s the router). The error also persists when i use the ISP’s public IP in place of 192.168.1.1. The second command doesn’t flag any errors, however it doesn’t work when i test by disconnecting the primary modem. The IP i have used for the second command is the LAN IP for the modem not the public IP.

What’s my error with my approach? Also is there another way i can go about this (in detail). In addition, i have no experience with BGP.

Thanks
 
Solution
It is going to depend on what the "modem" is really doing. If it is just a modem then the ip is only used to maintain it. If you are running PPPoE you need to put the route toward the dialer interface. There is some strange issue with using IPSLA and dialer interfaces I forget. It has been a while since I did what you are attempting. I have seen configurations that use 2 different DSL connection and they get that to work.
You really need the ip of the nexthop. You could try to put the interface in instead but that does not always work.

Still even if you have 2 actual routes with correct next hops it won't do what you want. The router would need to lose the ability to get to the next hop before it removes the route. Most times the interface will be in a up condition the traffic will just not go anywhere if you were to send it down the interface.

Best would be if you could run a routing protocol to detect the down path but that is likely not a option.

What you do in that case is to use IPSLA and have it modify the routing based on the ability to ping something. There are a couple of variations of this and you will find many examples on the cisco site.

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

aspirant09

Reputable
Oct 29, 2014
27
0
4,530


Okay. But with IPSLA where would i need to connect the backup modem? To the switch? or the ehiwic port on the router?. The two GE ports are in use.

Thanks
 
Id doesn't really matter where you connect it. You technically could connect both to the same switch and then connect the switch to the router.

It is all dependent on the ip of the modem...or of the ISP if you are using pppoe. It is a layer 3 solution it will use the nexthop ip to determine the path.
 

aspirant09

Reputable
Oct 29, 2014
27
0
4,530


Following the tutorial on IPSLA, everything works well during configuration.
Please note: For the Backup ISP i'm using a LAN IP not a WAN IP and it is connected to Gigabit ethernet0/0/0 interface like so (in bold):

JavaScript:
Interface  IP-Address      OK?          Method    Status                Protocol  
Gigabit    unassigned      YES            unset        up                       up
Ethernet 
0/0/0
However, when i try to test by the turning off the primary ISP and running show ip route, it shows that Gateway of last resort not set. i don't understand why. Is it because i'm using a LAN gateway as opposed to WAN gateway?

Thanks
 
It is going to depend on what the "modem" is really doing. If it is just a modem then the ip is only used to maintain it. If you are running PPPoE you need to put the route toward the dialer interface. There is some strange issue with using IPSLA and dialer interfaces I forget. It has been a while since I did what you are attempting. I have seen configurations that use 2 different DSL connection and they get that to work.
 
Solution