LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] keepalived+lvs

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] keepalived+lvs
From: bedo <bedo.wang@xxxxxxxxx>
Date: Tue, 8 Mar 2011 20:52:13 +0800
i have installed the keepalived.below:
./configure && make && make install
------------------------------------------------------------
vip : 172.16.39.100
keepalived lvs lb(master) 172.16.39.10
keepalived lvs lb(backup) 172.16.39.20
real server1 172.16.39.30
real server2 172.16.39.40
--------------------------------------------------------------
keepalived.conf of lb master server

global_defs {
    router_id LVS_DEVEL_M
}

vrrp_instance websev {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1

    authentication {
        auth_type PASS
        auth_pass 1111
    }

    virtual_ipaddress {
        172.16.39.100
    }
}

virtual_server 172.16.39.100 80 {
    delay_loop 6
    lb_algo rr
    lb_kind TUN
    persistence_timeout 10
    protocol TCP

    real_server 172.16.39.30 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }
    real_server 172.16.39.40 80 {
        weight 1
        TCP_CHECK {
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }
}

then , i start the keepalived daemon
----------------------------------------------------------------
real server 1 command line below:

ifconfig tunl0 172.16.39.100 netmask 255.255.255.0 up
route add -host 172.16.39.100 dev tunl0
echo "1" >/proc/sys/net/ipv4/conf/tunl0/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/tunl0/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
sysctl -p
---------------------------------------------------------------
but , the lvs (load balance) doesn't work



2011/3/8 Graeme Fowler <graeme@xxxxxxxxxxx>

> On Tue, 2011-03-08 at 09:05 +0800, bedo wrote:
> > if I want to use the lvs function of keepalived.
> > i must install ipvsadm?
>
> No, you don't. However you won't be able to monitor your LVS very easily
> if you don't install it.
>
> Graeme
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>