Community discussions

MikroTik App
 
IMRAN KHOKHAR
just joined
Topic Author
Posts: 2
Joined: Tue Jan 08, 2008 10:03 pm

Load-Balance with dynamic gatway setings

Tue Jan 08, 2008 10:27 pm

how can i use 2 or more interface without static IPs or gatwayes? i have only dynamic IPs and gatwayes with WAN?
how can posibale to load-balance with (dhcp) dynamic WAN setings?
like; WAN-1 (with DHCP)
WAN-2 (with DHCP)
LAN (192.168.1.254)
how can posibale to load-balance with this type of network
 
User avatar
jwcn
Forum Guru
Forum Guru
Posts: 1501
Joined: Sun Aug 27, 2006 6:49 am
Location: Maryland, USA
Contact:

Re: Load-Balance with dynamic gatway setings

Wed Jan 09, 2008 6:12 am

wiki.mikrotik.com
 
User avatar
sandov63
newbie
Posts: 34
Joined: Mon Jun 25, 2007 9:15 pm
Location: Villa del rosario perija zulia, venezuela

Re: Load-Balance with dynamic gatway setings

Thu Feb 21, 2008 12:11 am

I have the same question ,, i think theres nobody with knowledge of this in all over the forum?
i had posted this same question many times without response
Cuando la ignorancia se impone, la razon cordialmente cede el paso.
 
User avatar
gmsmstr
Trainer
Trainer
Posts: 942
Joined: Fri Jun 04, 2004 2:22 am
Location: St. Louis, MO
Contact:

Re: Load-Balance with dynamic gatway setings

Thu Feb 21, 2008 3:12 am

asssuming both gateways do not have the same network, then you should be able to use v3 interface routing option.
Dennis Burgess, MCTCE, MTCNA, MCTCTE, MTCWE, MTCNIE, A+, N+, MCP, MTCSE Mikrotik Certified Consultant / Trainer
Need Mikrotik Support: http://www.linktechs.net -- Link Technologies, Inc.
-- Author of "Learn RouterOS: Second Edition"
 
bunrsa
just joined
Posts: 9
Joined: Thu Jun 28, 2007 4:59 pm

Re: Load-Balance with dynamic gatway setings

Wed Feb 27, 2008 1:55 pm

If you want to load balance wan connections take a look at the following wiki entry:
http://wiki.mikrotik.com/wiki/Load_Balancing_Persistent

However in your case you will need to use masquerading instead of source nat and you will need to use interface routing instead of next hop routing.

I.E. instead of:
/ ip route 
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd 
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even
you would use:
/ ip route 
add dst-address=0.0.0.0/0 gateway=wan1 scope=255 target-scope=10 routing-mark=odd 
add dst-address=0.0.0.0/0 gateway=wan2 scope=255 target-scope=10 routing-mark=even
and with NAT, instead of:
/ ip firewall nat 
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 to-ports=0-65535 
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 to-ports=0-65535
you would use:
/ ip firewall nat 
add chain=srcnat connection-mark=odd action=masquerade out-interface=wan1 
add chain=srcnat connection-mark=even action=masquerade out-interface=wan2
let me know if that helps
 
User avatar
Akangage
newbie
Posts: 38
Joined: Tue May 29, 2007 2:33 pm
Location: Indonesia
Contact:

Re: Load-Balance with dynamic gatway setings

Thu Feb 28, 2008 6:26 am

/ ip firewall nat 
add chain=srcnat connection-mark=odd action=masquerade out-interface=wan1 
add chain=srcnat connection-mark=even action=masquerade out-interface=wan2
let me know if that helps
What is the differeny if we using
/ ip firewall nat 
add chain=srcnat  action=masquerade src-address=[LAN/Local]
 
bunrsa
just joined
Posts: 9
Joined: Thu Jun 28, 2007 4:59 pm

Re: Load-Balance with dynamic gatway setings

Mon Mar 03, 2008 9:17 am

2 things are different:

1. You need to use the connection marking: "connection-mark="
2. src-address=[LAN/Local] only works if your IP is static, the first question in this topic was about load balancing with DHCP / Dynamic WAN IP's.
 
BurstNET

Re: Load-Balance with dynamic gatway setings

Thu May 01, 2008 9:23 pm

Any update on how to do this?

SMA
 
User avatar
fatonk
Member
Member
Posts: 439
Joined: Tue Feb 22, 2005 11:06 am
Location: Mitrovica/Kosova

Re: Load-Balance with dynamic gatway setings

Thu May 01, 2008 9:53 pm

Yes bunrsa is right, you cannot use action=src-nat because then you will have to specify to-addresses=X.X.X.X and in your case you do not know which address you will get from DHCP, just use masquerade out the interface. So, just follow the bunrsa example and you will solve this issue.

Regards.

Faton

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Paternot, renanme, robberer and 226 guests