Finding what ports on Cat switch are trunks

I have many Catalyst switches that I am polling with SNMP. I am trying to find what ports are acting as trunks. On most of the switches it works properly, using vlanTrunkPortDynamicStatus. It returns output like: CISCO-VTP-MIB::vlanTrunkPortDynamicStatus.48 = INTEGER: notTrunking(2) CISCO-VTP-MIB::vlanTrunkPortDynamicStatus.49 = INTEGER: trunking(1)

etc. However sometimes it will only return the virtual port doing the trunking over other physical ports:

CISCO-VTP-MIB::vlanTrunkPortDynamicStatus.27 = INTEGER: trunking(1) RFC1213-MIB::ifType.27 = INTEGER: propVirtual(53)

I want to know what PHYSICAL ports are running on the bridge over port "27"

Does anyone have any ideas to help me out? Thanks Pat

Reply to
pzaloum
Loading thread data ...

I do not remember exact MIB, but there are a series of MIBs, which return the interface (or port) description of the SNMP instance. Try to use SNMPWALK against that switch, and see what MIB will return the port name for the instance .27.

Good luck,

Mike

formatting link

Reply to
CiscoHeadsetAdapter.com

Do I deduce correct from your VTP reference that the Cat switches are running IOS rather than CatOS

At the moment, this sounds like an application for "community string indexing" or it's replacement (which is hard to find the documentation for.) Index by the VLAN number and probably look at one of the at*Media* series: the port descriptor should exist within the indexed community only if the port exists within that VLAN.

There might be an easier way; I do not have ready access to an IOS box running VLANs to experiment with.

Reply to
Walter Roberson

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.