Answer the question
In order to leave comments, you need to log in
How to let a specific car through a specific gateway in Mikrotik?
Hello! Perhaps not quite correctly asked the question, but the essence is this:
There are 2 providers ( main and reserve ), Primary and backup (differences in routes distance 1 and distance 2 ) how can you start a certain machine (for example, with ip 192.168. resrve provider ?
Dug in labels (ip/firewall/mangle) but something does not come out.
Answer the question
In order to leave comments, you need to log in
Interesting. But it seems to work for me like this:
and
/ip route
add comment=reserve distance=2 gateway=2.2.2.2 routing-mark=tv
add comment=main distance=1 gateway=1.1.1.1
But if the main gateway goes down and the micortic switches to the reserve, will all devices also go through the reserve gateway or only 192.168 .88.100 ? and the rest will not be given?
P.S. Transition to the reserve of implements through scripts
Try something like this: Mikrotik, choosing a preferred gateway based on Address Lists A couple of years ago I was smokin' how to make ISP exit rules based on an address list. Those. what you want.
Add a routing rule:
/ip route rule
add action=lookup disabled=no src-address=192.168.88.100 table=tv
RouterOS can route based on source addresses and interfaces, this is preferable to mangle.
If the main gateway is unavailable, all traffic will go through reserve with a higher distanse value. Such redundancy is quite efficient without additional scripts. However, it happens that the provider gateway is available, and traffic does not go further than it due to any problems with the provider. I once implemented through netwatch, which periodically pings "fail-safe" IP addresses on the Internet (8.8.8.8, 8.8.4.4, etc.) through certain gateways and, in the absence or appearance of a response, activates and deactivates the necessary routes , changes the addresses of DNS servers, sends SMS that Internet access through such and such a provider has disappeared or appeared at such and such a time, etc. At the same time, it is necessary to create separate routes for these test addresses and prohibit outgoing pings to these addresses through other gateways in the firewall.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question