Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Cisco Employee

VLAN Trunc SNMP

Hi there.

I'm trying to get the VLAN's a trunc port is a member of using snmp using the CISCO-VTP-MIB

The following key holds this information: .1.3.6.1.4.1.9.9.46.1.6.1.1.4

(.iso.org.dod.internet.private.enterprises.cisco.ciscoMgmt.ciscoVtpMIB.vtpMIBObjects.vlanTrunkPorts.vlanTrunkPortTable.vlanTrunkPortEntry.vlanTrunkPortVlansEnabled)

As far as i know the result is a hex value thet has to be transfered into a binary value, and then count the positions of the enabled bits to find out what vlans exists in a trunc.

If i query the snmp for a port i get the following result:

60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00

Converting this to binary gives me:

0110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000111100000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000

if i count the enabled bit's position i get the following result;

1,2,200,201,202,203

The VLANS enabled in that trunk is only:

1,2,200

Why do i get readings about vlans not present?

If i remove VLAN 200 from the trunk the reading is correct

if i replace vlan 200 with vlan 201 the reading is correct.

The same applies to vlan 1024, if i add that vlan i get enabled bits on vlan 1024,1025,1026

Is there anyone who can point me in the right direction getting only the correct vlans listed when quiery SNMP v2

The switch i'm querying is a WS-C2960G-8TC-L

Regards

Alexander Eid

Everyone's tags (6)
1 REPLY
Cisco Employee

VLAN Trunc SNMP

Problem solved

The hexto bin converter i was using (vb.net) was not converting correctly, solved by manually do the conversion

Thanks to all of you that looked into it

Regards

Alexander EId

804
Views
0
Helpful
1
Replies
CreatePlease login to create content