LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Gratuitous ARP interval etc

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Gratuitous ARP interval etc
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 16 Jun 2004 13:51:22 +0900
Kido-san,

On Wed, Jun 16, 2004 at 12:18:01PM +0900, Shinichi Kido wrote:
> Thank you four your quick reply.
> 
> 
> > Several gratuitous ARP packets are sent so if the first one doesn't make
> > it hopefully the next one will. You can configure both the number of ARP 
> > packets that are sent, and the time between sending them.
> > 
> Can you tell me how to configure the number of ARP packets and interval?
> I had red man page of heartbeat and template of ha.cf, but couldn't find
> this argument. 
> I'm sorry to trouble you  with simple question.

No problem. It is a somewhat obscure configuration file.

You should edit the /etc/ha.d/arp_config file.
In it put the following:

ARP_INTERVAL_MS=200           # milliseconds between ARPs
ARP_REPEAT=5                  # repeat count
ARP_BACKGROUND=yes            # no to run in foreground
ARP_NETMASK=ffffffffffff      # netmask for ARP

If you leave out any of the vaules, or comment them out with a 
#, then the defaults will be used. You can check the defaults
by inspecting IPaddr or IPaddr2. The above are the defaults 
for IPaddr2 at this time.

Note that the ARP_NETMASK is actually never, ever used.
send_arp which sends the ARP packets ignores this.

Also note that becase of a change to send_arp to make it send
ARP requesets as well as replies, the code actually works like this.

for (i = 0; i < ARP_REPEAT; i++) {
        send gratuitous arp request
        mssleep(ARP_INTERVAL_MS/2)
        send gratuitous arp reply
        mssleep(ARP_INTERVAL_MS/2)
}

If you want to configure this on a per managed interface, then
use the file /etc/ha.d/arp_config:VIP. For example /etc/ha.d/arp_config:eth0
If you are going to do this then you should probably specify the
interface explicitly in the haresources file. But you probably
don't need per interface configurations, so don't wory about it.





> 
> 
> > Actually that was my original design. I did that to gaurd against the
> > situation where some half-dead node can respond to ARP. The overhead
> > of sending a gratuitous ARP every second or so is pretty low. But
> > it is probably more trouble than it is worth. Particularly in the
> > situation where the node sending the gratuitous ARP packets
> > malfunctions.
> > 
> 
> Yes, I understand your suggestion that it may cause some trouble with
> half-dead node. I would like to solve the problem to set the heartbeat 
> nodes to broadcast the gratuitous arp more longer when failover occurs.
> 
> 
>  Thank you!
> 
> Kido
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users

-- 
Horms
<Prev in Thread] Current Thread [Next in Thread>