Community discussions

 
RunAway
just joined
Topic Author
Posts: 1
Joined: Thu Mar 06, 2014 4:38 am

multi WAN NAT for different LANs

Thu Mar 06, 2014 4:52 am

Hi could anybody please help me out on this?

I have a setup with RB1100, 2 WAN lines, both have 1 static IP by ethernet connection.
WAN1 has 50MB bandwidth and WAN2 has 70MB.

LAN side I have 3 LANs.
here is the requirement, LAN1 using WAN1, LAN2 and LAN3 using WAN2

let's say
WAN1: 1.1.1.2/30 gw 1.1.1.1
WAN2: 2.1.1.2/30 gw 2.1.1.1
LAN1: 192.168.1.0/24
LAN2: 192.168.2.0/24
LAN3: 192.168.3.0/24

I knew the routing will only choose the nearest route. if I just put 3 LANs in NAT masquerade , it will all go out by WAN1.
What should I do to make the setup work. please help , a example will be very appreciated.

Regards
 
User avatar
NAB
Trainer
Trainer
Posts: 503
Joined: Tue Feb 10, 2009 4:08 pm
Location: UK
Contact:

Re: multi WAN NAT for different LANs

Thu Mar 06, 2014 11:47 am

What should I do to make the setup work.
Mangle rules, mark connections and routes. Then route according to the routing marks. This should all be covered in an MTCNA course.
Nicholas Barnes BSc(hons)
Certified Mikrotik Consultant
Certified Mikrotik Trainer

Vitell - Asterisk, Linux and network consultants
Unofficial IRC channel: #routerboard on irc.z.je
 
User avatar
joshaven
Member
Member
Posts: 439
Joined: Fri May 06, 2011 1:50 am
Location: USA
Contact:

Re: multi WAN NAT for different LANs

Mon Mar 17, 2014 3:38 am

Another approach that you may want to consider is PCC load balancing. This would match each connection with a different WAN rather then breaking it up by internal subnets. You can probably achieve a more even distribution of traffic this way. This is however assuming you don't need to associate specific internal computers with specific public ip addresses.

http://wiki.mikrotik.com/wiki/Manual:PCC


Joshaven Potter
http://joshaven.com
Sent from my iPhone using Tapatalk
Joshaven Potter
Consulting and Business Services Available http://joshaven.com
 
nerdtron
Member Candidate
Member Candidate
Posts: 123
Joined: Sat Nov 30, 2013 7:49 am

Re: multi WAN NAT for different LANs

Mon Mar 17, 2014 7:13 am

You don't have to complicate things, just mark routing will do the job for you.
Here's the link: http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways
 
User avatar
Kreacher
Member
Member
Posts: 359
Joined: Wed Sep 25, 2013 3:58 pm
Location: Hogwarts

Re: multi WAN NAT for different LANs

Mon Mar 17, 2014 10:48 pm

You don't have to complicate things, just mark routing will do the job for you.
Here's the link: http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways
I consider to nerdtron that in this case "Policy based Routing" in combination with VLANs
would do the job perfectly, in my eyes.

PBR at the both WAN interfaces and then
VLAN10 - 192.168.1.0/24
VLAN20 - 192.168.2.0/24
VLAN30 - 192.168.3.0/24

This would be in my eyes the best practice.
Kindly regards
Kreacher ♬

--------------------------------------
Karma points must not be paid by you
 
User avatar
joshaven
Member
Member
Posts: 439
Joined: Fri May 06, 2011 1:50 am
Location: USA
Contact:

Re: multi WAN NAT for different LANs

Tue Mar 18, 2014 3:11 pm

A vlan would give you layer 2 seporation but it wouldn't help you sort traffic between upline providers. The bottom like is that you need a default route with a routing mark then you need to add a routing mark to all traffic that you want to use that route through a mangle rule. You could choose the mangle rule criteria based on vlan, subnet or per connection with PCC. I would still would probably do PCC load balancing because it is most likely the option that would give you the best ability to load balance until you have a nearly even distribution of traffic. If you wanted you could use a vlan and PCC.
Joshaven Potter
Consulting and Business Services Available http://joshaven.com

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 96 guests