MultiWAN with dhcp-client wan interfaces

Hi All,

I have been trying to find an example of multiwan configuration where the wan interfaces are dhcp-client interfaces. Please would someone point me in the right direction here.

I have a RB2011UAS-RM which I am trying to confgure as multiwan (and hopefully queues in the future :slight_smile: )

I have tried to adapt the configuration listed [here] but I cannot seem to get it working when my wan interfaces are setup as dhcp-client interfaces.

Here is my setup rules for this which dont work, please can someone more experienced than I have a look and see if they can spot something I am missing.

bridge-lan is LAN bridge (interfaces 1 - 8 )
WAN1 is wireless 6Mbit down 3Mbit up (interface ether9)
WAN2 is wireless 10Mbit down 3 Mbit up (interface ether10)

Here I setup the interfaces:

/ip dhcp-client add interface=ether9 add-default-route=yes use-peer-dns=no use-peer-ntp=no default-route-distance=1 disabled=no comment="WAN1";
/ip dhcp-client add interface=ether10 add-default-route=yes use-peer-dns=no use-peer-ntp=no default-route-distance=2 disabled=no comment="WAN2";
/ip firewall nat add chain=srcnat out-interface=ether9  action=masquerade comment="Masquerading on WAN1";
/ip firewall nat add chain=srcnat out-interface=ether10 action=masquerade comment="Masquerading on WAN2";

Here I attempt to setup the multi-wan marking/routing rules

/ip firewall mangle add chain=input in-interface=ether9 action=mark-connection new-connection-mark=WAN1_conn
/ip firewall mangle add chain=input in-interface=ether10 action=mark-connection new-connection-mark=WAN2_conn
 
/ip firewall mangle add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
/ip firewall mangle add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2
 
/ip firewall mangle add chain=prerouting dst-address=192.168.11.0/24 action=accept in-interface=bridge-lan
/ip firewall mangle add chain=prerouting dst-address=10.10.10.0/24 action=accept in-interface=bridge-lan
 
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=bridge-lan per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=bridge-lan per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

/ip firewall mangle add chain=prerouting connection-mark=WAN1_conn in-interface=bridge-lan action=mark-routing new-routing-mark=to_WAN1
/ip firewall mangle add chain=prerouting connection-mark=WAN2_conn in-interface=bridge-lan action=mark-routing new-routing-mark=to_WAN2

/ip route add dst-address=0.0.0.0/0 gateway=ether9 routing-mark=to_WAN1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=ether10 routing-mark=to_WAN2 check-gateway=ping
 
/ip route add dst-address=0.0.0.0/0 gateway=ether9 distance=1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=ether10 distance=2 check-gateway=ping

My first question is, how can I modify the bellow lines so that they match on interface rather than destination ip address, the addresses listed in the configuration are the network subnets given to the gateways once the come up, however, these may change at whim by the ISP. Is it possible to change the 2 rules below to match on interface rather than destination IP

/ip firewall mangle add chain=prerouting dst-address=192.168.11.0/24 action=accept in-interface=bridge-lan
/ip firewall mangle add chain=prerouting dst-address=10.10.10.0/24 action=accept in-interface=bridge-lan

The current rules dont work, if they are enabled then I dont get any response from pings, if I disable the rules, then I get ping responses, however, it only utilizes one of the broadband connections (WAN1).

Any assistance would be greatly appreciated.
Thanks for your time in reading this post.