Not equal cost multipath routing

I have two gateways machine, connected to different ISP’s. One link is charged per traffic, another is flat rate, so the cost per link is not the same. I want to fill up cheaper link first, then if there is more traffic to use another link as well. Of course, I want to have failover also. I tried to search on this topic, but I couldn’t find any answer to this.

/sbin/ip route add default scope global nexthop via 10.0.0.138 dev eth2 weight 2 nexthop via 10.0.1.138 dev eth1 weight 1

Linux has weight parameter for multipath routing, but I am not sure how to do this with Mikrotik. ECMP is really very easy to do, but this not equal cost situation seems to be more difficult.

You can “configure” weights but mentioning one gateway several times in the route statement, so like

gateway=10.0.1.1,10.2.3.4,10.2.3.4

giving double weight to 10.2.3.4 than 10.0.1.1.

Best regards,
Christian Meis

OK, I’ll try this. I thought this option (putting one gateway several times) is just for load balancing links with different bandwidth.

Maybe you can use mangle and action=mark-routing and then assign specific traffic to the gateways.

Consider this option too.