02-16-2010 04:27 AM - edited 03-06-2019 09:43 AM
Hi
For a given port on a Catalyst 4948 I need to determine:
The major problem is the it seems that I have to do reverse engineering:
examine all VLAN's, cache all MAC-addresses and look for the ifIndex...
Is there any better way to do that (hopefully without traversing everything)?
I found SNMP::Info, which gives me i_vlan_membership() and v_name(), but that
is only half-way through...
Thank you
Poul
Solved! Go to Solution.
02-18-2010 07:41 AM
I asked the same question on https://lists.sourceforge.net/lists/listinfo/snmp-info-users
SNMP::Info
, the outline:$switch->vtp_trunk_dyn_stat()
- to get trunking/notTrunking interface status$switch->fw_mac()
- to get forwarding table for each vlan. Remember about community string indexing$switch->i_vlan()
- to get vlan id on interfaceMessage was edited by: Poul Sorensen
02-16-2010 07:39 PM
Poul,
I'm afraid I don't know an easy way to do this, but I understand the frustration. It's something that is so easy using the CLI, but when you try and do it with SNMP the information is presented "back to front", so it is a long involved process of loading whole tables and then doing seraches.
I use CA Spectrum and I wrote a script to trace a MAC address through the network so that I could track down rogue hosts and errors in my model placements. I did it using exactly the same steps as you suggest. That is, I go to the router, download its ARP cache to look up the IP address I am interested in and get the VLAN. Then starting at the VLAN root, I go to each switch in turn, laboriously download its forwarding table using CommunityString@VLAN, get the ifindex of the next hop port, etc. etc.
The only thing I can suggest is to search the MIB specifications to se if there any shortcuts. If you find any, then please let me know .
Kevin Dorrell
Luxembourg
02-18-2010 07:41 AM
I asked the same question on https://lists.sourceforge.net/lists/listinfo/snmp-info-users
SNMP::Info
, the outline:$switch->vtp_trunk_dyn_stat()
- to get trunking/notTrunking interface status$switch->fw_mac()
- to get forwarding table for each vlan. Remember about community string indexing$switch->i_vlan()
- to get vlan id on interfaceMessage was edited by: Poul Sorensen
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: