IP to MAC resolution

Unanswered Question
Feb 26th, 2009

I know the IP of a device on my multi-VLAN network. How do I find which switch and port it is connected to?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
ohassairi Thu, 02/26/2009 - 06:11

if you have a ciscoworks machine this could be easy.

i imagine you don't have it.

1-first determine the mac address of your computer .

2-then choose one switch that has PCs in same vlan, telnet to it and issue the command

switch# sho mac-address-table | inc yourmacaddress

if the PC is connected to that switch then you will get directly the port.

if not the switch will indicate to you an uplink to a second switch

repeat same steps with second switch

Anonymous (not verified) Thu, 02/26/2009 - 06:13

The device I'm trying to find is a printer so I'm not able to telenet into it.

Tshi M Thu, 02/26/2009 - 06:21

sh ip arp x.x.x.x.

this will return the MAC address belonging to the IP

once you have the mac address, you use

sh mac-add | i xxxx.xxxx.xxxx

below is an example

3560-sw1#sh ip arp 10.64.155.62

Protocol Address Age (min) Hardware Addr Type Interface

Internet 10.64.155.62 21 0011.43b4.7f0f ARPA Vlan101

3560-sw1#sh mac-add | i 0011.43b4.7f0f

101 0011.43b4.7f0f DYNAMIC Gi0/32

Anonymous (not verified) Thu, 02/26/2009 - 07:30

I would already have to know which switch the printer is attached to in order for that to work - correct?

Tshi M Thu, 02/26/2009 - 07:37

No you don't need to know the switch where the printer is connected to. You can use the sh ip arp x.x.x.x from any switch. Once the mac address is found, you can work your way up to where the device is connected. the sh mac-add | i xxxx.xxxx.xxxx might point to an uplink. You will then go to that switch and work your way to the right switch.

Anonymous (not verified) Thu, 02/26/2009 - 07:31

Mohamad Qayoom Thu, 02/26/2009 - 07:36

No, you can go to the core and do the following:

ping x.x.x.x

sh ip arp x.x.x.x

Now you will see MAC address aaaa.bbbb.cccc

sh mac-add add aaaa.bbbb.cccc

Here you will see port-channel or uplink port. Now see what switch is connected through that port-channel onr uplink.

Go to that switch and do

sh mac-add add aaaa.bbbb.cccc

Mohamad Qayoom Thu, 02/26/2009 - 07:36

No, you can go to the core and do the following:

ping x.x.x.x

sh ip arp x.x.x.x

Now you will see MAC address aaaa.bbbb.cccc

sh mac-add add aaaa.bbbb.cccc

Here you will see port-channel or uplink port. Now see what switch is connected through that port-channel onr uplink.

Go to that switch and do

sh mac-add add aaaa.bbbb.cccc

Actions

This Discussion