Skip to contentSkip to conversation

Does arping update arp table?

DISCUSSION Murali Karicheri 2 participants 3 messages Jan 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Experts,

The ARP code (net/ipv4/arp.c) seems to treat arp response resulting from a arping as an unsolicited response and doesn't update the arp table. This get updated if the per interface accept sys ctrl is enabled. This command seems to have been updating the arp table in older kernel. For example on a Ubuntu 12.04 based kernel I see

a0868495@ula0868495 ~/Project/linux-keystone $ sudo arping 192.168.1.10 -c 1 -f ARPING 192.168.1.10 from 192.168.1.9 eth0
Unicast reply from 192.168.1.10 [00:1B:A9:02:26:10] 5.411ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
a0868495@ula0868495 ~/Project/linux-keystone $ arp -n -a
? (192.168.1.10) at 00:1b:a9:02:26:10 [ether] on eth0
? (192.168.1.1) at 00:1f:90:6d:5c:a8 [ether] on eth0

a0868495@ula0868495 ~/Project/linux-keystone $ uname -a
Linux ula0868495 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 i686 i686 i386 GNU/Linux

However this command doesn't update the arp table on my Keystone EVM based on v3.19.x and also newer ubuntu machine based on v3.11. Is this expected behavior? I believe the arp response resulting from a arping command is controlled through per interface accept sys control like as in gratuitous arp. Please repond.

Thanks and regards,

Signature · 2 lines
Murali Karicheri
Linux Kernel, Texas Instruments
#1 lore raw
Quoted 5 lines · Murali Karicheri

However this command doesn't update the arp table on my Keystone EVM based on v3.19.x and also newer ubuntu machine based on v3.11. Is this expected behavior? I believe the arp response resulting from a arping command is controlled through per interface accept sys control like as in gratuitous arp. Please repond.

echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_accept

#2 lore raw
Quoted 9 lines · David Ahern
Quoted 5 lines · Murali Karicheri

However this command doesn't update the arp table on my Keystone EVM based on v3.19.x and also newer ubuntu machine based on v3.11. Is this expected behavior? I believe the arp response resulting from a arping command is controlled through per interface accept sys control like as in gratuitous arp. Please repond.

echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_accept

Thanks. That is what I thought.

Signature · 2 lines
Murali Karicheri
Linux Kernel, Texas Instruments