Re: CentOS 7 and keepalived
"Ryan O'Hara" <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Feb 24, 2015 at 06:28:09PM +0100, Pim Rupert (Lemonbit) wrote: > Hi Chris, > > On 24 Feb 2015, at 17:56, Chris Johnson <[email protected]> wrote: > > > Hi Pim. > > > > Thank you for you responding. > > > > Never used arptables. In fact I'm still using the documents I've found for older versions of the kernel. I had this running on CentOS 6.4. If I didn't know about arptables there may well be other CentOS 7 items related to keepalived I don't know about. > > > > I have the VIP on the real servers and the sorry server using ifconfig applied to lo to make an alias, lo:40 in this case. I also have these turned on in /etc/sysctl.conf > > > > net.ipv4.all.arp_announce = 2 > > net.ipv4.all.arp_ignore = 1 > > > > > > And this used to solve the arp problem and get the real server to accept the the VIP. > > > > What are you doing for it? After some hunting I found a reference to iptables which I've always turned off to avoid complications. Simple is often best. One the keepalived directors I have this turned on in /etc/sysctl.conf > > > > net.ipv4.ip_forward = 1 > > > > And that used to deal with the packet rerouting Is there anything different with this? > > > > Is there a URL for any working CentOS 7 specific documentation? > > The RHEL 6 load balancing manual contains extensive documentation > for setting up LVS-DR. The RHEL 7 manual does not contain similar > documentation regarding LVS-DR (layer 4 load balancing), because > they now prefer you use HAproxy (layer 7 load balancing). However, > LVS-DR should still work the same on CentOS 7. There is no preference for haproxy over LVS. Not sure why you think this is the case. The LVS documentation should still be in the load balancer guide. Can you give me a URL where you found this manual missing the LVS documentation? Ryan > I am not aware of the current recommendations regarding the tricks you tried in sysctl (I don't use any of the changes you posted!) and your network setup using an alias on the loopback interface. I have always followed these steps (taken from my internal documentation, based on the RHEL and LVS manuals): > > Setup a virtual IP address on a real server (for use in an LVS-DR setup): > > 1. Install arptables > > # CentOS 6 > yum install arptables_jf > > # CentOS 7 > yum install arptables > > 2. Configure arptables > > # CentOS 6 > arptables -A IN -d <virtual_ip> -j DROP > arptables -A OUT -s <virtual_ip> -j mangle --mangle-ip-s <real_ip> > > # CentOS 7 > arptables -A INPUT -d <virtual_ip> -j DROP > arptables -A OUTPUT -s <virtual_ip> -j mangle --mangle-ip-s <real_ip> > > 3. Save arptables configuration (overwrites any existing configuration) > > # CentOS 6 > service arptables_jf save > > # CentOS 7 > arptables-save > /etc/sysconfig/arptables > > 4. Enable arptables service > > # CentOS 6 > chkconfig arptables_jf on > > # CentOS 7 > systemctl enable arptables.service > > 5. After that you can add the virtual IP address. You need to make the netwerk configuration persistent for reboots. > > ip addr add <virtual_ip>/<cidr> dev <device name e.g. eth0> > > Good luck! > > - Pim > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Keepalived-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/keepalived-devel ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/