Marco Pfatschbacher skrev 2009-10-12 23:39:
On Mon, Oct 12, 2009 at 01:24:49PM +0200, P-O Yliniemi wrote:
Hi,
The CARP section (6.11) in the FAQ is incorrect (old), so I'm asking for
a solution here on the list.
Hi,
yes, the faq is outdated.
see http://www.openbsd.org/faq/upgrade43.html#carp
The manpage, however has all the info you need.
http://www.openbsd.org/cgi-bin/man.cgi?query=carp&sektion=4#LOAD+BALANCING
I want to set up a similar configuration as the FAQ describes, with the
IP-address being the only difference:
server a ip: 10.5.0.2
server b ip: 10.5.0.3
load balanced ip: 10.5.0.200
server a:
ifconfig carp0 create
ifconfig carp0 10.5.0.200 netmask 255.0.0.0 vhid 1 pass carptest advbase
1 advskew 0
sysctl net.inet.carp.preempt=1
that should be sth like:
server a:
ifconfig carp0 10.5.0.200 netmask 255.0.0.0 carpnodes 1:0,2:100 balancing arp
server b:
ifconfig carp0 10.5.0.200 netmask 255.0.0.0 carpnodes 1:100,2:0 balancing arp
Thanks for this quick and easy solution. So instead of the old way of
configuring CARP (multiple interfaces with the same address on each
machine), we will have to use carpnodes, which when explained is much
more simple to set up.
The problem I still have is that the traffic to the hosts are not
balanced, just redundant (if "a" goes down, "b" will take over). The
final set up will be a bit more complex (if I am able to get it working):
wan -> (openbsd gateway) ->
vmware esxi (a) ->
server 1 (a)
server 2 (a)
wan -> (openbsd gateway) ->
vmware esxi (b) ->
server 1 (b)
server 2 (b)
wan and "openbsd gateway" is the same wan and gateway (and here are my
single point of failure)
"a" and "b" servers will have to be load balanced and redundant to each
other.
Each set of "a" and "b" (and probably later "c" and "d") will get a
public IP address
I have seen a similar set-up somewhere (using OpenBSD and CARP but not
with ESXi), but I am unable to locate it for now.
/PeO
Looking forward for a corrected FAQ section or an answer in this thread.
Any volunteers to update the FAQ? :-)
Marco