no,my mean is the keepalived lvs need ipvsadm<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">> 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>
> command line below:<br>
</div>> ipvsadm -A -t <a href="http://172.16.39.100:80" target="_blank">http://172.16.39.100:80</a> <a href="http://172.16.39.100:80" target="_blank">172.16.39.100:80</a><br>
> -s rr<br>
> ipvsadm -a -t <a href="http://172.16.39.100:80" target="_blank">http://172.16.39.100:80</a> <a href="http://172.16.39.100:80" target="_blank">172.16.39.100:80</a><br>
> -r <a href="http://172.16.39.30:80" target="_blank">http://172.16.39.30:80</a> <a href="http://172.16.39.30:80" target="_blank">172.16.39.30:80</a><br>
> -i<br>
> ipvsadm -a -t <a href="http://172.16.39.100:80" target="_blank">http://172.16.39.100:80</a> <a href="http://172.16.39.100:80" target="_blank">172.16.39.100:80</a><br>
> -r <a href="http://172.16.39.40:80" target="_blank">http://172.16.39.40:80</a> <a href="http://172.16.39.40:80" target="_blank">172.16.39.40:80</a><br>
<div><div></div><div class="h5">> -i<br>
> -------------------------------------------------------------lb server (master) keepalived.conf--------------------------------------------<br>
> global_defs {<br>
> router_id LVS_DEVEL_M<br>
> }<br>
> vrrp_instance websev {<br>
> state MASTER<br>
> interface eth0<br>
> virtual_router_id 51<br>
> priority 100 <br>
> advert_int 1 <br>
> authentication {<br>
> auth_type PASS<br>
> auth_pass 1111<br>
> }<br>
> virtual_ipaddress {<br>
> 172.16.39.100<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>
> 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>
</div></div>Assuming I understand you correctly, and assuming you have an init.d script in place, run this command:<br>
<br>
grep daemon /etc/init.d/keepalived<br>
<br>
Odds are, you're editing /usr/local/etc/keepalived.conf, but the init.d script starts keepalived and tells it to use /etc/keepalived.conf<br>
<div><div></div><div class="h5"><br>
?<br>
<br>
Steve<br>
<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>