C
C
Caspergreen2019-10-03 11:46:31
linux
Caspergreen, 2019-10-03 11:46:31

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

5 answer(s)
D
Drno, 2019-10-03
@Drno

Traffic marking, then using routing

A
AkaZLOY, 2019-10-04
@AkaZLOY

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)

I
Igor, 2019-10-03
@Lopar

So, are you getting traffic? Two NAT rules: one for one provider, the other for another. And that's it.

D
DDwrt100, 2019-10-03
@DDwrt100

Look towards the vrf settings on the device.

K
Korben5E, 2019-10-04
@Korben5E

Make 2 NAT for different addresses and that's it.
Accordingly, do not stick providers into one Interface List.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question