标签:dhcp vrrp keepalived
一 故障描述
我在台湾合作方给定的两台虚拟机上部署HAProxy+Keepalived负载均衡高可用方案。在配置完Keepalived后,重新启动Keepalived,Keepalived没有绑定VIP。
keepalived.conf的内容
LB1 Master
! Configuration File for keepalived global_defs { notification_email { admin@example.com } notification_email_from lb1@example.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LB1_MASTER } vrrp_script chk_haproxy { script "killall -0 haproxy" interval 2 weight 2 } vrrp_instance VI_1 { state MASTER interface eth1 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 10.1.1.200/24 brd 10.1.1.255 dev eth1 label eth1:vip } track_script { chk_haproxy } }
重新启动Keepalived查看日志
Mar 3 18:09:00 cv00300005248-1 Keepalived[20138]: Stopping Keepalived v1.2.15 (02/28,2015) Mar 3 18:09:00 cv00300005248-1 Keepalived[20259]: Starting Keepalived v1.2.15 (02/28,2015) Mar 3 18:09:00 cv00300005248-1 Keepalived[20260]: Starting Healthcheck child process, pid=20261 Mar 3 18:09:00 cv00300005248-1 Keepalived[20260]: Starting VRRP child process, pid=20262 Mar 3 18:09:00 cv00300005248-1 Keepalived_vrrp[20262]: Registering Kernel netlink reflector Mar 3 18:09:00 cv00300005248-1 Keepalived_vrrp[20262]: Registering Kernel netlink command channel Mar 3 18:09:00 cv00300005248-1 Keepalived_vrrp[20262]: Registering gratuitous ARP shared channel Mar 3 18:09:00 cv00300005248-1 Keepalived_healthcheckers[20261]: Registering Kernel netlink reflector Mar 3 18:09:00 cv00300005248-1 Keepalived_healthcheckers[20261]: Registering Kernel netlink command channel Mar 3 18:09:00 cv00300005248-1 Keepalived_healthcheckers[20261]: Configuration is using : 3924 Bytes Mar 3 18:09:00 cv00300005248-1 Keepalived_healthcheckers[20261]: Using LinkWatch kernel netlink reflector... Mar 3 18:09:00 cv00300005248-1 Keepalived_vrrp[20262]: Configuration is using : 55712 Bytes Mar 3 18:09:00 cv00300005248-1 Keepalived_vrrp[20262]: Using LinkWatch kernel netlink reflector... Mar 3 18:09:18 cv00300005248-1 kernel: __ratelimit: 1964 callbacks suppressed Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow. Mar 3 18:09:18 cv00300005248-1 kernel: Neighbour table overflow.
查看VIP绑定情况
$ ifconfig eth1:ha eth1:ha Link encap:Ethernet HWaddr 00:16:3E:F2:37:6B UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:13
没有VIP绑定
二 排查过程
1)检查VIP的配置情况
向合作方确认提供的VIP的详细情况
IPADDR 10.1.1.200
NETMASK 255.255.255.0
GATEWAY 10.1.1.1
Brodcast 10.1.1.255
参考文档:
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1616940
标签:dhcp vrrp keepalived
原文地址:http://john88wang.blog.51cto.com/2165294/1616940