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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

given device MAC address, how to determine which port connected to?

Status
Not open for further replies.

wallst32

MIS
Apr 14, 2003
545
US
I determined the MAC address of a host by viewing the arp cache on the 2600 router. The host is connected to a 2948G switch. What command can I run the switch to determine which phyiscal port the host in question is connected to? I tried "show mac" but it just gives statistics.

TIA
 
You have to do this command:

sho mac-address-table address H.H.H (hardware address)

If you don't have an uplink port, than it will point you to the exact port, if you do have an uplink port, it may point you to the uplink port. Then you need to telnet to the device on the uplink port, and run the same command again.
 
WS-C2948 Software, Version NmpSW: 4.5(3)
Copyright (c) 1995-1999 by Cisco Systems, Inc.
NMP S/W compiled on Sep 2 1999, 17:53:15
GSP S/W compiled on Aug 31 1999, 10:48:35

System Bootstrap Version: 5.4(1)

That's not a valid command on my platform.

"show mac" is valid, but doesn't give me the information I'm looking for:

Usage: show mac [mod_num]
show mac <mod_num/port_num>
 
On a catos box it is "show cam dyn {mac address} or you can use use show cam dynamic and it will show you all mac addresses and ports on the box . If it's just connected directly to the router , on the switch you can ping the address and it will show up in the arp table on the switch which will tell what port it is on . This works for directly connected links , if it's a trunked link the show arp will not work .
 
viper - Thanks. It didn't accept "show cam dyn <macaddy>" for me, but I was able to get what I was looking for from the usage output.

"show cam dyn <vlan#>" did it for me.

 
you need to type show cam <mac> that would do it.

"For every complex problem, there is a solution that is simple, neat and wrong" -- H.L. Mencken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top