Community discussions

MUM Europe 2020
 
bianer321
just joined
Topic Author
Posts: 3
Joined: Thu Jan 23, 2014 9:59 am

Help with setting up routing for multiple gateways

Thu Jan 23, 2014 10:20 am

Hi

We are in the process of setting up a mikrotik RB 915 for a client. They have two WAN gateways, one for general internet access and one for a direct link to their head-office, setup as follows:

LAN 1 - Internal LAN connected to internet gateway IP: x.x.x.x/24
LAN 1 Gateway IP : g.g.g.g/24
LAN 2 - LAN connected to direct link gateway IP: y.y.y.y/24

There is a second device (a network print server) that also needs a connection to the LAN 2 gateway.

What I was thinking of for a setup was to bridge ether1 and ether2 for LAN 2 with ether1 connected to the gateway and ether2 connected to the print server. Then bridge ether4, 5 and the wlan for LAN 1. Ether3 would be connected to the LAN 1 gateway. When a pc on LAN 1 tries to establish a RDP connection to server z.z.z.z, then it needs to be routed to the LAN 2 gateway, all other traffic needs to be routed LAN 1 gateway.

I was thinking of setting the gateway for the default route as g.g.g.g/24 and then create a second route with the destination address as z.z.z.z/24 and gateway as y.y.y.y/24.

Would that setup work or do I need to do something else, maybe policy based routing? Any help would be appreciated.

Regards
Bianca & Werner
 
deejayq
Member Candidate
Member Candidate
Posts: 195
Joined: Wed Feb 23, 2011 8:33 am

Re: Help with setting up routing for multiple gateways

Thu Jan 23, 2014 8:57 pm

could you please post a diagram with what you want to acomplish?
for me it was hard to follow the text you posted
 
bianer321
just joined
Topic Author
Posts: 3
Joined: Thu Jan 23, 2014 9:59 am

Re: Help with setting up routing for multiple gateways

Fri Jan 24, 2014 11:11 am

Hi

Please see the attached network diagram. Would the diginet router still act as a gateway for lan2 even if ether1 & 2 are bridged? Let us know if there are any other questions.

Regards

Bianca & Werner
You do not have the required permissions to view the files attached to this post.
 
deejayq
Member Candidate
Member Candidate
Posts: 195
Joined: Wed Feb 23, 2011 8:33 am

Re: Help with setting up routing for multiple gateways

Fri Jan 24, 2014 3:34 pm

first remove or disable all routes
then
ip route add dst-address=z.z.z.z gateway=y.y.y.1 distance=1
ip route add dst-address=0.0.0.0/0 gateway=g.g.g.2 distance=2
do not forget to add 2 nat masquerading rules, first one out via bridge1 (ether1+ether2) and the second one out via ether3

what i don't understand is why bridge ether1 and 2 and not connect print server straight into diginet router?
i don't understand what you mean by "Traffic beween the diginet router and print server needs to stay in LAN 2". if you want you could add a drop rule in ip firewall filter from bridge 2 (ether4,5 and wlan) to ip y.y.y.3
 
bianer321
just joined
Topic Author
Posts: 3
Joined: Thu Jan 23, 2014 9:59 am

Re: Help with setting up routing for multiple gateways

Mon Jan 27, 2014 8:32 am

Hi

Thanks for the help, appreciated. That was what I was thinking of doing as well. The reason why I want to bridge ether 1 & 2 and connect the print server to the mikrotik router, is because the diginet router only has one available port.

Regards

Bianca & Werner

Who is online

Users browsing this forum: anav and 48 guests