<br clear="all">
<div></div>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Many thanks, from some reasons I managed to install it only on 32 bit. </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">But this is not an issue.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">I created the following setup.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">the two hosts are running on actual ips 172.16.4.195 and 172.16.4.191 respectively.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">The shared ip to be used by the two servers is 172.16.4.242. </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">this ip is available in the LAN that im running the ucarp.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">I also created the two network scripts to support the vip </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">in /etc/sysconfig/network-scripts/</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">I simply copy the existing ifcfg-eth0 to ifcfg-eth0:1 as follow:</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[root@ilhaisuv01195 network-scripts]# cat ifcfg-eth0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">DEVICE=eth0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">BOOTPROTO=static</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">BROADCAST=172.16.7.255</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">HWADDR=86:EE:0E:6A:F6:92</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">IPADDR=172.16.4.195</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">NETMASK=255.255.252.0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">NETWORK=172.16.4.0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">ONBOOT=yes</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[root@ilhaisuv01195 network-scripts]# cat ifcfg-eth0:1</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">DEVICE=eth0:1</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">BOOTPROTO=static</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">BROADCAST=172.16.7.255</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">HWADDR=86:EE:0E:6A:F6:92</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">IPADDR=172.16.4.242</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">NETMASK=255.255.252.0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">NETWORK=172.16.4.0</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">ONBOOT=no</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">I also tried to executed: </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">/sbin/ifconfig eth0:2 172.16.4.242 netmask 255.255.255.0 on and </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">/sbin/ifconfig eth0:2 172.16.4.242 netmask 255.255.255.0 down </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">The 242 ip was successfully allocated and reallocated.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">This two command lines were script as required in the readme to</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"><span style="mso-spacerun: yes"> </span>/etc/vip-up.sh and /etc/vip-down.sh</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[root@ilhaisuv01195 network-scripts]# cat /etc/vip-up.sh </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">#! /bin/sh</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">/sbin/ifconfig eth0:2 172.16.4.242 netmask 255.255.255.0 on</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[root@ilhaisuv01195 network-scripts]# cat /etc/vip-down.sh </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">#! /bin/sh</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">/sbin/ifconfig eth0:2 172.16.4.242 netmask 255.255.255.0 down</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Whe I executing the command:</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[root@ilhaisuv01195 network-scripts]# /usr/local/sbin/ucarp --interface=eth0:1 --srcip=172.16.4.195 --addr=172.16.4.242</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">The following error is generated:</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">[ERROR] You must supply a valid virtual host id</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Can you please advise what seems to be the problem?</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">yahav</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">________________________________________</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">From: Alex Shnitman [mailto:<a href="mailto:alexta69@yahoo.com">alexta69@yahoo.com</a>] </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Sent: Wednesday, June 17, 2009 12:43 PM</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">To: Biran, Yahav (Yahav); <a href="mailto:linux-il@cs.huji.ac.il">linux-il@cs.huji.ac.il</a></font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Subject: Re: High availability virtual ip</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Hi,</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Linux-HA is one solution, as has been suggested; another, much easier to set up, is UCARP -- <a href="http://www.ucarp.org/">http://www.ucarp.org/</a>. It handles your virtual IP and the ARP caching issues associated with it (by means of a GARP packet). I had a good experience with it.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">--Alex</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">________________________________________</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">From: "Biran, Yahav (Yahav)" <<a href="mailto:yahav.biran@gmail.com">yahav.biran@gmail.com</a>></font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">To: <a href="mailto:linux-il@cs.huji.ac.il">linux-il@cs.huji.ac.il</a></font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Sent: Tuesday, June 16, 2009 6:58:02 PM</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">Subject: High availability virtual ip</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">i have two linux machines, that are running on the same LAN.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">i would like to find a way to set HA IP.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">i was thinking on creating virtual ip that will ride on the exiting eth. lets say 10.0.0.1 and 10.0.0.2 and the VIP will be 172.16.4.1</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">both will run an infinite loop of:while (ping 172.16.4.1) do ...</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">once that the while is exiting in one of the hosts it will try to acquire the VIP. </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">there is additional lock mechanism to implement so the two servers will not try to acquire the same VIP concurrently.</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">i would like to know if there is any out of the box sofware that can do this task?</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New">yahav</font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0in 0in 0pt; unicode-bidi: embed; DIRECTION: ltr" dir="ltr" class="MsoPlainText"><font face="Courier New"> </font></p>