Re: [CentOS] keepalived+LVS
On Wed, 9 Mar 2011 12:44:38 +0800 bedo bedo.w...@gmail.com wrote: oh,god , anybody help me! Do yourself a favour and use HAproxy or something more higher level. I had nothing but bad expirience with lvs for the past few years. -- Jure Pečar http://jure.pecar.org http://f5j.eu ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
thanks Jure Pečar, *but ,i just know how to complete lvs/tun only use keepalived.* *my experiment need a result . * 2011/3/10 Jure Pečar pega...@nerv.eu.org On Wed, 9 Mar 2011 12:44:38 +0800 bedo bedo.w...@gmail.com wrote: oh,god , anybody help me! Do yourself a favour and use HAproxy or something more higher level. I had nothing but bad expirience with lvs for the past few years. -- Jure Pečar http://jure.pecar.org http://f5j.eu ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
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 } 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 st...@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@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] keepalived+LVS
hello, all! if i want to use lvs function of keepalived , i must install ipvsadm ? tks! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
hello, all! if i want to use lvs function of keepalived , i must install ipvsadm ? tks! I haven't used keepalived with lvs in ages, but I believe it works directly with the kernel, and therefore does not strictly require ipvsadm. Please note that ipvsadm is a userspace tool for manipulating/querying ipvs entries and is very useful. I've never used lvs on any machine where I didn't also install ipvsadm. Hope this helps, Barry ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
all! if i want to use lvs function of keepalived , i must install ipvsadm ? tks! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos [steve@mail ~]$ yum provides '*/ipvsadm' Loaded plugins: fastestmirror addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 ipvsadm-1.24-10.x86_64 : Utility to administer the Linux Virtual Server Repo: base Matched from: Filename: /etc/rc.d/init.d/ipvsadm Filename: /sbin/ipvsadm I use keepalived/lvs. Yes, you need to install it. Otherwise, there's no way for you to manage the lvs function? At least, that's what I've been led to believe... Cheers Steve ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
thanks for relay! if i only use ha+lvs configuration of keepalived.the load balance not work. then,i install ipvsadm and setup lvs with tun by ipvsadm ,it's work. command line below: ipvsadm -A -t 172.16.39.100:80 -s rr ipvsadm -a -t 172.16.39.100:80 -r 172.16.39.30:80 -i ipvsadm -a -t 172.16.39.100:80 -r 172.16.39.40:80 -i -lb server (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 } 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 command -- 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 st...@echo.id.au all! if i want to use lvs function of keepalived , i must install ipvsadm ? tks! ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos [steve@mail ~]$ yum provides '*/ipvsadm' Loaded plugins: fastestmirror addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 ipvsadm-1.24-10.x86_64 : Utility to administer the Linux Virtual Server Repo: base Matched from: Filename: /etc/rc.d/init.d/ipvsadm Filename: /sbin/ipvsadm I use keepalived/lvs. Yes, you need to install it. Otherwise, there's no way for you to manage the lvs function? At least, that's what I've been led to believe... Cheers Steve ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
if i only use ha+lvs configuration of keepalived.the load balance not work. then,i install ipvsadm and setup lvs with tun by ipvsadm ,it's work. command line below: ipvsadm -A -t http://172.16.39.100:80 172.16.39.100:80 -s rr ipvsadm -a -t http://172.16.39.100:80 172.16.39.100:80 -r http://172.16.39.30:80 172.16.39.30:80 -i ipvsadm -a -t http://172.16.39.100:80 172.16.39.100:80 -r http://172.16.39.40:80 172.16.39.40:80 -i -lb server (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 } 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 command -- 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 Assuming I understand you correctly, and assuming you have an init.d script in place, run this command: grep daemon /etc/init.d/keepalived 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 ? Steve ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
no,my mean is the keepalived lvs need ipvsadm 2011/3/8 Steve Barnes st...@echo.id.au if i only use ha+lvs configuration of keepalived.the load balance not work. then,i install ipvsadm and setup lvs with tun by ipvsadm ,it's work. command line below: ipvsadm -A -t http://172.16.39.100:80 172.16.39.100:80 -s rr ipvsadm -a -t http://172.16.39.100:80 172.16.39.100:80 -r http://172.16.39.30:80 172.16.39.30:80 -i ipvsadm -a -t http://172.16.39.100:80 172.16.39.100:80 -r http://172.16.39.40:80 172.16.39.40:80 -i -lb server (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 } 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 command -- 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 Assuming I understand you correctly, and assuming you have an init.d script in place, run this command: grep daemon /etc/init.d/keepalived 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 ? Steve ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] keepalived+LVS
no,my mean is the keepalived lvs need ipvsadm Ah right. Sorry, I thought you were having more problems :) Steve ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos