Hi to you all- looking for some help!
Been learning RouterOS for about a year now, I have left mangle till now.
What I have is a requirement to have
WAN1 routed to ETH1 With it’s own subnet on interface.
WAN1 routed to ETH2 with it’s own subnet on interface.
WAN2 routed to ETH4 with it’s own subnet on interface.
WAN2 routed to ETH5 with it’s own subnet on interface.
Load balance is not an option here as WAN1 is adsl with 15ms ping to 8.8.8.8 and WAN2 is satellite with 700ms ping to 8.8.8.8.
My mangling seemed to work fine to begin with and has now stopped. Can anyone spot what I have done incorrectly?
Gateway IPs are load-balancing routers
/ip firewall mangle
add action=mark-routing chain=prerouting comment="MGMT to WAN1" ipv4-options=any new-routing-mark=to_WAN1 \
src-address=10.1.0.0/20
add action=mark-routing chain=prerouting comment="VLAN10 to WAN1" ipv4-options=any new-routing-mark=to_WAN1 \
src-address=10.10.0.0/20
add action=mark-routing chain=prerouting comment="VLAN20 to WAN2" dst-address-list="" ipv4-options=any \
new-routing-mark=to_WAN2 src-address=10.20.0.0/20
add action=mark-routing chain=prerouting comment="VLAN30 to WAN2" ipv4-options=any new-routing-mark=to_WAN2 \
src-address=10.30.0.0/20
add distance=1 gateway=172.16.0.1 routing-mark=to_WAN1
add distance=1 gateway=172.17.0.1 routing-mark=to_WAN2
add comment=WAN1 distance=1 gateway=172.16.0.1
add comment=WAN2 distance=1 gateway=172.17.0.1
add action=masquerade chain=srcnat comment="Eth8 masquerade" out-interface=ether8
add action=masquerade chain=srcnat comment="Eth7 masquerade" out-interface=ether7
ip address
add address=172.16.0.4/28 interface=ether8 network=172.16.0.0
add address=10.1.0.1/20 interface=ether1 network=10.1.0.0
add address=10.10.0.1/20 interface=ether2 network=10.10.0.0
add address=172.17.0.4/28 interface=ether7 network=172.17.0.0
add address=10.20.0.1/20 interface=ether3 network=10.20.0.0
add address=10.40.0.1/20 interface=ether5 network=10.40.0.0
add address=10.30.0.1/20 interface=ether4 network=10.30.0.0
Let me know if you want me to export any other code. This is a temporary network for a festival, I’ve not put any external IP’s here and it will be gone in two day!
Cheers in advance for your help!