service = lvs
primary = 192.168.1.47
backup_active = 1
backup = 192.168.1.48
heartbeat = 1
heartbeat_port = 539
keepalive = 10
deadtime = 12
debug_level = NONE
rsh_command = ssh
network = direct
virtual balance8080 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 8080
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance6060 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 6060
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance7070 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 7070
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance13228 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 13228
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance13229 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 13229
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance13230 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 13230
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance13240 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 13240
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance13241 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 13241
#persistent = 1800
pmask = 255.255.255.255
#send = "GET /iwl/.lvs.html\n"
#expect = "OK"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance80 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 80
#persistent = 1800
pmask = 255.255.255.255
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
virtual balance80 {
active = 1
address = 192.168.1.50 eth1
#vip_nmask = 255.255.255.192
port = 80
#persistent = 1800
pmask = 255.255.255.255
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server balance1 {
address = 192.168.1.49
active = 1
weight = 3
}
server balance2 {
address = 192.168.1.37
active = 1
weight = 2
}
}
客户端
net.ipv4.conf.lo.arp_ignore = 1
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
[root@balance-2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-lo:0
DEVICE=lo:0
IPADDR=192.168.1.50
NETMASK=255.255.255.255
ONBOOT=yes
NAME=loopback
阅读(1211) | 评论(0) | 转发(0) |