免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3150 | 回复: 0
打印 上一主题 下一主题

高可用性keepalived全部采用外网IP的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-02-18 17:08 |只看该作者 |倒序浏览
我的2台服务器各自有一个外网IP,然后我通过keepalived虚拟出另一个外网IP,keepalived的服务可以正常启动,当vip在master上的时候,我在backup上ping那个vip(外网IP),很不稳定(一般是keepalived刚刚启动的时候可以ping通,之后就不能ping通,然后过个半个小时又可以ping通,再过10秒左右,又不能ping通了,很诡异)

配置文件如下:
keepalived.conf

! Configuration File for keepalived
global_defs {
   notification_email {
     
acassen@firewall.loc
     
failover@firewall.loc
     
sysadmin@firewall.loc
   }
   notification_email_from
   Alexandre.Cassen@firewall.loc
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}
vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 17
    priority 180
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        外网ip1/27 dev eth0
    }
}
virtual_server  外网ip1 80 {
    delay_loop 6
    lb_algo wrr
    lb_kind DR
    persistence_timeout 60
    protocol TCP
    real_server 外网ip2 80 {
        weight 3
        TCP_CHECK {
        connect_timeout 10
        nb_get_retry 3
        delay_before_retry 3
        connect_port 80
        }
     }
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP