LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Query of ArpCache is not spawning ARP Request (https://www.linuxquestions.org/questions/linux-newbie-8/query-of-arpcache-is-not-spawning-arp-request-420115/)

w6nct 02-27-2006 02:26 PM

Query of ArpCache is not spawning ARP Request
 
NOTE: I am posting this on "newbie" (instead of "networking",...) so as to influence the level of the response. I am a new developer on Linux, and will likely need more detailed response. Thank-you, in advance, for your patience.

MODERATOR: Feel free to move this thread to another forum, if you feel that I can get the lower-level response there as well.


BACKGROUND: I am running MonteVista Linux on custom hardware, using a PowerPC (core within Xilinx FPGA). I have some initialization code in a daemon that queries the ARP cache for an entry associated with my default Gateway's IP address. I am using an ioctl(fd,SIOCGARP) call for this query. As expected, the initial several attempts return an error; but in most cases, a later attempt returns the ARP cache entry (assuming that the Gateway responds). From what I have read, the initial attempt returns the error, because no cache entry initially exists; but then it generates an ARP Request out the Ethernet interface, to cause the entry to be created. The intermediate error responses will continue to occur while the stack is waiting for the ARP Reply. In a normal case, I can see these ARP Request/Reply messages in a sniffer trace.

FAILURE CASE: In some (infrequent) cases, the Linux code never generates an ARP Request, even if the hardware and other conditions are the same (as the normal case). I can confirm that no ARP Requests are being sent, both by a sniffer trace and a TCPDUMP of the interface. At times, the failure case seems to be avoided if the stack receives frames (e.g., broadcasts, from external source) before I query the ARP cache.

QUESTIONs:
1) What can cause the Linux stack to not generate ARP Requests when I query the ARP cache?
2) Is there anything I can monitor to provide more operational information about what it is doing, and why?
3) Is there a way I can force it to generate the ARP Request for this scenario?

Thank-you.

<<< vern >>>


All times are GMT -5. The time now is 05:14 AM.