thanks for relay!<br>if i only use  ha+lvs configuration of keepalived.the  load balance not work.<br>then,i install ipvsadm and setup lvs with tun by ipvsadm ,it's work.<br><br>command line below:<br>ipvsadm -A -t <a href="http://172.16.39.100:80">172.16.39.100:80</a> -s rr<br>

ipvsadm -a -t <a href="http://172.16.39.100:80">172.16.39.100:80</a> -r <a href="http://172.16.39.30:80">172.16.39.30:80</a> -i<br>ipvsadm -a -t <a href="http://172.16.39.100:80">172.16.39.100:80</a> -r <a href="http://172.16.39.40:80">172.16.39.40:80</a> -i<br>

<br><br>-------------------------------------------------------------lb server (master) keepalived.conf--------------------------------------------<br>global_defs {<br>    router_id LVS_DEVEL_M<br>}<br><br>vrrp_instance websev {<br>

    state MASTER<br>    interface eth0<br>    virtual_router_id 51 <br>    priority 100         <br>    advert_int 1         <br><br>    authentication {<br>        auth_type PASS<br>        auth_pass 1111<br>    }<br><br>

    virtual_ipaddress {<br>        172.16.39.100<br>    }<br>}<br><br>virtual_server 172.16.39.100 80 {<br>    delay_loop 6<br>    lb_algo rr<br>    lb_kind TUN<br>    persistence_timeout 10<br>    protocol TCP<br><br>    real_server 172.16.39.30 80 {<br>

        weight 1<br>        TCP_CHECK {<br>            connect_timeout 3<br>            nb_get_retry 3<br>            delay_before_retry 3<br>        }<br>    }<br>    real_server 172.16.39.40 80 {<br>        weight 1<br>

        TCP_CHECK {<br>            connect_timeout 3<br>            nb_get_retry 3<br>            delay_before_retry 3<br>        }<br>    }<br>}<br>---------------------------------------------------------------real server 1 command ------------------------------------------------------------------<br>

   ifconfig tunl0 172.16.39.100 netmask 255.255.255.0 up<br>   route add -host 172.16.39.100 dev tunl0<br>   echo "1" >/proc/sys/net/ipv4/conf/tunl0/arp_ignore<br>   echo "2" >/proc/sys/net/ipv4/conf/tunl0/arp_announce<br>

   echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore<br>   echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce<br>   sysctl -p<br>--------------------------------------------------------------------------------------------------------------------------------------------------<br>

<br><br><div class="gmail_quote">2011/3/8 Steve Barnes <span dir="ltr"><<a href="mailto:steve@echo.id.au">steve@echo.id.au</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">>   all!<br>
> if i want to use lvs function of keepalived , i must install ipvsadm ?<br>
> tks!<br>
</div><div class="im">> _______________________________________________<br>
> CentOS mailing list<br>
> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
><br>
<br>
</div>[steve@mail ~]$ yum provides '*/ipvsadm'<br>
Loaded plugins: fastestmirror<br>
addons                                                                                                                                                                                  |  951 B<br>
00:00<br>
base                                                                                                                                                                                    | 2.1 kB<br>
00:00<br>
extras                                                                                                                                                                                  | 2.1 kB<br>
00:00<br>
updates                                                                                                                                                                                 | 1.9 kB<br>
00:00<br>
ipvsadm-1.24-10.x86_64 : Utility to administer the Linux Virtual Server<br>
Repo        : base<br>
Matched from:<br>
Filename    : /etc/rc.d/init.d/ipvsadm<br>
Filename    : /sbin/ipvsadm<br>
<br>
I use keepalived/lvs. Yes, you need to install it. Otherwise, there's no way for you to manage the lvs function?<br>
<br>
At least, that's what I've been led to believe...<br>
<br>
Cheers<br>
<font color="#888888"><br>
Steve<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br>