cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8318
Views
0
Helpful
5
Replies

Switch port mapping with IP address

saravanen.g
Level 1
Level 1

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

ankbhasi
Cisco Employee
Cisco Employee

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

View solution in original post

lgijssel
Level 9
Level 9

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

View solution in original post

5 Replies 5

ankbhasi
Cisco Employee
Cisco Employee

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

lgijssel
Level 9
Level 9

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

Hi Leo,

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

Regards,

Ankur

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

Thanks for the help guys!

I will try out the commands.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card