keepalived VIP 在两台机器上都存在的问题

配置文件分别如下:

第一台:
global_defs {
router_id lvs_1
}

#vrrp_sync_group VGM {
# group {
# web
# }
#}
#vrrp_sync_group VGB {
# group {
# db
# }
#}

vrrp_instance web{
# state MASTER
interface eth1
lvs_sync_daemon_inteface eth1
virtual_router_id 51
priority 200
advert_int 3
authentication {
auth_type PASS
auth_pass weblvs
}
virtual_ipaddress {
# 192.168.10.200/24 dev eth1 label eth1:1
# 192.168.10.201/24 dev eth1 label eth1:2
192.168.10.200
192.168.10.201
}
}
vrrp_instance db{
# state BACKUP
interface eth2
lvs_sync_daemon_inteface eth2
virtual_router_id 52
priority 100
advert_int 3
authentication {
auth_type PASS
auth_pass dblvs
}
virtual_ipaddress {
# 172.16.0.200/24 dev eth2 label eth2:1
# 172.16.0.201/24 dev eth2 label eth2:2
172.16.0.200
172.16.0.201
}
}
# setting port 80 forward

virtual_server_group web {
192.168.10.200 80
192.168.10.201 80
}

virtual_server_group db {
172.16.0.200 3306
172.16.0.201 3306
}

virtual_server web {
delay_loop 6
lb_algo wlc
lb_kind NAT
persistence_timeout 180
protocol TCP

real_server 10.0.0.222 80 {
weight 150
HTTP_GET {
url {
path http://10.0.0.222
status_code 200
}

connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 10.0.0.223 80 {
weight 150
HTTP_GET {
url {
path http://10.0.0.223
status_code 200
}

connect_timeout 5
nb_get_retry 2
delay_before_retry 1
}
}
}
virtual_server db {
delay_loop 6
lb_algo wlc
lb_kind NAT
persistence_timeout 10
protocol TCP

real_server 10.0.0.224 3306 {
weight 1
TCP_CHECK {
connect_timeout 5
nb_get_retry 2
delay_before_retry 1
connect_port 3306
}
}

real_server 10.0.0.225 3306 {
weight 1
TCP_CHECK {

connect_timeout 5
nb_get_retry 2
delay_before_retry 1
connect_port 3306
}
}
}

第二台:
global_defs {
router_id lvs_2
}

#vrrp_sync_group VGM {
# group {
# web
# }
#}
#vrrp_sync_group VGB {
# group {
# db
# }
#}

vrrp_instance web{
# state BACKUP
interface eth1
lvs_sync_daemon_inteface eth1
virtual_router_id 51
priority 100
advert_int 3
authentication {
auth_type PASS
auth_pass weblvs
}
virtual_ipaddress {
# 192.168.10.200/24 dev eth1 label eth1:1
# 192.168.10.201/24 dev eth1 label eth1:2
192.168.10.200
192.168.10.201
}
}
vrrp_instance db{
# state MASTER
interface eth2
lvs_sync_daemon_inteface eth2
virtual_router_id 52
priority 200
advert_int 3
authentication {
auth_type PASS
auth_pass dblvs
}
virtual_ipaddress {
# 172.16.0.200/24 dev eth2 label eth2:1
# 172.16.0.201/24 dev eth2 label eth2:2
172.16.0.200
172.16.0.201
}
}
# setting port 80 forward

virtual_server_group web {
192.168.10.200 80
192.168.10.201 80
}

virtual_server_group db {
172.16.0.200 3306
172.16.0.201 3306
}

virtual_server web {
delay_loop 6
lb_algo wlc
lb_kind NAT
persistence_timeout 180
protocol TCP

real_server 10.0.0.222 80 {
weight 150
HTTP_GET {
url {
path http://10.0.0.222
status_code 200
}

connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
}
real_server 10.0.0.223 80 {
weight 150
HTTP_GET {
url {
path http://10.0.0.223
status_code 200
}

connect_timeout 5
nb_get_retry 2
delay_before_retry 1
}
}
}
virtual_server db {
delay_loop 6
lb_algo wlc
lb_kind NAT
persistence_timeout 10
protocol TCP

real_server 10.0.0.224 3306 {
weight 1
TCP_CHECK {
connect_timeout 5
nb_get_retry 2
delay_before_retry 1
connect_port 3306
}
}

real_server 10.0.0.225 3306 {
weight 1
TCP_CHECK {

connect_timeout 5
nb_get_retry 2
delay_before_retry 1
connect_port 3306
}
}
}
现在的问题是VIP在两台机器上都存在,求解。

Forums:

echo "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore192.168.1.1

Is that really all there is to it because that'd be fltbgerbasaing.

No colipamnts on this end, simply a good piece.

I thgohut finding this would be so arduous but it's a breeze!

Artcelis like this make life so much simpler.

blue pill cealis variety sexually active buy viagra overcome various physical love cialis blood necessary insurance quotes auto most street overnight auto insurance Mountain View insurance