小编Fra*_*ong的帖子

恢复后keepalived master无法回收虚拟IP

脚步

  1. 启动主从
  2. 继续ping虚拟IP(即192.168.10.100
  3. 关机主机
  4. 从机进入 MASTER 状态
  5. 重启主
  6. Slave 进入 BACKUP 状态 Master 进入 MASTER 状态

在第 6 步之后 Ping 不起作用。没有服务器获得虚拟 ip。(我检查过ip addr show eth1

直到我重新启动keepalived服务,Master才能取回虚拟IP。

如何让master在不重启服务的情况下获得虚拟ip?

保活配置:

主机 1(主)

vrrp_instance VI_1 {
    state MASTER
    interface eth1
    virtual_router_id 51
    priority 101
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass secret
    }
    virtual_ipaddress {
        192.168.10.100
    }
}
Run Code Online (Sandbox Code Playgroud)

主机 2(从机)

vrrp_instance VI_1 {
    state BACKUP
    interface eth1
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass secret …
Run Code Online (Sandbox Code Playgroud)

keepalived

6
推荐指数
1
解决办法
2229
查看次数

标签 统计

keepalived ×1