Hi! I have two ip's in one subnet, and i need to forward traffic from clients of addresslist1 through $ether1 whith $addr1 and of addresslist2 through $ether2 whith $addr2.
It works when packets go from subnet to inet, but when responce is coming back packets go through wrong interface.
Example:
$localaddr1($iface1) -> $inetaddr($outiface)
$inetaddr($outiface) -> $localaddr1($IFACE2)
Sometimes ifaces are selected in a correct way but sometimes just on the contrary.
So what I try to do:
/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=ether1 passthrough=no dst-address-list=allowether1
/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=ether2 passthrough=no dst-address-list=allowether2
/ip route add dst-address=$subnet gateway=ether1 routing-mark=ether1 pref-src=$addr1
/ip route add dst-address=$subnet gateway=ether2 routing-mark=ether2 pref-src=$addr2
/ip route rule add routing-mark=ether1 action=lookup table=ether1
/ip route rule add routing-mark=ether2 action=lookup table=ether2
But this doesn't help. Can anybody help me?