Community discussions

MikroTik App
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Load Balancing Questions and Help

Thu Feb 12, 2015 8:14 am

Hello,

I am reaching out to see if someone can help me because all of the documentation that I am finding does not clearly state how to set this up or I am not understanding it to well.

What I am trying to do is I have 2 ISP's coming in one is on ETH1 and the other is on ETH2 and all of home equipment and such is on ETH5. What I am wanting to do is route addresses 10.0.1.0-10.0.1.240 to the first ISP on ETH1 and then addresses 10.0.1.240-10.0.1.250 will be routed through ETH2. The mikrotik's ip address is 10.0.1.254

Some of these devices will be wireless some will be hardwired but I am not finding an answer on clearly how to do this. The guides I do find don't specify if that is your ISP ip or if its your internal ip and/or the screenshots are of old routeros version.

If you need any other questions answered to help please let me know.

Thanks,
Dereck
 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Posts: 282
Joined: Tue Feb 10, 2015 3:21 pm

Re: Load Balancing Questions and Help

Thu Feb 12, 2015 3:28 pm

Hello, have you tried from this manual ?
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Sun Feb 15, 2015 12:23 am

Yes i have done that and when I plug ISP 1 into port 1 and ISP 2 into port 2 and all hardwire connections into port 5 on 24 port switch it starts giving external IPs to everything?


Then i am also unable to get internet at this point and seems to screw the whole thing up?
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Load Balancing Questions and Help

Tue Feb 17, 2015 8:24 am

I'm sorry but I didn't get the last sentence. what did you mean? "external IP"??

and maybe you have default configuration which effect your config. hmm?
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Wed Feb 18, 2015 2:16 am

Yes this has the default configuration setup and then I added all of the load balancing stuff? Do I need to erase the default config?
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Load Balancing Questions and Help

Wed Feb 18, 2015 10:14 pm

Delete everything in /ip Routes and then config fail-over or load balancing your searching for in forums or wiki. maybe this should work. at least worked for me. otherwise your config should be checked.
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Wed Apr 01, 2015 3:26 am

Unfortunately that didn't help. I am sure it has something to do with the default configuration but I don't know enough about the mikrotik to figure it out.

What I am trying to do is the following:

I have 2 WAN providers and would like certain things to go out on the second one as well as other things on the first one.

WAN1 xxx.xxx.xxx.105 DHCP
WAN2 xxx.xxx.xxx.83 DHCP

Mikrotik Address: 10.0.1.1

DHCP Range: 10.0.1.2-200
Static Range: 10.0.1.2.201-254

I would like all traffic 10.0.1.2-245 including WiFi to go in and out WAN1 and everything 245-254 to go in and out WAN2. I also need all of these ips to be able to talk internally still like normal.

I have tried setting up the masquerade earlier but when i do with the default configuration something is messing it up and not sure what to fix?

If anyone could help would be greatly appreciated.
 
bingo220
Member Candidate
Member Candidate
Posts: 126
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Load Balancing Questions and Help

Wed Apr 01, 2015 10:22 am

I think you need something like this:
/ip firewall address-list
add list=static-wan1 address=10.0.1.2-10.0.1.245 comment="LAN-IPs to WAN1"
add list=static-wan2 address=10.0.1.246-10.0.1.254 comment="LAN-IPs to WAN2"

/ip firewall mangle
add action=mark-routing chain=prerouting src-address-list=static-wan1 dst-address-type=!local new-routing-mark=to-wan1 comment="Mark STATIC route to WAN1"
add action=mark-routing chain=prerouting src-address-list=static-wan2 dst-address-type=!local new-routing-mark=to-wan2 comment="Mark STATIC route to WAN2"

/ip route
add dst-address=0.0.0.0/0 distance=1 gateway=xxx.xxx.xxx.105 routing-mark=to-wan1 comment="STATIC Route to WAN1" disabled=no
add dst-address=0.0.0.0/0 distance=1 gateway=xxx.xxx.xxx.83 routing-mark=to-wan2 comment="STATIC Route to WAN2" disabled=no
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Wed Apr 01, 2015 9:21 pm

Bingo,

Would this work with default configuration or do i need to erase entire config and start over?
 
bingo220
Member Candidate
Member Candidate
Posts: 126
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Load Balancing Questions and Help

Wed Apr 01, 2015 9:59 pm

Would this work with default configuration or do i need to erase entire config and start over?
You can test it with default config.
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Wed Apr 01, 2015 10:29 pm

I have put it in but it is handing out external IP's to devices. I have thought all along it is something to do with the default bridge and switch that is causing this. However the devices on ips 246-254 are going out on ip 105 unlike all the rest? The others are giving me a range of external IP's.

Thanks for your help getting farther than i have so far lol.
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Thu Apr 02, 2015 2:53 am

So the issue is that the ETH2 is set as the master in the switch and i need it removed so that it acts as a WAN just like ETH1 but i am unsure how to do that. When looking at the WiKi i am not find any information on how to do that and notice that none of the load balancing stuff describes how to do that either?

Any help would be great. Would like to make ports 3-5 the switch and take 1 and 2 as the WAN ports.
 
User avatar
karlisi
Member
Member
Posts: 469
Joined: Mon May 31, 2004 8:09 am
Location: Latvia

Re: Load Balancing Questions and Help

Thu Apr 02, 2015 11:33 am

In Winbox open Interface list, open ether3, in Master Port choose 'none'. Then open ether4 and ether5, and change master port to ether3. If I remember correctly, You will need configure them twice, choosing 'none' at first, because MikroTik allows only one master port per switch.
 
dereckr
just joined
Topic Author
Posts: 10
Joined: Wed Oct 22, 2014 11:34 pm

Re: Load Balancing Questions and Help

Thu Apr 02, 2015 3:41 pm

In Winbox open Interface list, open ether3, in Master Port choose 'none'. Then open ether4 and ether5, and change master port to ether3. If I remember correctly, You will need configure them twice, choosing 'none' at first, because MikroTik allows only one master port per switch.

Thank you for that I had gotten that last night but that still didn't work how i was planning. That did however fix my issues with it distributing public IP's to all of the PC's.

Still need to figure out how to setup ether2 to be a WAN port. That maybe all that is needed but it is not splitting up the IP's according to internal IP's.
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Load Balancing Questions and Help

Thu Apr 02, 2015 4:37 pm

There is no specific setup to make one Ethernet port as WAN. I mean when you route your internet via one Ethernet to to MT (modem ---> MT) so this specific Ether is WAN Port. if I understand you correctly.
e.g. mine is:
Ether2 Address: 192.168.20.0/24 and my modem is: 192.168.20.2
Ether3 Address: 192.168.30.0/24 and my modem is: 192.168.30.3
I route those to modem to 0.0.0.0/0 so Ether 2 & 3 are man WANs.
And then It's up to me whether I need load balancing, fail over and ...........
I hope I get your problem :D

Who is online

Users browsing this forum: felixka and 17 guests