Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

my keepalived configuration is not working correctly.

I have two virtual testing machines (virtualbox) to try some things out with keepalived/vrrp. Bot can ping each other flawlessly (internal virtualbox network).

VM 1 (MASTER):

eth0: Management
eth1: 192.168.2.1/24
eth2: 192.168.2.2/24

keepalived.conf:

vrrp_instance test {
state MASTER
interface eth1
track_interface {
        eth2
}
virtual_router_id 1
priority 101
advert_int 1
authentication {
        auth_type PASS
        auth_pass 1111
}
virtual_ipaddress {
        192.168.3.1/24 dev eth1
        192.168.3.2/24 dev eth2
}
}

tcpdump on eth1:

12:44:54.720119 IP 192.168.2.1 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24
12:44:55.049465 IP 192.168.2.3 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24

tcpdump on eth2:

12:46:21.082264 IP 192.168.2.1 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24
12:46:21.494239 IP 192.168.2.3 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24

VM 2 (BACKUP):

eth0: Management
eth1: 192.168.2.3/24
eth2: 192.168.2.4/24

keepalived.conf:

vrrp_instance test {
state BACKUP
interface eth1
track_interface {
        eth2
}
virtual_router_id 1
priority 100
advert_int 1
authentication {
        auth_type PASS
        auth_pass 1111
}
virtual_ipaddress {
        192.168.3.1/24 dev eth1
        192.168.3.2/24 dev eth2
}
}

tcpdump on eth1:

12:53:12.265456 IP 192.168.2.1 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24
12:53:12.670635 IP 192.168.2.3 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24

tcpdump on eth2:

12:53:34.397374 IP 192.168.2.1 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24
12:53:34.787327 IP 192.168.2.3 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24

After starting keepalived on VM 2, it transits instantly to the master state, which shouldnt be.

Why is this happening?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.