Help with gateway

Hello friends, first of all thank you for taking care of my problem.
I do not speak English, only Spanish so I am using the google translator for it.

Good to the subject, I have my lan with my clients in the range 192.168.85.0/24, the ip of the lan port in the mk is 192.168.85.254, in my wan I have 2 internet outlets one is 22.66.33.1 and 22.66.33.10, both ip enter through the wan port of the mk that it has the ip 22.66.33.254, what I want to do is, the clients between the segment 192.168.85.2-192.168.85.149 that leave by 22.66.33.1 and the clients from the 192.168. 85,150-192,168.85,253 for 22.66.33.10.
I can do that?
how would it be?

Thank you for assisting me.

Basic idea:

/ip route
add gateway=22.66.33.1 routing-mark=gw1
add gateway=22.66.33.10 routing-mark=gw2
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=gw1 src-address=192.168.85.2-192.168.85.149
add action=mark-routing chain=prerouting new-routing-mark=gw2 src-address=192.168.85.150-192.168.85.253

Or you can look at some examples of dual WAN configs for more options and ideas.

Hello and thanks for replying.
That solution and try it and it does not work, or it works in part, they only have internet customers who leave by the first gateway, what they leave by the second do not have internet, I do not know what it could be.
Any ideas?

More info about your network could help. It’s possible that I misundertood your description, two gateways on same interface is slightly unusual setup (even though it’s nothing wrong with it). If you have problem with words, try drawing an image.

Make sure you disable your fasttrack rule, fasttrack doesn’t behave well with marked packets.

if I’m sure the fastrack is not activated, that configuration does not work anyway.
equally greetings for your help
Thank you.

Do you have a masquerade rule for 2nd gw?

If I have masked everything that comes out of the wan, I mean all the traffic that comes out of the wan would come out with the ip 22.66.33.254

If your WAN IP address is the real one and not just an example, it is a public one.

So while your internal clients may sent their packets via the gateway you choose for them using @Sob’s advice, the responses from remote servers are likely to come through just one of the gateway devices unless there is a NAT between one of the gateways and the internet. This is not a problem for the Mikrotik itself but could be a problem for some stateful firewalls on those gateway devices.

Can you disclose more about the network topology between your Mikrotik and the internet? Drawings usually say more than text descriptions.

Hello friends, I’ll explain again to see if they understand me better, I have a group of users on the 192.168.85.0/24 lan that I want to separate into 2 groups but that they remain within the same network segment, so I want to make a group that contains the users from 192.168.85.2-192.168.85.149 and another group from 192.168.85.150-192168.85.253, the first group I want to leave by the gw1 which is 22.66.33.1 and the second group that leaves by the gw2 22.66.33.10. both gw enter by the same port wan not by separate ports, I do not have any extra configuration in the mk, I have it restored by default without loading the basic configurations.
Thanks for your help.

Here is a basic diagram of how my network is
Dibujo1.jpg

If each of the two Ubiquiti Nanostations has a different public IP on its internet-facing interface than the one it has on its Mikrotik-facing interface, and uses src-nat when sending packets to internet as the picture suggests, then OK, responses to packets which went from your clients to the internet come back via the same Nanostation through which their respective requests did. So this is not the root cause of your issue.

So please post the output of “/export hide-sensitive” from your Mikrotik as otherwise there is no chance to find out where your problem could be.

Excuse my ignorance but how do I do the “/ export hide-sensitive”, could you indicate the steps to do it?
Thanks once more

In both Winbox and WebFig (no idea which one you use), there is an item named “Terminal” in the menu. When you press it, a command line window opens, where you can configure the router using text commands.