Chinaunix首页 | 论坛 | 博客
  • 博客访问: 241327
  • 博文数量: 36
  • 博客积分: 1495
  • 博客等级: 上尉
  • 技术积分: 412
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 13:34
文章分类

全部博文(36)

文章存档

2016年(1)

2015年(12)

2014年(2)

2012年(4)

2011年(1)

2009年(6)

2008年(10)

我的朋友

分类: LINUX

2008-12-22 11:38:49

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
阅读(1171) | 评论(0) | 转发(0) |
0

上一篇:集群(IPVSADM+HEARTBEAT)

下一篇:双网卡

给主人留下些什么吧!~~