For a given port on a Catalyst 4948 I need to determine:
- if the interface is a trunk
- which mac-addresses the interface has seen (same info as "show mac-address-table dynamic" gives)
- which VLAN the interface is on
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...
I asked the same question on https://lists.sourceforge.net/lists/listinfo/snmp-info-users
- Netdisco was suggested
- Kesy suggested a solution that I implemented using perl and
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 interface
Message was edited by: Poul Sorensen