What's new

Dual Wan Routing Rules Manual Management

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

3dguru

Occasional Visitor
Is there a way to change/add/remove and apply Dual Wan routing rules via SSH shell without rebooting the whole router? If yes, what would be the list of commands to apply?

Thanks.
 
If anyone interested to change temporarily the manual routing for dual wan's:
IF:
lookup 200 = DSL
lookup 100 = Cable

THEN:
ip rule add from 192.168.1.20 lookup 100 pref 100 # SET To Cable
ip rule del from 192.168.1.20 lookup 100 pref 100
ip rule add from 192.168.1.20 lookup 200 pref 100 # SET To DSL
ip rule del from 192.168.1.20 lookup 200 pref 100

ip route flush cache
 
Last edited:
Hello 3dguru, I would also like to switch between xDSL and cable on my AC87u without rebooting but I don't quite understand your method especially the 'IF' part, are they commands ?

I'm familiar with SSH etc so could you please expand on your method.

Thanks
 
Hello 3dguru, I would also like to switch between xDSL and cable on my AC87u without rebooting but I don't quite understand your method especially the 'IF' part, are they commands ?

I'm familiar with SSH etc so could you please expand on your method.

Thanks

No IF is not a command here... I meant, you need to check which lookup is your WAN assigned via 'ip rule' command.

You first need to remove if the same static IP for a specific LAN DHCP exist, and add a new one as like the examples I provided from ip rules.

SET TO DSL:

Code:
ip rule del from 192.168.1.20 lookup 100 pref 100;ip rule add from 192.168.1.20 lookup 200 pref 100

ip route flush cache

You need to change the IPs and lookups with your current settings...

This method does not change the nvram values, so a reboot will bring them back to existing values before the change.

You can also modify nvram, but you need a more complex script.

I hope this helps.
 
Thanks very much for reply but still don't understand the lookup = 200 part.

Code:
admin@RT-AC87U-49F8:/tmp/home/root# ip rule
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

What I want to do is be able to switch my whole LAN between DSL and cable like the way failover works without rebooting.
 
I do not use failover, balancing.

My solution is per device. I do not know how failover is set up in asuswrt.
 
Dual WAN and three-way split tunnel - Selective Routing

I do not use failover, balancing.

My solution is per device. I do not know how failover is set up in asuswrt.

This information is great!, it allowed me to fine-tune my dual wan selective routing configuration.

So now I have:
Default -> WAN0 - native table 100 in router -> DSL
IP_Range1 -> WAN1 - native table 200 in router -> LTE router
IP_Range2 -> TUN - new table XX -> VPN

A three way split tunnel with only one additional table to direct traffic to the VPN; routing traffic to WAN1 by fwmark IP_Range1 to table 200, and the only dual wan routing rule I am using is to force the VPN client out the prefered WAN.

This setting appears to be more stable, DNS lookups and routing much faster than when using the solution of two additional tables.

Thank you for sharing.
 
This script help me out!
Can I ask what's your setting in the dual wan GUI? Failover or loadbalance.

Dual WAN and three-way split tunnel - Selective Routing



This information is great!, it allowed me to fine-tune my dual wan selective routing configuration.

So now I have:
Default -> WAN0 - native table 100 in router -> DSL
IP_Range1 -> WAN1 - native table 200 in router -> LTE router
IP_Range2 -> TUN - new table XX -> VPN

A three way split tunnel with only one additional table to direct traffic to the VPN; routing traffic to WAN1 by fwmark IP_Range1 to table 200, and the only dual wan routing rule I am using is to force the VPN client out the prefered WAN.

This setting appears to be more stable, DNS lookups and routing much faster than when using the solution of two additional tables.

Thank you for sharing.
 

Similar threads

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