Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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?