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!

Sh ip and mac address

Status
Not open for further replies.

mccullrr

Technical User
Mar 6, 2006
71
Is there a command I can use on a cisco switch that will show me the ip and mac address of each computer in the corresponding Fast Ethernet port? I know of sh mac-address-table, but it is showing me several mac addresses associated with one port??

Thanks,
Becky
 
sh mac-address-table" is a valid command to use. If you are seeing multiple MAC addresses per port, then that port must either be a trunk port or an uplink port (i.e. it connects to another switch).

If you want to see what the correspoding IP addresses for the MAC's, you can issue the "show ip arp" command. Note however that unless this switch is the IP default gateway for all your IP subnets, it may not reveal many IP addresses as it doesn't need to resolve them to pass traffic - this is what your default gateway does.

You may have to jump onto the device that is the default gateway and repeat the "show ip arp" command there to get a full list of IP addresses to MAC addresses.
 
Good explanation by KiscoKid. The only helpful thing I can add is that there are many non-Cisco tools for doing this, such as nmap.
 
If you seeing multiple addresses then probably someone has hooked a switch or hub off this port somewhere.
 
Thanks everyone. helpdeskdan, can you explain nmap?

Thanks,
Becky
 
Sorry for late reply - been busy!


Nmap is a free, command line utility by the Unix guys that is very powerful. What you will want is to do just a simple ping scan of your network to see what is out there - nothing complicated like looking for open ports. So, that would be

nmap -sP 192.168.0.0/24

Few seconds later, it shoots out a list of all the IP addresses on that network. If you need to know the mac addr's for any of those addresses, you just do an arp -a 192.168.0.1. You can have more fun by using -A to see what it can figure out concerning an address.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top