keepalived 出现裂脑现象,但两台主机都能收到彼此的消息

keepalived 出现裂脑现象,但两台主机都能收到彼此的消息

我做了一些调查,发现大多数问题都通过深入研究防火墙和多播修复程序得到解决,但从我下面的粘贴来看,这似乎不是我的问题。我现在有点困惑,不知道这可能是什么。

vBox 中的 Debian 9 主机 1:10.2.0.200 主机 2:10.2.0.201

# tcpdump -i enp0s3 -nn host 10.2.0.201
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s3, link-type EN10MB (Ethernet), capture size 262144 bytes
10:36:29.992454 IP 10.2.0.201 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 100, authtype none, intvl 1s, length 20
10:36:30.993534 IP 10.2.0.201 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 100, authtype none, intvl 1s, length 20
10:36:31.997348 IP 10.2.0.201 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 100, authtype none, intvl 1s, length 20
10:36:32.998802 IP 10.2.0.201 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 100, authtype none, intvl 1s, length 20

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:81:6f:cc brd ff:ff:ff:ff:ff:ff
    inet 10.2.0.200/24 brd 10.2.0.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet 10.2.0.50/32 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe81:6fcc/64 scope link
       valid_lft forever preferred_lft forever



# tcpdump -i enp0s3 -nn 'host 10.2.0.200'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s3, link-type EN10MB (Ethernet), capture size 262144 bytes
10:35:28.892553 IP 10.2.0.200 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 200, authtype none, intvl 1s, length 20
10:35:29.895166 IP 10.2.0.200 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 200, authtype none, intvl 1s, length 20
10:35:30.895924 IP 10.2.0.200 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 200, authtype none, intvl 1s, length 20
10:35:31.898158 IP 10.2.0.200 > 224.0.0.18: VRRPv2, Advertisement, vrid 50, prio 200, authtype none, intvl 1s, length 20

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:2f:ba:89 brd ff:ff:ff:ff:ff:ff
    inet 10.2.0.201/24 brd 10.2.0.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet 10.2.0.50/32 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe2f:ba89/64 scope link
       valid_lft forever preferred_lft forever

答案1

我是个傻瓜。首先,尽管 TCPDUMP 中一切正常,但将其设为单播让我意识到存在 iptables 问题。其次,在复制 iptables 规则来修复它时,请确保更改正确的接口名称,这样你就不会因为自己是个混蛋而把你的沮丧发泄到其他人身上。

相关内容