Policy Based Routing (2 WAN- 2LAN) in mikrotik router
We will assume that you already have the IP addresses set up on your router.
First, we must define our routes. We will add three “default” routes. These are below:
/ip route
add gateway=10.10.11.1 routing-mark=ISP2
add gateway=10.10.10.1 routing-mark=ISP1
add gateway=10.10.10.1
add gateway=10.10.11.1 routing-mark=ISP2
add gateway=10.10.10.1 routing-mark=ISP1
add gateway=10.10.10.1
add gateway=10.10.11.1 distance 10
All traffic from the 192.168.0.0/24 network will use ISP1 and all traffic from the 192.168.1.0/24 network will use ISP2. Here is the implementation:
/ip firewall mangle
add chain=prerouting src-address=192.168.0.0/24 dst-address=192.168.0.1 action=accept
add chain=prerouting src-address=192.168.1.0/24 dst-address=192.168.1.1 action=accept
add chain=prerouting src-address=192.168.0.0/24 action=mark-routing \
new-routing-mark=ISP1 passthrough=no
new-routing-mark=ISP1 passthrough=no
new-routing-mark=ISP2 passthrough=no
/ip firewall nat
add chain=src-nat outinterface=ISP1_WAN action=masqurate
add chain=src-nat outinterface=ISP2_WAN action=masqurate
add chain=src-nat WAN action=masqurate
[Ref:https://www.youtube.com/watch?v=m6tYANGC9o0]
[Ref:http://blog.butchevans.com/2008/09/mikrotik-policy-routing-implementation-example/]