9

Where, in memory, does the ARP cache exist? I tried searching it up online but didn't find anything.

migrated from security.stackexchange.com Nov 27 '17 at 7:32

This question came from our site for information security professionals.

  • 1
    @Gilles So if I modify /proc/net/arp, then I would indirectly modify the ARP cache? – ssharma Nov 26 '17 at 16:48
13

GNU/Linux, unlike MacOSx, uses the /proc directory structure, a.k.a. procfs, to store system data. The arp cache is located at /proc/net/arp You print the data to stdout directly from that system file via:

cat /proc/net/arp

I realized that you may also want the memory address that the kernel uses to find the arp cache. The exact address may vary. However, you can find the memory address table for all arp memory addresses the kernel uses in /proc/kallsyms

cat /proc/kallsyms |grep arp_

May be helpful as well.

  • 4
    The /proc directory does not store anything. It displays things stored or computed by the kernel, and it sometimes allows modifying those things, but it does not correspond to any storage area. In the case of the ARP cache, you can view a text rendering of it through /proc/net/arp, but what you're seeing is some kernel data structures that have been pretty-printed, you are not directly seeing some file that constitutes the content of the cache. – Gilles Nov 26 '17 at 11:32
  • 4
    This is one place where “GNU/Linux” is wrong. You're referring to the kernel, the kernel is only called “Linux”. – Gilles Nov 26 '17 at 11:33
  • is it possible to modify /proc/net/arp ? I keep getting cat: write: Input/output error and echoing into it doesn't seem to change it. Is there another utility to change it? I cannot run arp or if in BusyBox v0.60.0 – ComradeJoecool Jun 6 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.