Hello all,
This is an overview of my network:
WAN1 = ISP1
WAN2 = ISP2
LAN1 = Wisp Customers
LAN2 = Cybercafe
I have WAN1 and WAN2 successfully load balancing with persistent connections as per this on the wiki: http://wiki.mikrotik.com/wiki/Load_Balancing_Persistent
I have LAN1 as the only interface that is being subjected to the Mangle rules and therefore traffic in on LAN1 is the only traffic that is being load balanced across the two ISP’s
LAN2 Traffic is not being marked in anyway and so is following the third default route for non marked traffic and is going out on WAN1 only.
You can see then that I want to add LAN2 to be marked by the mangle rules and so also to use the benefit of the load balancing on the two WAN’s.
My Question is then: How do I add a second in-interface argument to the existing mangle rules. For e.g. I have this rule:
add chain=prerouting src-address-list=odd in-interface=LAN1 action=mark-connection new-connection-mark=odd passthrough=yes
You can see that it says in-interface=LAN1.
I want it to say in-interface=LAN1 AND LAN2 or some such thing.
I suppose that I could simply duplicate the whole shebang chaning the in-interfaces for LAN2 but will that work?
Its a production system and unfortunately it is not easy to simulate this for me, so if you guys reckon one of these will work, tell me and I will have faith and try…
For more info my configs are below.
Thanks to all,
Alex
Current Configs:
Mikrotik RouterOS 2.9.34, on x86 PC Server
/ ip firewall mangle
add chain=prerouting src-address-list=odd in-interface=LAN1 action=mark-connection new-connection-mark=odd passthrough=yes comment=“1-Persistent” disable=yes
add chain=prerouting src-address-list=odd in-interface=LAN1 action=mark-routing new-routing-mark=odd comment=“2-Persistent” disable=yes
add chain=prerouting src-address-list=even in-interface=LAN1 action=mark-connection new-connection-mark=even passthrough=yes comment=“3-Persistent” disable=yes
add chain=prerouting src-address-list=even in-interface=LAN1 action=mark-routing new-routing-mark=even comment=“4-Persistent” disable=yes
add chain=prerouting in-interface=LAN1 connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=odd passthrough=yes comment=“5-Persistent” disabled=yes
add chain=prerouting in-interface=LAN1 action=add-src-to-address-list address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes comment=“6-Persistent” disabled=yes
add chain=prerouting in-interface=LAN1 connection-mark=odd action=mark-routing new-routing-mark=odd passthrough=no comment=“7-Persistent” disabled=yes
add chain=prerouting in-interface=LAN1 connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=even passthrough=yes comment=“8-Persistent” disabled=yes
add chain=prerouting in-interface=LAN1 action=add-src-to-address-list address-list=even address-list-timeout=1d connection-mark=even passthrough=yes comment=“9-Persistent” disabled=yes
add chain=prerouting in-interface=LAN1 connection-mark=even action=mark-routing new-routing-mark=even passthrough=no comment=“10-Persistent” disabled=yes
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=xxx.xxx.xxx.xxx to-ports=0-65535
add chain=srcnat connection-mark=even action=src-nat to-addresses=yyy.yyy.yyy.yyy to-ports=0-65535
/ ip route
add dst-address=0.0.0.0/0 gateway=xxx.xxx.xxx.xxx scope=255 target-scope=10 routing-mark=odd
add dst-address=0.0.0.0/0 gateway=yyy.yyy.yyy.yyy scope=255 target-scope=10 routing-mark=even
add dst-address=0.0.0.0/0 gateway=xxx.xxx.xxx.xxx scope=255 target-scope=10