-1

I have centos 7 server working as a gateway for my network with three LAN cards and two internet connections from different ISPs , i want to combine the two connections and balance the network load between them .. I've tried bonding and it didn't work for me well and all the tutorials i watched about load balancing in Linux wasn't good . any ideas !?

MTita
  • 25
  • 8
  • What do you mean with "load balance"? – gxx May 08 '16 at 22:35
  • I want to share the two connections side by side to my network and make load balancing between them i think it means that all the network traffic will be shared between them to increase speed and availability – MTita May 08 '16 at 23:07
  • Well, if you refer to "doing round-robin for your traffic" on both lines using "load balance", then, I'm afraid, this needs more than bonding at your place. You would have to setup a remote point as well, to do bonding over there, so your traffic originates from one source IP. You could do this via a publicly reachable machine somewhere and tunneling your traffic to this point. Or you could set up a stateful firewall which could keep track of your connections and ensures that... – gxx May 08 '16 at 23:13
  • ...traffic to the same destination is send over one line. Besides: I'm unsure if you know how routing and TCP/IP works, but maybe it would be good to some research first. – gxx May 08 '16 at 23:18
  • Yeah .. I'm trying to learn by doing ... and I am not talking here about bonding I've tried bonding and it's not the best solution here am doing some researches at this time and i can really use any help to know where to start at least ... after all .. Thank u – MTita May 08 '16 at 23:41
  • Maybe have a look at [this](http://serverfault.com/questions/141462/is-there-a-sensible-way-of-teaming-two-adsl-connections). – gxx May 09 '16 at 00:10
  • Maybe have a look as well [at this .pdf](http://wiki.imagestream.com/mediawiki/index.php?title=Special:PdfPrint&page=OpenVPN_Load_Balancing) to get an idea how you could build something like this. – gxx May 09 '16 at 00:16
  • Yeah that's what i was talking about thanks for your help i will try this and i hope it works – MTita May 09 '16 at 00:20
  • 1
    You can also consider this: http://www.zeroshell.org/load-balancing-failover/ It's a linux distro in its own right, but poking around may give you some ideas how they do it. More routing examples here: http://lartc.org/howto/lartc.rpdb.multiple-links.html – JayMcTee May 09 '16 at 08:11
  • OK .. now i used [This](http://lartc.org/howto/lartc.rpdb.multiple-links.html) guide and it actually worked well on the server and it can balance between the two ISP's i disabled firewalld and configured everything through iptables but the only problem now that the server can't handle dns requests and i can't browse any website or download anything from any client side , i can ping any ip successfully ... – MTita May 10 '16 at 20:25

1 Answers1

0

This is not what bonding is for.

You need policy routing.

suprjami
  • 3,476
  • 20
  • 29