LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Gratuitous ARP in Slackware (https://www.linuxquestions.org/questions/slackware-14/gratuitous-arp-in-slackware-538807/)

newvivs 03-19-2007 02:56 PM

Gratuitous ARP in Slackware
 
Hi,
I am running Slackware 10.2(kernel 2.6.16). I send a gratuitous ARP reply using arping command from machine A. I hear the ARP(using Ethereal) on the other machines in the network since the reply is broadcast. But unfortunately the kernel arp table at the other machines is not updated with the MAC address of machine A. Does anybody know if this is a Slackware thing and the kernel does not respond to gratuitous arps?
Any help in this matter will be appreciated.

pdw_hu 03-20-2007 11:47 AM

Taken from: http://www.geocities.com/SiliconVall...twork/arp.html

Gratuitous ARP is used for the following:

1. In a properly configured network, there will not be an ARP reply for a gratuitous ARP request. But if another host in the network is also configured with the same IP address as the source host, then the source host will get an ARP reply. In this way, a host can determine whether another host is also configured with its IP address.
2. When the network interface card in a system is changed, the MAC address to its IP address mapping is changed. In this case, when the host is rebooted, it will send an ARP request packet for its own IP address. As this is a broadcast packet, all the hosts in the network will receive and process this packet. They will update their old mapping in the ARP cache with this new mapping.

There's your answer in 1. :)

newvivs 03-20-2007 12:43 PM

I don't expect a reply since it is gratuitous(hence implied). but the nodes receiving the gratuitous ARP do not update their arp tables with the MAC address of the sending node. In a normal ARP request the node receiving it, not only replies to it but also updates its own ARP table. I was wondering why the kernel would not do the same in case of a gratuitous ARP.

regis_n_bits 03-20-2007 02:41 PM

It may be that the the arp table is only updated for arp requests/replies initiated from that machine, or if an old arp entry already exists. In your case, if machine A tried to ping the other machine, the first messages would be a broadcast arp request asking who has address "a.b.c.d". The other machine would respond with an arp response directly to machine A, and then machine A would add the arp entry to its arp table.

Otherwise, in a large network, a computer would have be constantly adding entries for every computer that rebooted. The only devices that really use the gratuitous arps would be switches, and any computers that might have the same IP address (i.e. a conflicting address).

Try pinging your new computer first from machine A, then change the address on the new computer. Then do a gratuitous arp. I think the arp table on machine A should get updated with the new IP address.

newvivs 03-20-2007 04:31 PM

Thanks for the response. I was hoping to avoid the initial ping and wanted the arp table on all machines to get updated with the MAC address of machine A since A is sending the gratuitous ARPs. But it seems that if there is no existing ARP entry in these machines about A, then they certainly don't add one unless they have initiated an ARP session(sent an ARP request and received a reply) with machine A.


All times are GMT -5. The time now is 03:04 AM.