Aruba & ProVision-based
1753650 Members
6169 Online
108798 Solutions
New Discussion

How to: Table of IP, Mac and Switch Port (2910al)

 
sebaton
Occasional Visitor

How to: Table of IP, Mac and Switch Port (2910al)

Hello Community,

 

is it possible to get a table of all switch-ports with connected MAC and IP adresses? Maybe there is at least something like arp-cache?

 

Saludos, Sebaton

4 REPLIES 4
paulgear
Esteemed Contributor

Re: How to: Table of IP, Mac and Switch Port (2910al)

Unless your switch is talking to all of the nodes on your network (e.g. if it's their default gateway), you won't see much useful in the arp cache. My switch's arp cache ('show arp') has only 7 entries, while its mac address table ('show mac-address') has over 200 entries.

The best way to get the data you're looking for is to use nmap or similar to do a ping scan and check the arp cache afterwards. On a Linux box, you could use 'nmap -sP 192.168.0.0/24' followed by 'arp -n' to get these results. Of course, if your nodes block incoming ping by default, this would not likely work. Arpwatch might be a better tool in this situation.
Regards,
Paul
sebaton
Occasional Visitor

Re: How to: Table of IP, Mac and Switch Port (2910al)

Hello Paul,

 

thank you a lot for your helpful answer. "show mac-address" and nmap output is a good way to get the information shared between two different sources. To join the information it would be grate to have csv output or similar.

--> Is there a way to get "show mac-address" and nmap output in csv?

 

Sebaton

 

paulgear
Esteemed Contributor

Re: How to: Table of IP, Mac and Switch Port (2910al)

On some switches and firmware versions you can run:
copy command-output 'show mac-address' tftp
but i'm not sure whether the 2910 is one of those models. (My 3400 has only xmodem as a target for this command.)

Otherwise logging through your terminal emulator and cut & paste are your options.
Regards,
Paul
Michael_Hubbard
Occasional Collector

Re: How to: Table of IP, Mac and Switch Port (2910al)

I wrote a couple Python 3 tools that will help with this. They are on my github site:

Aruba-HPE Python tools

I also have a python tool that will take a text file with the IP addresses from the SVIs, convert to host addresses and ping all of them to refresh the arp cache:

Ping all hosts on the network