Discussion:
Internet Connection - Load Balancing and Failover
Walter Neto
2012-11-12 22:09:28 UTC
Permalink
Hello guys,

I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.

Which is the better to use in my scenario?

And for failover, the best solution is ifstated(8)?

thanks in advance.

Walter Neto
Tomas Bodzar
2012-11-13 06:57:59 UTC
Permalink
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
One of the possible approaches, but maybe easier for you will be
http://www.openbsd.org/cgi-bin/man.cgi?query=trunk&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
Post by Walter Neto
thanks in advance.
Walter Neto
Imre Oolberg
2012-11-13 08:04:46 UTC
Permalink
Post by Tomas Bodzar
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
One of the possible approaches, but maybe easier for you will be
http://www.openbsd.org/cgi-bin/man.cgi?query=trunk&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
I have been under impression that man trunk is for L2 redundancy. Could
you elaborate how it would help to load balance and fail over between
two different ISPs uplinks (one link per isp, i assume they have
different ip configurations)?


Imre
Post by Tomas Bodzar
Post by Walter Neto
thanks in advance.
Walter Neto
Uwe Werler
2012-11-13 09:07:45 UTC
Permalink
-----Ursprüngliche Nachricht-----
An: OpenBSD-misc list <***@openbsd.org>;
Von: Imre Oolberg <***@auul.pri.ee>
Gesendet: Di 13.11.2012 09:05
Betreff: Re: Internet Connection - Load Balancing and Failover
Post by Tomas Bodzar
Post by Tomas Bodzar
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
One of the possible approaches, but maybe easier for you will be
http://www.openbsd.org/cgi-bin/man.cgi?query=trunk&apropos=0&sektion=0&manpath=O
penBSD+Current&arch=i386&format=html
I have been under impression that man trunk is for L2 redundancy. Could
you elaborate how it would help to load balance and fail over between
two different ISPs uplinks (one link per isp, i assume they have
different ip configurations)?
Imre
Post by Tomas Bodzar
Post by Walter Neto
thanks in advance.
Walter Neto
Hi Imre,

take a look at the router section of relayd.conf: http://www.openbsd.org/cgi-bin/man.cgi?query=relayd.conf&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html

Regards Uwe
Pierre Marchal
2012-11-13 07:39:08 UTC
Permalink
Hello,

I don't think that trunk is appropriate for this scenario.
It is use for OSI level 2 (Ethernet) fail over and/or load balancing but won't be able to load balance traffic between two internet connection, witch involve TCP/IP load balancing.
Post by Tomas Bodzar
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
One of the possible approaches, but maybe easier for you will be
http://www.openbsd.org/cgi-bin/man.cgi?query=trunk&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
Post by Walter Neto
thanks in advance.
Walter Neto
Udo Siewert
2012-11-13 16:51:04 UTC
Permalink
Post by Pierre Marchal
Hello,
I don't think that trunk is appropriate for this scenario.
It is use for OSI level 2 (Ethernet) fail over and/or load balancing but won't be able to load balance traffic between two internet connection, witch involve TCP/IP load balancing.
You might try haproxy.

pkg_add haproxy

man HAPROXY(1)
--
Udo
David Coppa
2012-11-13 10:40:55 UTC
Permalink
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
thanks in advance.
http://www.openbsd.org/faq/faq6.html#Multipath

http://www.openbsd.org/faq/pf/pools.html#outgoing
Reyk Floeter
2012-11-13 21:26:27 UTC
Permalink
Hi,

I've read the other replies and there's no need to install any port. Like
mentioned before, just use relayd(8) from base with the "router" option in
relayd.conf(5) in combination with multipath routing (sysctl
net.inet.ip.multipath=1). You can also use pf with "route-to" or "rtable"
as a classifier for outbound traffic (eg. send SSH traffic over uplink A,
Web traffic over uplink B).

Reyk
Post by Walter Neto
Hello guys,
I have two internet connections, and I want to make load balancing and
failover service, I had read about pf load balancing and multi-path route,
what is the difference between them.
Which is the better to use in my scenario?
And for failover, the best solution is ifstated(8)?
thanks in advance.
Walter Neto
Loading...