Depend whether or not you are trying to get it from a router or a switch, and if it is a switch whether or not it is a multilayer switch (i.e. - performing routing). From a rotuer you can do the "show ip arp" command to find the MAC address and the port from which it was learned.
If it is a port conencted to a layer 2 switch then you'll need to go onto the switch and run the "show mac-address-table address xxx" command to determine where the mac-address was learned from. The xxx's above refer to the mac-address you learned earlier. It is possible that if you are running an older switch the show mac-address=table command may not work. You'll need a variant of that command if so.
Now there are easier ways even if it is a layer 2 switch where you can get the information from one specific command however it would require you to do DHCP snooping and that would require another conversation.
Don't forget to use the "| include" options at the end of a show arp or show mac-address-table. I use it all the time if I have the mac-address of a device to track it's IP.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.