Locate where a PC is plugged-in Filed Under: Networks
Introduction
This tutorial will focus on how we can find where a specific device is connect to the network or find the IP address of a device where we only know the MAC address.
In this tutorial we will use the commands available on the Cisco IOS if we don’t have access to an application that does this job for us like Cisco LMS.
Commands
MAC address – interface relationship
On Cisco switches the command show mac-address-table
will show you the list of all MAC addresses being seeing by the switch, but as they are going to appear a lot of MAC addresses these are some of the more specific commands of the show mac-address-table
show mac-address-table address xxxx.xxxx.xxxx
. This will display you which interface the MAC address appeared.show mac-address-table interface {interface: eg. fa0/10}
. This will display you the MAC address seeing on a specific interface.
ARP table
With the ARP table we have a relationship of the IP addresses in the network to the corresponding MAC address. The command to display the arp table on a Layer 3 switch is show arp
.
Now if you type this command as in the case of the show mac-address-table
you will see a lot of entries so you can use the output modifiers to display you just the output you require (or at least display you less information), for example:
6509switch#show arp | include 10.22.2.2
Internet 10.22.2.29 7 000e.7fdf.8999 ARPA Vlan10
Internet 10.22.2.2 4 000c.2989.0a9b ARPA Vlan10
Possible usage
Now that we have explained the commands needed to find the information we need if we wanted to find the IP address of a MAC address by knowing where that device plugs in our switch we could find their MAC address and then from there try to find that MAC address in the arp table.
Another possibility is that we know the IP address of a device but we want to know to which port on a switch the device connects. In this case, we will find the MAC address of the device either by connecting to the device and finding the MAC address (really easy to do and you don’t need to think much about it) or we could find the MAC address for that specific IP using the show arp
command.
After we know the MAC address then we can trace back where that MAC address has being and find were it connect in a switch.
Tags: IP address, location, MAC address, switch
- Permalink
- Alberto Diaz
- 8 Nov 2008 1:58 PM
- Comments (0)