1

I'm running CentOS Linux release 7.0.1406 on a VPS server.

Attempted to use the "arp" command and found it was missing. I tried as root as well to make sure the command wasn't in sbin. Then I googled and found this command is part of the old net-tools package which was deprecated (I assume that is why I don't have it). I found the ifconfig command missing too which is also in the deprecated net-tools.

So instead of installing the old net-tools I decided to try the new equivalent arp command and looking at this article that should be ip n show.

Well that command returns nothing. I also tried ip -s n and ip -s n show all return nothing. I know my arp cache isn't empty because I've been pinging stuff left and right.

What am I doing wrong?

Update: So I installed net-tools and did an arp -a and found it also returns nothing! Now I know its not a problem with the ip command. This is a VPS I'm running. Is it possible that is why the arp cache is reporting empty? I didn't include that info at first because I didn't think it would make a difference, but now I'm thinking some virtual networking voodoo might be at play.

  • Some VPS and virtualization technologies do some weird networking voodoo as you suggested. I am curious why you would care about the arp table on a VPS. – Zoredache Jan 8 '15 at 19:47
  • This VPS is a toy i use for learning so its just my own curiosity. I opened a ticket with my VPS vendor and will post back their response. Ideally they'll give me some info about how their infrastructure in particular handles this. – user1028270 Jan 8 '15 at 22:28
2

As a bare minimum, I think this command is useful for your purpose (tested on Ubuntu 14.04):

ip neigh

this will show you a view of your arp cache. Then you can play with the options to obtain a more suitable output.

  • uh but I thought ip n is supposed to be shorthand for ip neighbor. Either way ip n, ip neigh, ip neighbor all return nothing. Not even an "arp cache empty" message- and I know my arp cache is NOT empty. – user1028270 Jan 8 '15 at 16:57
  • Indeed it is, as the article you linked points out. Since all the commands you posted are working on my Ubuntu, I thought using the full command (and not the 'n' shortcut) could be useful in your situation. – Alessandro Dotti Contra Jan 8 '15 at 17:17
  • Do you find most servers in the wild have net-tools installed? I work at a Windows shop so I'm curious. From what I read googling the community doesn't seem to like using ip commands over the old net-tools commands. – user1028270 Jan 8 '15 at 17:23
  • The system I use (Ubuntu and Debian) have both commands; I can't say about other distributions. For what I need to do ip and ifconfig (and friends) are pretty equivalent in functionalities. As far as I know, ip tries to resemble Cisco IOS syntax. – Alessandro Dotti Contra Jan 8 '15 at 17:27
0

I asked my visualization vendor about this issue. They informed it is because my VPS is running inside an OpenVZ container and does not have kernel access to the host which is required in order to read the arp table.

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.