I’m trying to set up dual WAN connections without luck. The firewall filter and magle rules mark the connections and create routing marks. Packets marked (for example to 1.2.3.4) seem to get mark, but cannot figure out how to get the packets to use different WAN interface. With setup below, traffic in and out work but only using ether5-lte interface.
The dhcp-client inserts the routes to main table for both interfaces. How do I get it to create entries to separate routing tables? In the nexthops the table remains empty and outgoing traffic marked with to_adsl routing mark results “no route to host” (icmp message destination unreachable returned).


[admin@gw254] > /ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 ether5-lte 3
1 A S 0.0.0.0/0 ether1-gateway 5
2 ADS 0.0.0.0/0 51.150.189.94 3
3 DS 0.0.0.0/0 71.107.104.1 5
4 ADC 10.4.1.0/24 10.4.1.254 ether5-lte 0
5 ADC 10.3.0.0/16 10.3.1.254 ether2-master-l... 0
6 ADC 51.150.189.88/29 51.150.189.93 ether5-lte 0
7 ADC 71.107.104.0/23 71.107.104.172 ether1-gateway 0
[admin@gw254] > ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 A S dst-address=0.0.0.0/0 gateway=ether5-lte gateway-status=ether5-lte reachable check-gateway=ping distance=3 scope=30 target-scope=30 routing-mark=to_lte
1 A S dst-address=0.0.0.0/0 gateway=ether1-gateway gateway-status=ether1-gateway reachable check-gateway=ping distance=5 scope=30 target-scope=30 routing-mark=to_adsl
2 ADS dst-address=0.0.0.0/0 gateway=51.150.189.94 gateway-status=51.150.189.94 reachable via ether5-lte distance=3 scope=30 target-scope=10 vrf-interface=ether5-lte
3 DS dst-address=0.0.0.0/0 gateway=71.107.104.1 gateway-status=71.107.104.1 reachable via ether1-gateway distance=5 scope=30 target-scope=10 vrf-interface=ether1-gateway
4 ADC dst-address=10.4.1.0/24 pref-src=10.4.1.254 gateway=ether5-lte gateway-status=ether5-lte reachable distance=0 scope=10
5 ADC dst-address=10.3.0.0/16 pref-src=10.3.1.254 gateway=ether2-master-local gateway-status=ether2-master-local reachable distance=0 scope=10
6 ADC dst-address=51.150.189.88/29 pref-src=51.150.189.93 gateway=ether5-lte gateway-status=ether5-lte reachable distance=0 scope=10
7 ADC dst-address=71.107.104.0/23 pref-src=71.107.104.172 gateway=ether1-gateway gateway-status=ether1-gateway reachable distance=0 scope=10
[admin@gw254] > /export
# dec/16/2016 16:59:22 by RouterOS 6.37.3
# software id = 5008-63CH
#
/ip firewall filter
add action=accept chain=input comment="default configuration" protocol=icmp
add action=accept chain=input comment="default configuration" connection-state=established,related
add action=drop chain=input comment="default configuration" in-interface=ether1-gateway
add action=drop chain=input comment="default configuration" in-interface=ether5-lte
add action=fasttrack-connection chain=forward comment="default configuration" connection-state=established,related disabled=yes
add action=accept chain=forward comment="default configuration" connection-state=established,related
add action=drop chain=forward comment="default configuration" connection-state=invalid
add action=drop chain=forward comment="default configuration" connection-nat-state=!dstnat connection-state=new in-interface=ether1-gateway
add action=drop chain=forward comment="default configuration" connection-nat-state=!dstnat connection-state=new in-interface=ether5-lte
/ip firewall mangle
add action=mark-connection chain=prerouting comment="force adsl-interface" dst-address=92.122.94.47 new-connection-mark=adsl_mark passthrough=yes
add action=mark-connection chain=input connection-mark=no-mark in-interface=ether5-lte new-connection-mark=lte_mark passthrough=yes
add action=mark-connection chain=input connection-mark=no-mark in-interface=ether1-gateway new-connection-mark=adsl_mark passthrough=yes
add action=mark-routing chain=prerouting connection-mark=lte_mark dst-address-type="" new-routing-mark=to_lte passthrough=yes
add action=mark-routing chain=prerouting connection-mark=adsl_mark dst-address-type="" new-routing-mark=to_adsl passthrough=yes
add action=mark-connection chain=output connection-mark=no-mark new-connection-mark=adsl_mark out-interface=ether1-gateway passthrough=yes
add action=mark-connection chain=output connection-mark=no-mark new-connection-mark=lte_mark out-interface=ether5-lte passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="Hairpin NAT" dst-address=10.3.0.0/16 dst-address-list=!10.3.0.0/16 out-interface=ether2-master-local protocol=tcp src-address=10.3.0.0/16
add action=masquerade chain=srcnat comment="NAT masquerade for outgoing connections" out-interface=ether1-gateway
add action=masquerade chain=srcnat comment="NAT masquerade for outgoing connections" out-interface=ether5-lte
/ip route
add check-gateway=ping distance=3 gateway=ether5-lte routing-mark=to_lte target-scope=30
add check-gateway=ping distance=5 gateway=ether1-gateway routing-mark=to_adsl target-scope=30
/ip route rule
add routing-mark=to_adsl table=to_adsl
add routing-mark=to_lte table=to_lte