Routing using VRRP Interfaces

Hi there,

My internet provider requests a IP per MAC, so I had to use VRRP Hack to achive it.
So I got my 6 public ip’s in same range

x.x.x.246
x.x.x.247
x.x.x.248

Provided gateway is : x.x.x.1
I create a firewall rule to masquerade those interfaces.

At this point everything is OK, but problem is that gateway is same for all interfaces, 0.0.0.0/0 is reachable by last interface to be turned on.

Then all internet traffic goes to this interface and always get same public IP,

How can I set routes to 0.0.0.0/0 if always gateways is reachable by last interface?

thanks you.

If you insist that the packets will leave with the source MAC address of the respective VRRP interface, you have to use multiple routing tables, one per each VRRP interface, and in each of them, create a default route with gateway=ga.te.way.ip**%**vrrpN manually. So for two interfaces, it would look as follows:

/ip route
add gateway=ga.te.way.ip%vrrp1 routing-mark=via-vrrp1
add gateway=ga.te.way.ip%vrrp2 routing-mark=via-vrrp2

And you’d then assign these routing-mark values to packets being routed towards the internet using /ip firewall mangle rules or /ip route rule rules.

But if you don’t need the source MAC addresses to match the source IP addresses, mere src-nat rules should be sufficient.

it works!

Thanks you.

New to MikroTik but I have this same issue where the gateway is the same for all interfaces and 0.0.0.0/0 is only reachable by the last interface to be turned on.

Could you elaborate on this step here:

And you’d then assign these routing-mark values to packets being routed towards the internet using /ip firewall mangle rules or /ip route rule rules.

Just not sure how to set this up.

Thanks in advance.