[CentOS] keepalived+LVS

Wed Mar 9 04:44:38 UTC 2011
bedo <bedo.wang at gmail.com>

oh,god , anybody help me!
recently , i try build lvs/tun of keepalived . but i am failure.
-------------------------------------------------------------------------------------
vip 172.16.39.100
lb1 master 172.16.39.10
lb2 backup 172.16.39.20
real server1 172.16.39.30
real server2 172.16.39.40

------master keepalived.conf----------------------------------------
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
        }
    }
}

---------------------------------------------------------------------
real server 1:

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


2011/3/8 Steve Barnes <steve at echo.id.au>

> > no,my mean is the keepalived lvs need ipvsadm
>
> Ah right. Sorry, I thought you were having more problems :)
>
> Steve
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20110309/71d1f32c/attachment-0005.html>