# UCARP problems, both nodes become master [solved]

## nekromancer

Hi,

I'm trying to get 2 nodes to use UCARP for IP Failover, it's proving to be very difficult. Both machines are identical in hardware.

Node1:

eth0 (this is for DRBD) = 172.22.0.1 , bcast 172.22.255.255, netmask 255.255.0.0

eth1 (on LAN) = 7.200.200.1, bcast 7.255.255.255, netmask 255.0.0.0, gw 7.8.0.254

Node2:

eth0 (this is for DRBD) = 172.22.0.2 , bcast 172.22.255.255, netmask 255.255.0.0

eth1 (on LAN) = 7.200.200.2, bcast 7.255.255.255, netmask 255.0.0.0, gw 7.8.0.254

I've installed the latest version of UCARP (v1.4)

I've setup /etc/ucarp  dir with my  vip-up.sh and vip-down.sh scripts.

I've also setup a /etc/conf.d/ucarp file to hold all the variables and and config options.

Lastly I wrote the /etc/inid.d/ucarp file to start and stop the service.

The vip-up.sh file runs this command

ifconfig eth1:0 7.200.200.3 netmask 255.0.0.0 broadcast 7.255.255.255

The UCARP command is as follows:

ucarp -z -b 1 -k 0 -i eth1:0 -v 1 -p sectretpass -u /etc/ucarp/vip-up.sh -d /etc/ucarp/vip-down.sh -a 7.200.200.3 -s 7.200.200.1

similarly for node 2 the source address is  -s 7.200.200.2

So when I run it on node 1 (my master)

[INFO] Local advertised ethernet address is [00:40:f4xxxxxx]

[WARNING] Switching to state: BACKUP

[WARNING] Spawning [/etc/ucarp/vip-down.sh eth1:0 7.200.200.3]

[WARNING] Switching to state: MASTER

[WARNING] Spawning [/etc/ucarp/vip-up.sh eth1:0 7.200.200.3]

And stays like that. I run ucarp on Node 2 and I get the same messages! Both are comming up as master. When I do an 'ifconfig' on both nodes they both show the eth1:0 interface but there are Zero RX and TX packet counts.

I've tried adding the command 'arping -q -U -I eth1 -s 7.200.200.1 7.200.200.3' in my vip-up.sh scripts but nothing happens.. I do it manually and it doesn't get any replies.

I'm really stumpped here, all I can make out of it is that somehow both ucarp instances can't talk to each other, anyone know how to get this thing to work ? I'd really appreciate any help.

Thanks.

*** EDIT ****

OK I found the problem, apparently v1.4 changed the way it doe the multicast thing or whatever and UCARP would only work when the interface is put into promiscuous mode. There is a patch for 1.4 on kerneltrap.org http://kerneltrap.org/mailarchive/ucarp/2008/1/22/590912  for this. and it works.

----------

