Dual WAN manual switch over?

benze

New Around Here
I have Dual WAN setup up on my AC1900 in failover mode. Currently, running the WAN as the primary and the LAN as the failover.

Is there a way I can force a failover - switch from the WAN to the LAN connection or vice versa when I want? I am trying to test out the reliability of 2 different ISPs and want to be able to manual select which one to use.

Is there an easy way to accomplish this? I would rather not shut down the interface as this will lose the IP that is currently assigned to it. Are there any scripts already existant somewhere that I can leverage to accomplish this?

Thanks,

Eric
 

OzarkEdge

Part of the Furniture
I have Dual WAN setup up on my AC1900 in failover mode. Currently, running the WAN as the primary and the LAN as the failover.

Is there a way I can force a failover - switch from the WAN to the LAN connection or vice versa when I want? I am trying to test out the reliability of 2 different ISPs and want to be able to manual select which one to use.

Is there an easy way to accomplish this? I would rather not shut down the interface as this will lose the IP that is currently assigned to it. Are there any scripts already existant somewhere that I can leverage to accomplish this?

Thanks,

Eric

Does manually disconnecting one ISP WAN cable force a failover?

OE
 

benze

New Around Here
Does manually disconnecting one ISP WAN cable force a failover?

OE
Yes - disconnecting the WAN cable will force the failover.

But I wanted to be able to do this remotely / manually from a terminal prompt if possible. However, I wanted to force fast switchovers such that I didn't need to wait for an interface to re-auth / re-acquire an IP address everytime.

I tried to play with the routing rules manually from within the ssh prompt, but I couldn't create 2 routes with different metrics, and drop the lower one. Everytime I tried, the system would automatically recreate the route for the default WAN connection.

For example:
Code:
[email protected]:/tmp/home/root# route add default gw 20.248.155.139 dev ppp0 metric 10
[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
13.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         24.20.158.1    0.0.0.0         UG    0      0        0 vlan3
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0

So, in this case, I've set up a spare default route to `ppp0` with a higher metric (10). When I wanted to test out that connection, I tried to delete the default route to `vlan3`, however, the router automatically recreates it everytime.


Code:
[email protected]:/tmp/home/root# route del default gw 24.20.158.1 dev vlan3
[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
134.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0

[email protected]:/tmp/home/root# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=119 time=10.532 ms
^C  
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 8.999/9.765/10.532 ms

[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
134.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         24.20.158.1    0.0.0.0         UG    0      0        0 vlan3
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0


Thanks,

Eric
 
Last edited:

OzarkEdge

Part of the Furniture
Yes - disconnecting the WAN cable will force the failover.

But I wanted to be able to do this remotely / manually from a terminal prompt if possible. However, I wanted to force fast switchovers such that I didn't need to wait for an interface to re-auth / re-acquire an IP address everytime.

I tried to play with the routing rules manually from within the ssh prompt, but I couldn't create 2 routes with different metrics, and drop the lower one. Everytime I tried, the system would automatically recreate the route for the default WAN connection.

For example:
Code:
[email protected]:/tmp/home/root# route add default gw 20.248.155.139 dev ppp0 metric 10
[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
13.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         24.20.158.1    0.0.0.0         UG    0      0        0 vlan3
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0

So, in this case, I've set up a spare default route to `ppp0` with a higher metric (10). When I wanted to test out that connection, I tried to delete the default route to `vlan3`, however, the router automatically recreates it everytime.


Code:
[email protected]:/tmp/home/root# route del default gw 24.20.158.1 dev vlan3
[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
134.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0

[email protected]:/tmp/home/root# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=119 time=10.532 ms
^C 
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 8.999/9.765/10.532 ms

[email protected]:/tmp/home/root# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
134.19.179.130  24.20.158.1    255.255.255.255 UGH   0      0        0 vlan3
24.20.158.1    0.0.0.0         255.255.255.255 UH    0      0        0 vlan3
20.248.155.139 0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
10.34.72.0      0.0.0.0         255.255.255.0   U     0      0        0 tun13
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun21
24.20.158.0    0.0.0.0         255.255.255.0   U     0      0        0 vlan3
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vlan2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         24.20.158.1    0.0.0.0         UG    0      0        0 vlan3
0.0.0.0         20.248.155.139 0.0.0.0         UG    10     0        0 ppp0


Thanks,

Eric

So, you have one manual test option.

Sorry, I can't help with your more advanced goals... no experience with WAN failover... I'm lucky to have one decent ISP here!

OE
 

Tech9

Part of the Furniture
and want to be able to manual select which one to use.

I remember it was possible, but both connections must be active. Try this - instead of Fail Over (doesn't work anyway), Load Balance with 9:1 ratio. Go back to the main page and see if you have Internet Connection on/off switch for both WAN. Sorry, I give up on Dual WAN on Asus long time ago.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top