Community discussions

MUM Europe 2020
 
usman123
newbie
Topic Author
Posts: 33
Joined: Mon May 16, 2016 4:15 pm

Load balancing with manageable switch

Mon Jun 26, 2017 8:21 pm

Dear Experts
I have 10 ISP links and i want to load balancing these 10 links but,i have only 5 ports .can i use manageable switch to do load balancing using vlan?
 
Sob
Forum Guru
Forum Guru
Posts: 5170
Joined: Mon Apr 20, 2009 9:11 pm

Re: Load balancing with manageable switch

Tue Jun 27, 2017 12:12 am

I don't see a problem with it. Create 10 VLANs on switch, assign each to different untagged access port and connect all to WANs. Then set another port as trunk with these 10 VLANs tagged. Connect it to RB, add 10 VLAN interfaces and you got yourself 10 WANs to play with.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
paulct
Member
Member
Posts: 310
Joined: Fri Jul 12, 2013 5:38 pm

Re: Load balancing with manageable switch

Tue Jun 27, 2017 8:59 am

You can use vlans, with ecmp and load balance across them.
 
usman123
newbie
Topic Author
Posts: 33
Joined: Mon May 16, 2016 4:15 pm

Re: Load balancing with manageable switch

Wed Jun 28, 2017 8:18 pm

Thanks Sob
can u provide me some configuration script i shall be very thank full to you.
 
User avatar
agomes
newbie
Posts: 31
Joined: Thu Mar 17, 2016 8:16 am

Re: Load balancing with manageable switch

Wed Jun 28, 2017 9:41 pm

Thanks Sob
can u provide me some configuration script i shall be very thank full to you.
As understood from Sobs answer the Interface, VLAN and SRC-NAT configuration should look like this for example:
/interface ethernet
set [ find default-name=ether1 ] comment=WAN

/interface vlan
add interface=ether1 name=vlan1001 vlan-id=1001
add interface=ether1 name=vlan1002 vlan-id=1002
add interface=ether1 name=vlan1003 vlan-id=1003
add interface=ether1 name=vlan1004 vlan-id=1004
add interface=ether1 name=vlan1005 vlan-id=1005
add interface=ether1 name=vlan1006 vlan-id=1006
add interface=ether1 name=vlan1007 vlan-id=1007

/ip address
add address=1.1.1.1/30 interface=vlan1001 network=1.1.1.0
add address=2.2.2.1/30 interface=vlan1002 network=2.2.2.0
add address=3.3.3.1/30 interface=vlan1003 network=3.3.3.0
add address=4.4.4.1/30 interface=vlan1004 network=4.4.4.0
add address=5.5.5.1/30 interface=vlan1005 network=5.5.5.0
add address=6.6.6.1/30 interface=vlan1006 network=6.6.6.0
add address=7.7.7.1/30 interface=vlan1007 network=7.7.7.0

/ip firewall nat
add action=masquerade chain=srcnat comment="Masquerade outgoing" \
    out-interface=vlan1001
add action=masquerade chain=srcnat out-interface=vlan1002
add action=masquerade chain=srcnat out-interface=vlan1003
add action=masquerade chain=srcnat out-interface=vlan1004
add action=masquerade chain=srcnat out-interface=vlan1005
add action=masquerade chain=srcnat out-interface=vlan1006
add action=masquerade chain=srcnat out-interface=vlan1007
Rest depends on the kind of LB method you are using. Hope this is of any help..
Best regards

Aleksandar
Best regards
Aleksandar
 
Sob
Forum Guru
Forum Guru
Posts: 5170
Joined: Mon Apr 20, 2009 9:11 pm

Re: Load balancing with manageable switch

Wed Jun 28, 2017 10:10 pm

The question was about using vlans to get more WAN ports. That's possible, select a physical ethernet port, add vlan interfaces to it, connect cable to properly configured switch and you got them.

The rest is different topic. There are different ways how each WAN should be configured, both connection type (plain ethernet, PPPoE, ...) or address(es) (static, dynamic, whole routed subnet(s), ...). And then there are even more different possible requirements what the whole setup should do (different LANs, rules how each should use WANs, etc, etc, etc). Only your imagination is the limit. So writing some universal config to solve everything is impossible.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
libyatik
Frequent Visitor
Frequent Visitor
Posts: 53
Joined: Wed Jun 28, 2017 4:31 am

Re: Load balancing with manageable switch

Thu Jun 29, 2017 5:33 am

what you need is a router that support multihoming (protocol binding ) to get the max speed of 10
using other methods will only separate clients connections to reduce load
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Load balancing with manageable switch

Thu Jun 29, 2017 5:47 am

Aleksandar's example is pretty good.
I'd simplify things one more notch in the firewall by going into interface lists, creating a list called WAN, and then adding all 10 of the VLAN interfaces to that group.
Finally, in the IP > Firewall > NAT rules, remove 9 of the masquerade rules and on the remaining rule, replace "out-interface=xxxxx" with "out-interface-list=WAN"

As for the ECMP suggestion, that's going to be the easiest thing to do. For all WAN interfaces assigned dynamically, you will receive a default gateway route (dst=0.0.0.0/0) so make sure they all have the same administrative distance so they get balanced.

Otherwise, you'll need to make quite a lot of mangle rules to get it working.

Another suggestion was to bundle the interfaces using some kind of bonding protocol. If your links are all to the same ISP and they're all PPPoE, then you can ask the ISP if they'll offer MLPPP, which if they do, that's the easiest of all - just put pppoe-client on each vlan interface (and set the pppoe-outXX interfaces as interface group WAN, and remove the physical vlan interfaces)
This will give you the ability to actually achieve single-thread downloads at the combined speed of your links. If they're just load-balanced with different public IP addresses, then nobody will be able to download faster than the available bandwidth of whichever link the connection happened to get assigned to.

Furthermore, coming up with a link testing configuration for 10 links is going to get very ugly too.... so if they can do MLPPP then give thanks to god/the universe/your guardian angel/your ancestors watching over you/luck/whatever you would give thanks to..... your life will be so much better.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
usman123
newbie
Topic Author
Posts: 33
Joined: Mon May 16, 2016 4:15 pm

Re: Load balancing with manageable switch

Thu Jun 29, 2017 7:39 pm

Thanks Aleksandar
I m using PCC load balancing is this method work in PCC?
 
User avatar
agomes
newbie
Posts: 31
Joined: Thu Mar 17, 2016 8:16 am

Re: Load balancing with manageable switch

Thu Jun 29, 2017 8:01 pm

Thanks Aleksandar
I m using PCC load balancing is this method work in PCC?
It will work with PCC LB. Also, try using ZeroBytes suggestin with the interface list. It does simplify things a last bit.
Best regards
Aleksandar

Who is online

Users browsing this forum: No registered users and 40 guests