I have a need to switch the WAN hosts might use when connected to a Mikrotik router (RouterBOARD 3011UiAS / 6.42.6) on the fly. I used to accomplish this by having two routers (connected to different ISPs) on a LAN and just switching the gateway on the host with a script but now I would like to do this with just the Mikrotik.
Currently, I have 2 WANs set up on the Mikrotik and 2 vlans using two bridges as well. ether1 is WAN1, ether3 is WAN2, ether6-8 are vlan11 and ether9-10 are vlan10. I would like to allow hosts on vlan10 the ability to somehow pick the WAN they are using as well as keep the way they are currently operating (which is load sharing over both WANs.) So, for example, the host would execute a script I've written to change its ethernet settings from IP=192.168.1.40/24 GW=192.168.1.1/24 DNS=184.108.40.206 to IP=192.168.1.40/24 GW=192.168.1.2/24 DNS=220.127.116.11 thereby choosing WAN 2.
Can this be achieved and would it be done through routing or mangle rules or both? Any suggestions would also be greatly appreciated!