Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3827

TP-Link VLAN MIB missing ports and type

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • Professional Edition
    • Discovery, Poller

    Description

      Hello,

      i have some missing VLAN port members with our TP-Link T1700G-28TQ Switches. I debugged it little bit an it seems that not all ports have a slash in their name and can even reference previous port names. This means that line 67 onwards in ./includes/discovery/vlans/tplink-dot1q-vlan-mib.inc.php and line 55 in ./includes/polling/ports/tplink-dot1q-vlan-mib.inc.php do not work in all cases.

      Here is an example:

      TPLINK-DOT1Q-VLAN-MIB::vlanTagPortMemberAdd.2 = STRING: "Gi1/0/3-24,Te1/0/27-28,Gi2/0/3-24,Te2/0/27-28,Po1-3,7,11,13-14"

      This currently does not add the ports Po1, Po2, Po3, Po7Po11Po13, Po14.

      Additionally only the tagged vlan ports seem to get added but not the untagged ones. Maybe this can be implemented?

      Here is an example:

      TPLINK-DOT1Q-VLAN-MIB::vlanUntagPortMemberAdd.2 = STRING: "Gi1/0/1-2,2/0/1-2,Po4-6,8-10,12"

      Thank you.

      Attachments

        1. discovery.debug
          65 kB
        2. poller.debug
          237 kB
        3. vlans.snmpwalk
          1 kB

        Activity

          [OBS-3827] TP-Link VLAN MIB missing ports and type
          bbaumgartl B. Baumgartl added a comment - - edited

          poller.debug

          I think i can see the problem. It seems like the switch reports VLAN 2 as the default PVID (vlanPortPvid) even if that is not what is configured on the switch (default should be VLAN 1 und some ports have 2 and some 100). This seems to be a switch bug but even then there could be multiple untagged VLANs on one port (Asymmetric VLAN). For example VLAN 1 is untagged on all ports, some ports additionally have VLAN 2 or 100 set. This is the configuration that vlanUntagPortMemberAdd provides (as far as i can tell).
          Maybe this is intended observium behavior (pvid = untagged and only one port can be untagged), but not sure.

          bbaumgartl B. Baumgartl added a comment - - edited poller.debug I think i can see the problem. It seems like the switch reports VLAN 2 as the default PVID (vlanPortPvid) even if that is not what is configured on the switch (default should be VLAN 1 und some ports have 2 and some 100). This seems to be a switch bug but even then there could be multiple untagged VLANs on one port (Asymmetric VLAN). For example VLAN 1 is untagged on all ports, some ports additionally have VLAN 2 or 100 set. This is the configuration that vlanUntagPortMemberAdd provides (as far as i can tell). Maybe this is intended observium behavior (pvid = untagged and only one port can be untagged), but not sure.

          Please make and attach poller debug (access vlans detected by different Oids):

          ./poller.php -d -m ports -h <device>
          

          landy Mike Stupalov added a comment - Please make and attach poller debug (access vlans detected by different Oids): ./poller.php -d -m ports -h <device>

          Sorry about that. Looks good now (at least for this this hardware). Thank you very much.

          Can we do something about the untagged ports? They are currently all in one vlan and overwrite/untag the ones that should be tagged.

          bbaumgartl B. Baumgartl added a comment - Sorry about that. Looks good now (at least for this this hardware). Thank you very much. Can we do something about the untagged ports? They are currently all in one vlan and overwrite/untag the ones that should be tagged.

          Try in r11493.

          landy Mike Stupalov added a comment - Try in r11493.

          Derp, please tell the manufacturer they are idiots... this lists complete unparsable.

          landy Mike Stupalov added a comment - Derp, please tell the manufacturer they are idiots... this lists complete unparsable.
          bbaumgartl B. Baumgartl added a comment - - edited

          Thank you for the quick response. The fix seems to have 3 problems:

          1. The split for ports without slash works but afterwards the port name is reconstructed differently: Po1-7,14 currently becomes Po/1, Po/2, ..., Po/7, Po/14 but should be Po1, Po2, ..., Po7, Po14
          2. If a port name is followed by a number or range without a name the name of the previous port should be used (we have to keep in mind that there may be switches that don't have port names and only use numbers. Only if a port name is followed by a number the previous name should be used):  Te2/0/27,30,1/0/20,30 currently becomes Te2/0/27, Te2/0/30, 1/0/20, 1/0/30 but should be Te2/0/27, Te2/0/30, Te1/0/20, Te1/0/30
          3. The last one i couldn't find out since i'm not sure where this is done. There are untagged ports now but they are all in VLAN2 which isn't what the switch reports back (for my example snmpwalk there should be some in VLAN1 and some in VLAN2 but currently they are all in VLAN2).

           

          bbaumgartl B. Baumgartl added a comment - - edited Thank you for the quick response. The fix seems to have 3 problems: The split for ports without slash works but afterwards the port name is reconstructed differently:  Po1-7,14  currently becomes  Po/1 , Po /2 , ..., Po /7 , Po /14 but should be Po1 , Po2 , ..., Po7 , Po14 If a port name is followed by a number or range without a name the name of the previous port should be used (we have to keep in mind that there may be switches that don't have port names and only use numbers. Only if a port name is followed by a number the previous name should be used):   Te2/0/27,30,1/0/20,30 currently becomes Te2/0/27 , Te2/0/30 , 1/0/20 , 1/0/30 but should be  Te2/0/27 , Te2/0/30 , Te1/0/20 , Te1/0/30 The last one i couldn't find out since i'm not sure where this is done. There are untagged ports now but they are all in VLAN2 which isn't what the switch reports back (for my example snmpwalk there should be some in VLAN1 and some in VLAN2 but currently they are all in VLAN2).  
          landy Mike Stupalov added a comment - - edited

          Improved in r11489.

          landy Mike Stupalov added a comment - - edited Improved in r11489.

          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community>  --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community>  --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          Note, this comment is added automatically.

          bot Observium Bot added a comment - Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files Note, this comment is added automatically.

          People

            landy Mike Stupalov
            bbaumgartl B. Baumgartl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: