cisco command to find port from mac address

Associate
Joined
31 Aug 2003
Posts
748
i have the mac addresses of some machines, what command can i run on a 45 series switch to find which port they are connected to?
 
i have the mac addresses of some machines, what command can i run on a 45 series switch to find which port they are connected to?

If its a newer 45xx series running IOS "show mac-address-table" and check the mac address vs the port.

If its running catos the command is "show cam dynamic" for the same thing.
 
i know mate, i was just being daft. its been a while since i used any cisco kit though, so not a lot is springing to mind.
 
If its showing port channel 1, that means that the user is connected to another switch upstream on portchannel1 (L2 Etherchannel) you need to get on whatever switch is on the other end of channel1, and run the same command until you get a normal access fast ethernet port with a single mac-address on it.

Unless your running ciscoworks or some other SNMP monitoring software which keeps a logs of end users and switchports, there is no quick or simple way to find them.
 
Remember you can also use the pipe to filter out the results you want to see

So in that probably large mac table do a

sh mac-address-table l include (mac address)

basically a string search like grep in Unix
 
how can i pipe everything to a text file? sorry i know im lazy.....

lol..

Use a terminal emulator like securecrt/teraterm/hyperterm, there should be an option to capture to text, start capturing to text, then do

show mac-address-table | include xxxx.xxxx.xxxx

That should make a text file with everything you see on the screen.
 
sh mac-address-table dynamic address [MAC] works well (use it all the time) along with sh cdp nei [interface] to find the next switch in the link!
 
Back
Top Bottom