cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1664
Views
0
Helpful
1
Replies

VLAN Trunc SNMP

haneid
Level 1
Level 1

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

1 Reply 1

haneid
Level 1
Level 1

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

Getting Started

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: