Problem with policy routing

I got problem with the policy routing setup. I found out that both connections use the same gateway IP address. Is it possible to use Interface names instead of Gateway address and DST. Address in policy rules?

I followed this example, but replaced IPs with my own. It probably won’t work with the same gateway address.

/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



/ip route rule
add dst-address=192.168.0.0/24 action=lookup table=main
add dst-address=192.168.1.0/24 action=lookup table=main
add dst-address=10.10.10.0/30 action=lookup table=main
add dst-address=10.10.11.0/30 action=lookup table=main
add src-address=10.10.10.0/30 action=lookup table=ISP1
add src-address=10.10.11.0/30 action=lookup table=ISP2
add routing-mark=ISP1 action=lookup table=ISP1
add routing-mark=ISP2 action=lookup table=ISP2



/ip firewall mangle
add chain=prerouting src-address=192.168.0.0/24 action=mark-routing \
new-routing-mark=ISP1 passthrough=no

add chain=prerouting src-address=192.168.1.0/24 action=mark-routing \
new-routing-mark=ISP2 passthrough=no

http://wiki.mikrotik.com/wiki/Manual:Load_balancing_multiple_same_subnet_links

http://wiki.mikrotik.com/wiki/Per-Traffic_Load_Balancing

Thank you guys, I will try this now. :smiley:

I think there is something wrong in the manual, the following two rules is only allowed in prerouting and output chains.

/ip firewall mangle
add action=mark-routing chain=forward src-address=192.168.1.0/24 new-routing-mark=first
add action=mark-routing chain=forward src-address=192.168.2.0/24 new-routing-mark=other

fixed