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

Catalyst 6509 port information command 1

Status
Not open for further replies.

Dbyte

Technical User
Mar 6, 2002
87
What command(s) would I enter to discover the IPs & MACs of devices connected to all the ports on a Cisco Catalyst WS-C6509 switch? When I try using 'show mac-address-table' I get an "unknown command" error. The 'show arp' command only shows data for 2 IPs, each of which belongs to routers.

If there isn't a way for me to do this directly on the switch, is there a freeware utility that can accomplish this? I work for a nonprofit, so any amount > $0 simply won't work.
 
The 6509 sounds like it is a catos box so that is why show mac-address table doesn't work . Use the "show cam dynamic" command to get mac addresses . You don't indicate whether the 6509 has the routing card built in , use the show module command and look for a "msfc" module which indicates the router card is on board . If it is then from the command line you would have to "session 15" to get to the msfc and you would look at the "arp table" there . If it doesn't have a msfc then you would have to go to the device that is doing the routing to look at the arp table . If there is no msfc card the 6509 is a layer 2 device and the arp table on the switch will do you no good .
 
Thanks for the quick reply vipergg. Yes, it is a CatOS box & does have the routing card built in. I will try your 'session 15' advice & see if that gets me what I need. And thanks for the link as well. Some of those tools will likely help me out in the future.

I'll let you know how it goes...
 
Update:
running "sh arp" in session 15 shows me IPs & corresponding MACs ([thumbsup]), but all of the interfaces are listed as VLANs. Is there any way to modify this command to indicate physical ports on the switch?
 
Nope , you would have to go back to the layer 2 (catos side ) and do a show cam <mac-address> to correspond it to a port. There may be tools to do this but I'm sure you have to pay for them.
 
Alrighty then, back to the command line on the switch to get the port #'s. This seems tailor-made for a scripting solution (take output of sh arp & feed unique MACs into the show cam command to resolve to port #'s), but unfortunately I'm no code monkey.

Thanks for your help vipergg - I was searching everywhere for this info & you supplied it all in 1 place.
 
Hi Dbyte,

There was a coder named Tobias Oetiker who has done the trick before.
He programmed his code in Perl.
Take a look at
and get the files "cammer" and "cammer.readme.txt"
Read the readme [ponder] and have fun.
The file "cammer" is the actual perl script.

The cammer script reads the MAC-Address table from a switch and reads the ARP cache from a router and combines these.

If you have a running implementation of MRTG then cammer runs smoothly.
If you do not have MRTG running then the SNMP routines addressed by cammer will fail.
(D/L MRTG and use the SNMP routines provided with MRTG).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top