Answer the question
In order to leave comments, you need to log in
Mikrotik how to split traffic between two providers for specific users?
Hello. How to separate providers for specific users on the network?
For example, there are two ISPs, one works through pppoe, the second through ipoe.
It is necessary, for example, to let a user with a local IP 192.168.1.100 through ISP2.
Answer the question
In order to leave comments, you need to log in
Be sure to mark traffic through Mangle, then in routing you set up a routing table for marked traffic, and 2 NATA rules for two outgoing interfaces.
Specifically for your example, we mark the necessary packets, where bridge1 is the interface where the packet flies:
ip firewall mangle add chain=prerouting src-address=192.168.1.100 in-interface=bridge1 action=mark-packet new-packet-mark=
gateway2 route for marked traffic, where ISP2 is the gateway address:
ip route add dst-address=0.0.0.0/0 gateway=ISP2 routing-mark=gateway2
And the nat rule for outgoing traffic, where ip is the address issued by the provider:
ip firewall nat add chain= srcnat out-interface=ISP2 action=src-nat to-addresses=IP
(if the address is gray-dynamic, then replace it with action=masquerade)
So, are you getting traffic? Two NAT rules: one for one provider, the other for another. And that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question