CARP protocol help needed

Hi everyone, I have a problem using carp protocol. In simple terms, i just finished to set carp on my master and backup server, after creating a simple web page showing the ip address and name of the current server it seems to work but when I turn off the master using ifconfig em0 down the web page don't work, it's like when I turn off the master even the carp shut down.
Hope you guys understand my problem.
Here all the master settings:
master ifconfig.jpg

master rc.jpg

master sysctl.jpg

backup settings:
backup ifconfig.jpg


backup rc.jpg
 
Hi everyone, i have a problem using carp on my freeBSD OS. Starting from the beginning i have a network configuration as below:
three OS installed on VMware, an user with linux mint and two server with freeBSD. SERVER is the master and then we have BACKUP. I activated carp on both the servers and seems to work but when i try the command ifconfig em0 both servers are marked as master.

Here the server1 settings:
/etc/rc.conf
Code:
hostname="SERVER"
keymap="it.kbd"
ifconfig_em0="inet 192.168.67.10 netmask 255.255.255.0"
ifconfig_em0_alias0="inet vhid 10 pass andrea 192.168.67.11/24"
defaultrouter"192.168.67.2"
sshd_enable="YES"
ntpd_enable="YES"
#Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dupdev="AUTO"
apache24_enable="yes"
mysql_enable="yes"
php_fpm_enable="yes"

/boot/loader.conf
Code:
carp_load="YES"

/etc/sysctl.conf
Code:
# $FreeBSD$
#  This file is read when going to multi-user and its contents piped thru
#  ''sysctl'' to adjust kernel values.   ''man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
#are being run under another UID.
#security.bsd.see_other_uids=0
net.inet.carp.preempt=1

# ifconfig em0
Code:
em0: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=481009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWSUM,VLAN_HWFILTER,NOMAP>
  ether 00:0c:29:f5:25:77
  inet 192.168.67.10 netmask 0xffffff00 broadcast 192.168.67.255
  inet 192.168.67.10 netmask 0xffffff00 broadcast 192.168.67.255 vhid 10
  carp: MASTER vhid 10 advbase 1 advskew 0
  media: Ethernet autoselect (1000baseT <full-duplex>)
  status: active
  nd6 options=29<PERFORMNUD,IFDISABLES,AUTO_LINKLOCAL>


here the server2 settings:
/etc/rc.conf
Code:
hostname="BACKUP"
keymap="it.kbd"
ifconfig_em0="inet 192.168.67.12 netmask 255.255.255.0"
ifconfig_em0_alias0="inet vhid 10 pass andrea 192.168.67.11/24"
defaultrouter"192.168.67.2"
sshd_enable="YES"
ntpd_enable="YES"
#Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dupdev="AUTO"
apache24_enable="yes"
mysql_enable="yes"
php_fpm_enable="yes"

/boot/loader.conf
Code:
carp_load="YES"

while I try to search 192.168.67.11/index.php it shows that carp is using SERVER1 but when I shut it down using ifconfig em0 down is like the carp doesn't see the other node so when I retry to search 192.168.67.11/index.php it shows me nothing
 
Don't post the same question multiple times. Threads merged.

I activated carp on both the servers and seems to work but when i try the command ifconfig em0 both servers are marked as master.
Both servers need to be able to "talk" to each other on those interfaces on layer 2.
 
Don't post the same question multiple times. Threads merged.


Both servers need to be able to "talk" to each other on those interfaces on layer 2.
both servers are able to talk, I pinged the address on both machines and it worked
 
Make sure they're configured to allow promiscuous mode in the VM configuration.
 
As SirDice already pointed your problem is in your virtual switch which doesn't allow changing of the MAC address.

Configuring promiscuous mode

Enable mac address changes and allow Forged transmits

IF multiple physical ports are connected as uplinks of this virtual switch then disable Net.ReversePathFwdCheckPromisc on the virtual switch

Note:
For serving web pages as HA you should look for proxy load balancer instead of CARP.
 
Back
Top