keepalived configured for unicast but still sending multicast

Alex F <[email protected]> Thu, 19 Dec 2013 12:08:11 +0000
Newsgroups gmane.linux.keepalived.announce
Message-ID <[email protected]>
Hello,

I have installed the latest keepalived 1.2.9 and configured it to send 
advertisements on unicast, but running tcpdump I see it still sends on 
multicast.
I've also used v1.2.8 and the behavior is the same.

Iptables is off, all traffic is permitted.
OS CentOS 6.5 2.6.32-431

./configure output:
Keepalived version       : 1.2.9
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lssl -lcrypto -lcrypt  -lnl
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
IPVS use libnl           : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
SNMP support             : No
SHA1 support             : No
Use Debug flags          : No

/etc/keepalived/keepalived.conf
vrrp_instance VI_1 {
     state MASTER
     interface eth1        #local interface
     virtual_router_id 51
     priority 101
     advert_int 1
         vrrp_unicast_bind 10.21.6.211        #local ip of MASTER
         vrrp_unicast_peer 10.21.6.212        #local ip of BACKUP

     virtual_ipaddress {
         46.11.111.107/23 brd 46.11.111.255 dev eth0        #public ip, 
public interface
     }
}

Furthermore, upon running "keepalived -f /etc/keepalived/keepalived.conf 
-d -n -l":
1. I don't see anything in the conf dump in regard to vrrp_unicast_*
2. It shows it's opening keepalived.conf two times, with two different sizes

Opening file '/etc/keepalived/keepalived.conf'.
Opening file '/etc/keepalived/keepalived.conf'.
Configuration is using : 4745 Bytes
Configuration is using : 59430 Bytes
------< Global definitions >------
  Router ID = -stripped-
  Smtp server connection timeout = 30
  Email notification from = -stripped-
------< VRRP Topology >------
  VRRP Instance = VI_1
    Want State = MASTER
    Runing on device = eth1
    Virtual Router ID = 51
    Priority = 101
    Advert interval = 1sec
    Virtual IP = 1
      46.11.111.107/23 brd 46.11.111.255 dev eth0 scope global
Using LinkWatch kernel netlink reflector...
------< Global definitions >------
  Router ID = -stripped-
  Smtp server connection timeout = 30
  Email notification from = -stripped-
------< SSL definitions >------
  Using autogen SSL context
Using LinkWatch kernel netlink reflector...
VRRP_Instance(VI_1) Transition to MASTER STATE
VRRP_Instance(VI_1) Entering MASTER STATE

tcpdump:
11:26:28.288839 IP (tos 0xc0, ttl 255, id 61, offset 0, flags [none], 
proto VRRP (112), length 40)
     10.21.6.211 > 224.0.0.18: VRRPv2, Advertisement, vrid 51, prio 0, 
authtype none, intvl 1s, length 20, addrs: 46.11.111.107

Running tcpdump on the BACKUP machine shows no traffic incoming from the 
MASTER, hence both of them enter the master state.

ip a:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
state UP qlen 1000
     link/ether 00:16:3e:7f:d5:6e brd ff:ff:ff:ff:ff:ff
     inet 46.11.111.111/23 brd 46.11.111.255 scope global eth0
     inet 46.11.111.107/23 brd 46.11.111.255 scope global secondary eth0
        valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast 
state UP qlen 1000
     link/ether 00:16:3e:9f:66:7e brd ff:ff:ff:ff:ff:ff
     inet 10.21.6.211/24 brd 10.21.6.255 scope global eth1
        valid_lft forever preferred_lft forever


/var/log/messages
Keepalived[14159]: Starting Keepalived v1.2.9 (12/19,2013)
Keepalived[14160]: Starting Healthcheck child process, pid=14162
Keepalived[14160]: Starting VRRP child process, pid=14163
Keepalived_healthcheckers[14162]: Netlink reflector reports IP 
46.11.111.211 added
Keepalived_vrrp[14163]: Netlink reflector reports IP 46.11.111.211 added
Keepalived_healthcheckers[14162]: Netlink reflector reports IP 
10.21.6.211 added
Keepalived_healthcheckers[14162]: Registering Kernel netlink reflector
Keepalived_healthcheckers[14162]: Registering Kernel netlink command channel
Keepalived_healthcheckers[14162]: Opening file 
'/etc/keepalived/keepalived.conf'.
Keepalived_vrrp[14163]: Netlink reflector reports IP 10.21.6.211 added
Keepalived_vrrp[14163]: Registering Kernel netlink reflector
Keepalived_vrrp[14163]: Registering Kernel netlink command channel
Keepalived_vrrp[14163]: Registering gratuitous ARP shared channel
Keepalived_vrrp[14163]: Opening file '/etc/keepalived/keepalived.conf'.
Keepalived_healthcheckers[14162]: Configuration is using : 4745 Bytes
Keepalived_vrrp[14163]: Configuration is using : 59430 Bytes
Keepalived_vrrp[14163]: Using LinkWatch kernel netlink reflector...
Keepalived_vrrp[14163]: VRRP sockpool: [ifindex(3), proto(112), 
unicast(0), fd(10,11)]
Keepalived_healthcheckers[14162]: Using LinkWatch kernel netlink 
reflector...
Keepalived_vrrp[14163]: VRRP_Instance(VI_1) Transition to MASTER STATE
Keepalived_vrrp[14163]: VRRP_Instance(VI_1) Entering MASTER STATE
Keepalived_vrrp[14163]: VRRP_Instance(VI_1) setting protocol VIPs.
Keepalived_vrrp[14163]: VRRP_Instance(VI_1) Sending gratuitous ARPs on 
eth0 for 46.11.111.207
Keepalived_healthcheckers[14162]: Netlink reflector reports IP 
46.11.111.207 added
Keepalived_vrrp[14163]: VRRP_Instance(VI_1) Sending gratuitous ARPs on 
eth0 for 46.11.111.207

When I start keepalived on the BACKUP machine, it also sends gratuitous 
ARP and it takes over the IP. Keeping a ping running on 46.11.111.207, 
while the switch happens, shows no packet loss - traffic is being 
redirected correctly, just that the -failover- process doesn't work.
How could I test that unicast is working?

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk