Ask the Expert

Is there a command in a Cisco Catalyst that will tell me the IP address of a PC hanging off a port?

Is there a command in a Cisco Catalyst (in the 2950 and 3548 series) that will tell me the IP address of the PC hanging off a particular port? I cannot use a sniffer on the network. The network is remote to me. I am using SecureCRT, and I log into the Cisco.

    Requires Free Membership to View

A single command won't tell you these things. From what I gather you don't have a lot of access to manage and configure the switches but you are able to view the route and ARP tables in the switches and routers.

Just a note, there are several tools available that utilize SNMP discovery to automate this process for you. You might want to investigate these if you have SNMP access to the switches and routers. In fact, Cisco wrote a fairly good article on how to accomplish this with SNMP: How to get MAC and IP address accounting information using SNMP.

Now to address your question from the CLI, it's a multi-step process. Because the Catalyst switches are Layer 2 switches, they operate mostly on MAC addresses. Therefore you would need the default gateway router to identify the MAC address of the IP in question. The show ARP command on a Cisco router will output the IP address and MAC address. You want to use the show ARP command to just display results for a single IP.

Once you have identified the MAC address you can then identify the port it's attached to on the switch by using a show CAM dynamic or show MAC command. Thus, SNMP is probably the easiest way for you to obtain what you need. Let me know if you want some recommendations on SNMP products for network discovery.

This was first published in April 2007

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: