同一网断多套keepalived,vrid冲突问题排查

注意: 同一网段中virtual_router_id的值不能重复,否则会出错,相关错误信息如下。

Keepalived_vrrp[27120]: ip address associated with VRID not present in received packet :
one or more VIP associated with VRID mismatch actual MASTER advert
bogus VRRP packet received on eth1 !!!
receive an invalid ip number count associated with VRID!
VRRP_Instance(xxx) ignoring received advertisment...
问题排查:

通过tcpdump抓包并过滤vrid,可以发现同一个vrid对应的主机,进而判断是否这些主机隶属同一个集群

tcpdump -nn -i any net 224.0.0.0/8

如:

[root@CN-DJI-PLB1 ~]# tcpdump -nn -i any net 10.104.15.0/24 |grep vrid
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
13:50:46.778532 IP 10.104.15.33 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 100, authtype simple, intvl 1s, length 20
13:50:47.778735 IP 10.104.15.61 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 95, authtype simple, intvl 1s, length 20
13:50:47.778748 IP 10.104.15.33 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 100, authtype simple, intvl 1s, length 20
13:50:48.778899 IP 10.104.15.63 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 98, authtype simple, intvl 1s, length 20
13:50:49.779096 IP 10.104.15.61 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 95, authtype simple, intvl 1s, length 20
13:50:50.779518 IP 10.104.15.33 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 100, authtype simple, intvl 1s, length 20
13:50:51.779755 IP 10.104.15.33 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 100, authtype simple, intvl 1s, length 20
13:51:01.783737 IP 10.104.15.61 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 95, authtype simple, intvl 1s, length 20
13:51:02.784253 IP 10.104.15.63 > 224.0.0.18: VRRPv2, Advertisement, vrid 55, prio 98, authtype simple, intvl 1s, length 20

原文地址:https://www.cnblogs.com/miaocbin/p/11769565.html