keepalived 无法ping vip

笑Smile3721 2014-03-14 01:13:42
centos 6.2盛大云
配置如下
! Configuration File for keepalived

global_defs {
notification_email {
#admin@michael-demo.com
}
#notification_email_from admin@michael-demo.com
#smtp_server 127.0.0.1
#smtp_connect_timeout 30
router_id LVS_DEVEL
}

vrrp_instance VI_1 {
state BACKUP #两台配置此处均是BACKUP
interface eth0
virtual_router_id 51
priority 100 #优先级,另一台改为90
advert_int 1
nopreempt #不抢占,只在优先级高的机器上设置即可,优先级低的机器不设置
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress{
172.17.14.210
}
}
virtual_server 172.17.14.210 3306 {
delay_loop 2
lb_algo wrr
lb_kind DR
persistence_timeout 60
protocol TCP
real_server 172.17.14.47 3306 {
weight 3
notify_down /usr/local/mysql/bin/mysql.sh
TCP_CHECK {
connect_timeout 10
nb_get_retry 3
delay_before_retry 3
connect_port 3306
}
}
}

ipvsadm -l如下
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 172.17.14.210:mysql wrr persistent 60
-> 172.17.14.47:mysql Local 3 0 0

ip addr 如下
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:16:3e:01:05:c1 brd ff:ff:ff:ff:ff:ff
inet 172.17.14.47/18 brd 172.17.63.255 scope global eth0
inet6 fe80::216:3eff:fe01:5c1/64 scope link
valid_lft forever preferred_lft forever

tcpdump vrrp 如下
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:40:08.122477 IP 172.17.14.47 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 51, prio 100, authtype simple, intvl 1s, length 16
12:40:09.123645 IP 172.17.14.47 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 51, prio 100, authtype simple, intvl 1s, length 16

但是虚拟ip 172.17.14.210无法ping通

...全文
522 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
笑Smile3721 2014-03-24
  • 打赏
  • 举报
回复
盛大云不支持LVS,好囧,一般的云服务器应该都是mac ip绑定的,不支持VIP。
笑Smile3721 2014-03-14
  • 打赏
  • 举报
回复
在线等,求来人

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧