Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Lets say I have multiple cisco switches that are all on the same VLAN.

The question is:

If I do "arp -a" on a pc that is connected to one of the switches.

Do I get the Ip and Mac addresses of all the pcs on the vlan, or do I get the arp table that is only on the switch that I am connected to?

Thank you!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

No you would get only what is in the local arp cache for that PC, which would basically be any other device on the same subnet that the PC has contacted.

share|improve this answer
    
ok, so is there a way to get the mac addresses(AND IPS) of all the pcs on the vlan? –  Lee Sep 30 '13 at 15:16
    
nmap (filler words) –  Gregg Leventhal Sep 30 '13 at 15:16
    
For example if you are on 192.168.1.0/24 you could do nmap -sP 192.168.1.0-255 –  Gregg Leventhal Sep 30 '13 at 15:20
    
Thanks, I will look on to it.. But I need to develop it myself. Do you know how they are doing it? It seems by your example that they are just scanning all the ips in the subnet. –  Lee Sep 30 '13 at 15:25
    
Yes, that's right. If you want to develop it yourself, you could just loop through a range of ips and ping them, then retrieve the MAC address from your arp cache if you are on the same subnet. –  Gregg Leventhal Sep 30 '13 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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