Community discussions

MikroTik App
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 3:43 pm

Hi,

Is it possible to use one RB951ui-2hnd as a load balancer with four internet connections?

This is how I have it:
ether1: WAN1 (DHCP client)
ether2: WAN2 (DHCP client)
ether3: WAN3 (DHCP client)
ether4: WAN4 (DHCP client)
ether5: LAN (10.33.0.1/24)

How can I configure the router to use the four WAN connections balancing the traffic? Is it possible?
Thanks!!
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7187
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 3:49 pm

 
nxs02
Member Candidate
Member Candidate
Posts: 119
Joined: Sat Nov 07, 2015 1:25 pm
Location: Planet Earth

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 4:00 pm

imo using RB951ui-2hnd with having total bandwidth more than 5Mbps will slow down ur router
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 3135
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 4:12 pm

imo using RB951ui-2hnd with having total bandwidth more than 5Mbps will slow down ur router

check your config, i have tested +40mbit/sec total wan bandwidth using a heavy configuration with address list, firewall, mangle and queues on a rb951Ui

even ipip over ipsec gives you about 25mbit/sec on a rb951Ui
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 11:13 pm

Thanks!!
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 11:32 pm

I just noticed I have a problem.
The four WAN connections use the same IP ranges:
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1-WAN1
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether2-WAN2
add address=192.168.1.3/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether3-WAN3
add address=192.168.1.4/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether4-WAN4

Will this mangle work?
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=ether5-LAN

I can't change the IP of the WAN interfaces
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Tue Apr 19, 2016 11:42 pm

Is this OK??


/ ip address
add address=10.33.0.1/24 network=10.33.0.0 broadcast=10.33.0.255 interface=ether5-LAN
add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1-WAN1
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether2-WAN2
add address=192.168.1.3/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether3-WAN3
add address=192.168.1.4/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether4-WAN4

/ ip firewall mangle
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=ether5-LAN
add chain=prerouting in-interface=ether1-WAN1 connection-mark=no-mark action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ether2-WAN2 connection-mark=no-mark action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting in-interface=ether3-WAN3 connection-mark=no-mark action=mark-connection new-connection-mark=ISP3_conn
add chain=prerouting in-interface=ether4-WAN4 connection-mark=no-mark action=mark-connection new-connection-mark=ISP4_conn
add chain=prerouting in-interface=ether5-LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ether5-LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn
add chain=prerouting in-interface=ether5-LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP3_conn
add chain=prerouting in-interface=ether5-LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP4_conn
add chain=prerouting connection-mark=ISP1_conn in-interface=ether5-LAN action=mark-routing new-routing-mark=to_ISP1
add chain=prerouting connection-mark=ISP2_conn in-interface=ether5-LAN action=mark-routing new-routing-mark=to_ISP2
add chain=prerouting connection-mark=ISP3_conn in-interface=ether5-LAN action=mark-routing new-routing-mark=to_ISP3
add chain=prerouting connection-mark=ISP4_conn in-interface=ether5-LAN action=mark-routing new-routing-mark=to_ISP4
add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2
add chain=output connection-mark=ISP3_conn action=mark-routing new-routing-mark=to_ISP3
add chain=output connection-mark=ISP4_conn action=mark-routing new-routing-mark=to_ISP4

/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ISP1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.2 routing-mark=to_ISP2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.3 routing-mark=to_ISP3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.4 routing-mark=to_ISP4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.2 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.3 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.4 distance=4 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=ether1-WAN1 action=masquerade
add chain=srcnat out-interface=ether2-WAN2 action=masquerade
add chain=srcnat out-interface=ether3-WAN3 action=masquerade
add chain=srcnat out-interface=ether4-WAN4 action=masquerade
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7187
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: RB951ui-2hnd as multiple load balancer?

Wed Apr 20, 2016 11:36 am

No it is not going to work, each interface must have IP address from different subnets.
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Wed Apr 20, 2016 2:44 pm

No it is not going to work, each interface must have IP address from different subnets.
What can I do if I cannot change that and the four WAN IPs will be of the same subnet?
 
nxs02
Member Candidate
Member Candidate
Posts: 119
Joined: Sat Nov 07, 2015 1:25 pm
Location: Planet Earth

Re: RB951ui-2hnd as multiple load balancer?

Wed Apr 20, 2016 4:05 pm

bridge?
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Tue Aug 30, 2016 10:04 pm

I have the RB951 with 4 ADSL connections (ports 1,2,3,4) and port 5 with the LAN.
After configuring everything according the tutorial, I don't see any activity in the ADSL connected to ports 3 and 4 (they are working).
Any idea? any help?
You do not have the required permissions to view the files attached to this post.
 
stoser
Member Candidate
Member Candidate
Posts: 123
Joined: Sun Aug 21, 2016 12:04 am

Re: RB951ui-2hnd as multiple load balancer?

Sun Sep 04, 2016 5:14 am

Concerning your 4 dsl connections: FYI, I am load balancing 12 vdsl connections on a 3011. My suggestion is, if possible, do not use the modems as routers. Set them to Bridge mode and have the MTik handle the PPPoE client connections. If you must use the modems as routers, it would be simpler to give both the router/modem and the Mtik static IP addresses. That way you avoid the DHCP issue.

Concerning your problem where two of the DSLs are not trafficking data: Please post ip/firewall/mangle rules. Also post ip/firewall/nat rules. Finally, also post ip/routes.

Regards.
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Sun Sep 04, 2016 3:52 pm

Concerning your 4 dsl connections: FYI, I am load balancing 12 vdsl connections on a 3011. My suggestion is, if possible, do not use the modems as routers. Set them to Bridge mode and have the MTik handle the PPPoE client connections. If you must use the modems as routers, it would be simpler to give both the router/modem and the Mtik static IP addresses. That way you avoid the DHCP issue.

Concerning your problem where two of the DSLs are not trafficking data: Please post ip/firewall/mangle rules. Also post ip/firewall/nat rules. Finally, also post ip/routes.

Regards.
Hi stoser,

I tried to set the ADSL modems to Bridge mode but the ISP is changing them back to work as router because they don't want to support Bridge mode - some stupid policy they have...

Here is the info you requested:
routes.JPG
nat.JPG
mangle.JPG
Thanks!!
You do not have the required permissions to view the files attached to this post.
 
stoser
Member Candidate
Member Candidate
Posts: 123
Joined: Sun Aug 21, 2016 12:04 am

Re: RB951ui-2hnd as multiple load balancer?

Sun Sep 04, 2016 4:24 pm

Hello:

In rules 10 and 11 in mangle, under property PCC, you specify 2/2 and 2/3. This is not possible, since the second number is the remainder of a simple division operation. In brief, 2/0 means that the algorithm will divide the number of the connection by 2. if remainder is zero, then the rule is triggered. You will never have division by 2 with a remainder 2 or a remainder 3. Therefore they are never getting triggered. Since you have 4 connections, you need to use 4/0, 4/1, 4/2, and 4/3 in rules 8, 9, 10, and 11 in mangle, under the PCC property. There may be additional problems, but this one certainly would cause the behavior that you describe.

Kind regards,
 
mati83
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Aug 28, 2014 12:12 am

Re: RB951ui-2hnd as multiple load balancer?

Mon Sep 05, 2016 12:09 am

Yes, looks like that was the problem, now I see activity in the four interfaces with ADSL connections!
Thanks a lot!! :)

Who is online

Users browsing this forum: No registered users and 32 guests