Find ip device attached to a switch

Unanswered Question
Oct 9th, 2008
User Badges:


show mac address-table command will tell the vlan, device MAC address and which port it is connected as shown below.


201 0016.350c.3667 dynamic ip GigabitEthernet1/3




My question is, how to find MAC-TO-IP? or IP-TO-MAC if layer3 address is given and need to resolve layer2 address?


I'm using Native IOS 12.2 and later...


thanks..


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
rshum Thu, 10/09/2008 - 07:58
User Badges:

If you know the IP address you can do a show ip arp and the device will give you the MAC address.

mike_guy29 Thu, 10/09/2008 - 08:00
User Badges:

Hi,


If the device is a layer 3 switch or router this is relatively straight forward.


Easiest thing to do is to check the arp table for the IP to MAC. You can use the include output modified to narrow it down quickly.


e.g. "show arp | include 192.168.1.1"


It would then only show you the arp entry for that IP. If you are trying to find out this info on just a layer 2 switch then you will have more difficulty. I believe you would need to go to the layer 3 device connected to the switch and issue the show arp command from there. Once you have the mac address you could use the show mac-address-table command to trace back to the port.


Does this make sense? Just ask if any more questions.


Mike

Gerard Gacusan Thu, 10/09/2008 - 08:12
User Badges:

you're right, in L3 you can find MAC with the vlan ID. But, if the device is connected to a L2 switch, it will not show on arp table when it's on different vlan than the native vlan of the L2 switch...


traceroute mac is probably the solution ...not try this yet.



Giuseppe Larosa Thu, 10/09/2008 - 09:07
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello,

>> But, if the device is connected to a L2 switch, it will not show on arp table when it's on different vlan than the native vlan of the L2 switch


No, you will always see an ARP entry if the device you are looking has an IP address that is on a connected lan subnet on layer3 device.


Hope to help

Giuseppe


Actions

This Discussion