今天在做keepalived实验时,日志报如下错误,

 

Jun 20 14:25:43 localhost Keepalived_vrrp: receive an invalid ip number count associated with VRID!

Jun 20 14:25:43 localhost Keepalived_vrrp: bogus VRRP packet received on eth0 !!!

Jun 20 14:25:43 localhost Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment...

Jun 20 14:25:44 localhost Keepalived_vrrp: receive an invalid ip number count associated with VRID!

Jun 20 14:25:44 localhost Keepalived_vrrp: bogus VRRP packet received on eth0 !!!

Jun 20 14:25:44 localhost Keepalived_vrrp: VRRP_Instance(VI_1) ignoring received advertisment...

Jun 20 14:25:45 localhost Keepalived_vrrp: receive an invalid ip number count associated with VRID!

Jun 20 14:25:45 localhost Keepalived_vrrp: bogus VRRP packet received on eth0 !!!

google了半天,都说改变配置文件/etc/keepalived/keepalived.conf 中virtual_route_id的值,但是我改后问题依旧;

忽然发现主从配置中有一点不一样的地方,

主的为:

        virtual_ipaddress {

        192.168.8.254/24 dev eth0

        192.168.9.254/24 dev eth0

        192.168.7.254/24 dev eth0

        192.168.6.254/24 dev eth0

        192.168.5.254/24 dev eth0

        192.168.4.254/24 dev eth0

        192.168.2.254/24 dev eth0

        192.168.1.254/24 dev eth0

        192.168.10.254/24 dev eth0

        192.168.100.254/24 dev eth0

        192.168.16.254/24 dev eth0

        192.168.33.254/24 dev eth0

        192.168.38.254/24 dev eth0

        192.168.39.254/24 dev eth0

    }

而从的为:

        virtual_ipaddress {

        192.168.8.219/24 dev eth0

        192.168.8.254/24 dev eth0

        192.168.9.254/24 dev eth0

        192.168.7.254/24 dev eth0

        192.168.6.254/24 dev eth0

        192.168.5.254/24 dev eth0

        192.168.4.254/24 dev eth0

        192.168.2.254/24 dev eth0

        192.168.1.254/24 dev eth0

        192.168.10.254/24 dev eth0

        192.168.100.254/24 dev eth0

        192.168.16.254/24 dev eth0

        192.168.33.254/24 dev eth0

        192.168.38.254/24 dev eth0

        192.168.39.254/24 dev eth0

    }

从多了一个地址,去掉地址后,一切ok!