Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Switch port mapping with IP address

Hi guys,

I have a few Catalyst 2960 switches on my network. I would like to know is there a command that can be used to see what are the IP addresses of the computers connected to each port on the switch?

I know it can be done via 3rd party tools, but is it possible to do it via IOS command?

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Cisco Employee

Re: Switch port mapping with IP address

Hi Saravanen,

You can do it for sure with ISO commands. On any first layer 3 device for those computers run a command "sh ip arp ".

This command will giev you the mac address for your machines which are mapped with their ip address.

Once you get the mac address you can go to the directly connected switch and issue a command "sh mac-address-table address ".

HTH

Ankur

Re: Switch port mapping with IP address

As far as I know, the 2960 is a layer2 switch. This means that it does not keep track of ip adresses, the switching process only needs the layer2 (mac)adresses.

There are ways to find out (manually) which ip adress belongs to a particular mac adress but you will not find an IOS-command to dump the ip - interface relationship on a 2960.

The command: sh mac-address-table gives you the layer adresses.

Regards,

Leo

5 REPLIES
Cisco Employee

Re: Switch port mapping with IP address

Hi Saravanen,

You can do it for sure with ISO commands. On any first layer 3 device for those computers run a command "sh ip arp ".

This command will giev you the mac address for your machines which are mapped with their ip address.

Once you get the mac address you can go to the directly connected switch and issue a command "sh mac-address-table address ".

HTH

Ankur

Re: Switch port mapping with IP address

As far as I know, the 2960 is a layer2 switch. This means that it does not keep track of ip adresses, the switching process only needs the layer2 (mac)adresses.

There are ways to find out (manually) which ip adress belongs to a particular mac adress but you will not find an IOS-command to dump the ip - interface relationship on a 2960.

The command: sh mac-address-table gives you the layer adresses.

Regards,

Leo

Cisco Employee

Re: Switch port mapping with IP address

Hi Leo,

Thats the reason I specified "On any first layer 3 hop for those computers"

Regards,

Ankur

Re: Switch port mapping with IP address

Goodmorning Ankur,

Actually I did not see your post until I had posted my own reply so this is not a reaction in any way. Probably I interpreted the question slightly different.

Your suggestion is in fact what I always do myself in these cases but like I said, there is no single command to display the ip-mac-port relation on a layer2 device.

Also, the user may not be able to make this link, due to either technical, administrative or other reasons.

Regards,

Leo

New Member

Re: Switch port mapping with IP address

Thanks for the help guys!

I will try out the commands.

3452
Views
0
Helpful
5
Replies
CreatePlease login to create content