网络拓扑如图:
SW1交换机下面的服务器和SW2交换下面的服务器使用单播也出现脑裂,备收不到主发送的VRRP
主配置:
global_defs {
notification_email {
}
notification_email_from Keepalived@localhost
smtp_connect_timeout 30
router_id 10.0.0.43
script_user root
enable_script_security
#vrrp_strict
}
vrrp_script chk_mysql {
script "/etc/keepalived/chk_mysql.sh"
interval 2
weight -5
fall 2
rise 1
}
vrrp_instance pshDB {
state MASTER
interface bond0
virtual_router_id 61
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 654321
}
unicast_src_ip 10.0.0.43
unicast_peer {
10.0.0.63
}
virtual_ipaddress {
10.0.0.157
}
track_script {
chk_mysql
}
}
备机:
global_defs {
notification_email {
}
notification_email_from Keepalived@localhost
smtp_connect_timeout 30
router_id 10.0.0.63
script_user root
enable_script_security
#vrrp_strict
}
vrrp_script chk_mysql {
script "/etc/keepalived/chk_mysql.sh"
interval 2
weight -5
fall 2
rise 1
}
vrrp_instance pshDB {
state BACKUP
interface eth0
virtual_router_id 61
priority 99
advert_int 1
authentication {
auth_type PASS
auth_pass 654321
}
unicast_src_ip 10.0.0.63
unicast_peer {
10.0.0.43
}
virtual_ipaddress {
10.0.0.157
}
track_script {
chk_mysql
}
}
主机抓包:
备机抓包:
备机日志: