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在两台机器上都存在,求解。
Anonymous (没有被验证)
周一, 2012-08-20 13:10
Permalink
echo "0"
echo "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore192.168.1.1
Anonymous (没有被验证)
周二, 2014-03-04 07:19
Permalink
TAxfWTcdFWeCggwogBnb
Is that really all there is to it because that'd be fltbgerbasaing.
Anonymous (没有被验证)
周二, 2014-03-04 20:02
Permalink
rooOZSebjZs
No colipamnts on this end, simply a good piece.
Anonymous (没有被验证)
周五, 2014-12-19 15:53
Permalink
scryKMJpFwkcnutfRzgK
I thgohut finding this would be so arduous but it's a breeze!
Anonymous (没有被验证)
周二, 2014-12-23 15:12
Permalink
kSUKaiikWuhFE
Artcelis like this make life so much simpler.
Anonymous (没有被验证)
周四, 2014-12-25 05:24
Permalink
NSrkXDrTUuEQMttAzENR
compare life insurance rates
Anonymous (没有被验证)
周六, 2014-12-27 14:19
Permalink
trvpBLeXYwPYRkU
cialis on-line
Anonymous (没有被验证)
周五, 2015-01-16 01:43
Permalink
ApiljpahkAxMvTk
cheapest viagra for sail
Anonymous (没有被验证)
周四, 2015-03-05 11:59
Permalink
FyzsWexBZtsnbVtaqCYk
cialis car insurance quote cialis online car insurance buy viagra
Anonymous (没有被验证)
周三, 2015-04-15 12:03
Permalink
hnoYmwIywARjBL
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
Anonymous (没有被验证)
周三, 2015-05-20 18:52
Permalink
vfMbpuzoDCPxchYDgLC
buy colchicine online without prescription cheap imigran amoxicillin cheap acyclovir buy fluoxetine online cheap doxycycline
Anonymous (没有被验证)
周六, 2014-03-22 03:44
Permalink
qqzwMSFjrXwXseeS
free michigan car insurance quote buy Cipro mail viagara buy Acyclovir best online colleges
Anonymous (没有被验证)
周四, 2014-04-24 07:48
Permalink
tRBFrQblGo
insurance auto auctions mobile where can i buy cialis cialis viagra levitra compare life insurance companies rates
Anonymous (没有被验证)
周三, 2014-05-28 12:45
Permalink
bhYpYeGWyIzFDacCTwF
cheapdiscountcialis.com write an essay grneric viagra help with homework 4th grade homework help
Anonymous (没有被验证)
周日, 2014-10-12 01:57
Permalink
bxKmPyyJMU
classes done nation pay saturday time every
Anonymous (没有被验证)
周二, 2014-10-28 12:29
Permalink
MBYHxWJsYmdivVfNj
auto insurance cheap car insurance just affordable car insurance individual health insurance buying
Anonymous (没有被验证)
周二, 2014-11-04 03:26
Permalink
CLxzeLADDtMk
a auto insurance and impotence insurance car florida online pharmacy accutane
Anonymous (没有被验证)
周二, 2014-11-04 03:26
Permalink
CLxzeLADDtMk
a auto insurance and impotence insurance car florida online pharmacy accutane