Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to locate what switch port a specific machine is connected to? 1

Status
Not open for further replies.

chicocouk

MIS
Aug 19, 2002
331
GB
Ok, this should be easy, but it's been a long long time since I tried, and I can't seem to figure it out ...

I have a Cat core switch, with switching modules in it, and a routing module. I need to find out which physical port a specific ip address is connected to (eg, i know a server is at 172.16.32.181, how can I find which port that's connected to?

I can, if necessary, get the mac address of that ip from the server, but I'd rather do everything on the switch if possible.

Cheers

CCSP, CCNA, CCSA, MCSE, Cisco Firewall specialist, VPN specialist, IDS specialist
 

sh arp (outputs ip to mac relationship)
sh mac-address-table | include %part of mac address% (outputs mac to port relationsip)
 
Cheers, but those are IOS commands. This is on a Catalyst core switch. I've remembered it now anyway, show cam dynamic [VLAN] gets me what I need.

Thanks for the thoughts though.

CCSP, CCNA, CCSA, MCSE, Cisco Firewall specialist, VPN specialist, IDS specialist
 
whoops, I should read before engaging submit button in future!
 
Say, will that work with a 2950C switch?

For example I have some slowness issue on the switch, like half duplex/full issue, I want to find out which PC is having this problem, w/o going and searching for each one individually.

Can't I do this with the web interface? or the cisco network assistant?

I remember my 3com days with their network assitant, it gave almost all mac and IP addresses on each port w/o any special commands.
 
For a 2950 it will be "show mac-address" . If you need an ip to mac translation you would have to get on your router and do a "show arp" .
 
You can also do a broadcast ping command on the switch. This will light up every box that is plugged into that particular switch, something that 'show-arp' doesn't always do. After that, then do a 'show mac-address'

Example:

lvcswc003#
lvcswc003#ping 255.255.255.255

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:

Reply to request 0 from 10.100.7.2, 8 ms
Reply to request 0 from 10.100.7.22, 8 ms
Reply to request 0 from tiberon.corp.copart.com (10.100.7.37), 8 ms
Reply to request 0 from sinatra.corp.copart.com (10.100.7.31), 8 ms
Reply to request 0 from 10.100.7.3, 8 ms
Reply to request 1 from sinatra.corp.copart.com (10.100.7.31), 8 ms
Reply to request 1 from 10.100.7.3, 8 ms
Reply to request 1 from 10.100.7.2, 8 ms
Reply to request 1 from 10.100.7.22, 8 ms
Reply to request 1 from tiberon.corp.copart.com (10.100.7.37), 8 ms
Reply to request 2 from sinatra.corp.copart.com (10.100.7.31), 1 ms
Reply to request 2 from 10.100.7.2, 8 ms
Reply to request 2 from 10.100.7.3, 1 ms
Reply to request 2 from 10.100.7.22, 1 ms
Reply to request 2 from tiberon.corp.copart.com (10.100.7.37), 1 ms
Reply to request 3 from sinatra.corp.copart.com (10.100.7.31), 1 ms
Reply to request 3 from 10.100.7.2, 8 ms
Reply to request 3 from 10.100.7.3, 1 ms
Reply to request 3 from 10.100.7.22, 1 ms
Reply to request 3 from tiberon.corp.copart.com (10.100.7.37), 1 ms
Reply to request 4 from sinatra.corp.copart.com (10.100.7.31), 1 ms
Reply to request 4 from 10.100.7.2, 8 ms
Reply to request 4 from 10.100.7.3, 1 ms
Reply to request 4 from 10.100.7.22, 1 ms
Reply to request 4 from tiberon.corp.copart.com (10.100.7.37), 1 ms
lvcswc003#

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top