免费注册 查看新帖 |

Chinaunix

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

keepalived虚IP获得了但是不能访问80端口 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-06 11:49 |显示全部楼层 |倒序浏览
本帖最后由 cnbird 于 2011-04-06 12:02 编辑

从配置
[root@localhost keepalived]# cat keepalived.conf
global_defs {
   router_id HAPROXY
    notification_email {
               yangning100661@123.com
        }
    notification_email_from keepalived@123.com
    smtp_server 127.0.0.1
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 177
    priority 199
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass password
    }
    virtual_ipaddress {
        10.255.248.248
    }
}

virtual_server 10.255.248.248 80 {
    delay_loop 6
    lb_algo wrr
    lb_kind DR
    persistence_timeout 1800
    protocol TCP

    real_server 10.255.248.250 81 {
        weight 1
        TCP_CHECK {
                connect_port 81
                connect_timeout 3
        }
    }
    real_server 10.255.248.251 81 {
        weight 1
        TCP_CHECK {
                connect_port 81
                connect_timeout 3
        }
    }

}

主配置:
[root@localhost log]# cat /etc/keepalived/keepalived.conf
global_defs {
   router_id HAPROXY
    notification_email {
               yangning100661@123.com
        }
    notification_email_from keepalived@123.com
    smtp_server 127.0.0.1
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 177
    priority 200
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass password
    }
    virtual_ipaddress {
        10.255.248.248
    }
}

virtual_server 10.255.248.248 80 {
    delay_loop 6
    lb_algo wrr
    lb_kind DR
    persistence_timeout 1800
    protocol TCP

    real_server 10.255.248.250 81 {
        weight 1
        TCP_CHECK {
                connect_port 81
                connect_timeout 3
        }
    }
    real_server 10.255.248.251 81 {
        weight 1
        TCP_CHECK {
                connect_port 81
                connect_timeout 3
        }
    }

}

现在的问题是连接不到10.255.248.248的80端口
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP