Community discussions

MikroTik App
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Help with gateway

Fri Feb 23, 2018 4:51 pm

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.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Help with gateway

Fri Feb 23, 2018 5:39 pm

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.
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Fri Feb 23, 2018 6:01 pm

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?
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Help with gateway

Fri Feb 23, 2018 6:30 pm

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.
 
skuykend
Member Candidate
Member Candidate
Posts: 274
Joined: Tue Oct 06, 2015 7:28 am

Re: Help with gateway

Fri Feb 23, 2018 8:32 pm

Make sure you disable your fasttrack rule, fasttrack doesn't behave well with marked packets.
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Fri Feb 23, 2018 8:41 pm

if I'm sure the fastrack is not activated, that configuration does not work anyway.
equally greetings for your help
Thank you.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Help with gateway

Fri Feb 23, 2018 10:30 pm

Do you have a masquerade rule for 2nd gw?
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Sat Feb 24, 2018 1:23 am

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
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Help with gateway

Sat Feb 24, 2018 4:08 pm

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.
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Sat Feb 24, 2018 4:16 pm

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.
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Sat Feb 24, 2018 4:44 pm

Here is a basic diagram of how my network is
You do not have the required permissions to view the files attached to this post.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Help with gateway

Sat Feb 24, 2018 4:57 pm

Here is a basic diagram of how my network is
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.
 
johaopablo
just joined
Topic Author
Posts: 7
Joined: Mon Feb 05, 2018 5:48 am

Re: Help with gateway

Sat Feb 24, 2018 5:29 pm

Excuse my ignorance but how do I do the "/ export hide-sensitive", could you indicate the steps to do it?
Thanks once more
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Help with gateway

Sat Feb 24, 2018 5:57 pm

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.

Who is online

Users browsing this forum: d513, Majestic-12 [Bot], settecplus, vingjfg and 129 guests