EXPERT RESPONSE
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.
|