Sorry, but i think this is not right, and probably is the reason of the netxms bug:
According also to:
https://supportportal.juniper.net/s/article/EX-How-to-retrieve-interface-names-mapped-to-a-specific-VLAN-using-SNMP-MIB?language=en_US
In the SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3 oid is not present the snmp ifindex, but the translated dot1dBasePortIfIndex ( 1.3.6.1.2.1.17.1.4.1.2)
in my case:
# Vlan
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.23 = STRING: "n9-2"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.5.23 = Gauge32: 2920
# Interface with vlan n9-2 in the switch (in my previous post this info was missed because we filter out logical interfaces from snmp in the switch)
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.2.1.2.2.1.2.553
IF-MIB::ifDescr.553 = STRING: ge-0/1/3.0
# dot1dBasePortIfIndex ge-0/1/3.0 snmp ifindex 553 has oid index 564
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.2.1.17.1.4.1.2
SNMPv2-SMI::mib-2.17.1.4.1.2.514 = INTEGER: 505
SNMPv2-SMI::mib-2.17.1.4.1.2.515 = INTEGER: 507
SNMPv2-SMI::mib-2.17.1.4.1.2.516 = INTEGER: 509
SNMPv2-SMI::mib-2.17.1.4.1.2.518 = INTEGER: 513
SNMPv2-SMI::mib-2.17.1.4.1.2.519 = INTEGER: 515
SNMPv2-SMI::mib-2.17.1.4.1.2.520 = INTEGER: 517
SNMPv2-SMI::mib-2.17.1.4.1.2.521 = INTEGER: 519
SNMPv2-SMI::mib-2.17.1.4.1.2.522 = INTEGER: 521
SNMPv2-SMI::mib-2.17.1.4.1.2.523 = INTEGER: 523
SNMPv2-SMI::mib-2.17.1.4.1.2.524 = INTEGER: 525
SNMPv2-SMI::mib-2.17.1.4.1.2.525 = INTEGER: 527
SNMPv2-SMI::mib-2.17.1.4.1.2.526 = INTEGER: 529
SNMPv2-SMI::mib-2.17.1.4.1.2.529 = INTEGER: 535
SNMPv2-SMI::mib-2.17.1.4.1.2.530 = INTEGER: 537
SNMPv2-SMI::mib-2.17.1.4.1.2.531 = INTEGER: 539
SNMPv2-SMI::mib-2.17.1.4.1.2.533 = INTEGER: 546
SNMPv2-SMI::mib-2.17.1.4.1.2.534 = INTEGER: 547
SNMPv2-SMI::mib-2.17.1.4.1.2.535 = INTEGER: 548
SNMPv2-SMI::mib-2.17.1.4.1.2.536 = INTEGER: 549
SNMPv2-SMI::mib-2.17.1.4.1.2.564 = INTEGER: 553
# The correct snmp info about the interface vlan
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3.23.564
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.564 = INTEGER: 3
Netxms instead use the ifindex ( 553 ) so the vlan is not assigned (because not exists in the mapping) or when exists it's wrongly assigned to a different interface:
# Example of an interface incorrectly recognized by netxms:
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3.23.534
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.534 = INTEGER: 3
# The wrong assumption
snmpwalk -v2c -c public 172.x.x.x 172.29.1.25 1.3.6.1.2.1.2.2.1.2.534
IF-MIB::ifDescr.534 = STRING: ge-0/0/16
and indeed in my previous post screenshot, the vlan is incorrectly assigned to ge-0/0/16
According also to:
https://supportportal.juniper.net/s/article/EX-How-to-retrieve-interface-names-mapped-to-a-specific-VLAN-using-SNMP-MIB?language=en_US
In the SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3 oid is not present the snmp ifindex, but the translated dot1dBasePortIfIndex ( 1.3.6.1.2.1.17.1.4.1.2)
in my case:
# Vlan
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.23 = STRING: "n9-2"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.5.23 = Gauge32: 2920
# Interface with vlan n9-2 in the switch (in my previous post this info was missed because we filter out logical interfaces from snmp in the switch)
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.2.1.2.2.1.2.553
IF-MIB::ifDescr.553 = STRING: ge-0/1/3.0
# dot1dBasePortIfIndex ge-0/1/3.0 snmp ifindex 553 has oid index 564
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.2.1.17.1.4.1.2
SNMPv2-SMI::mib-2.17.1.4.1.2.514 = INTEGER: 505
SNMPv2-SMI::mib-2.17.1.4.1.2.515 = INTEGER: 507
SNMPv2-SMI::mib-2.17.1.4.1.2.516 = INTEGER: 509
SNMPv2-SMI::mib-2.17.1.4.1.2.518 = INTEGER: 513
SNMPv2-SMI::mib-2.17.1.4.1.2.519 = INTEGER: 515
SNMPv2-SMI::mib-2.17.1.4.1.2.520 = INTEGER: 517
SNMPv2-SMI::mib-2.17.1.4.1.2.521 = INTEGER: 519
SNMPv2-SMI::mib-2.17.1.4.1.2.522 = INTEGER: 521
SNMPv2-SMI::mib-2.17.1.4.1.2.523 = INTEGER: 523
SNMPv2-SMI::mib-2.17.1.4.1.2.524 = INTEGER: 525
SNMPv2-SMI::mib-2.17.1.4.1.2.525 = INTEGER: 527
SNMPv2-SMI::mib-2.17.1.4.1.2.526 = INTEGER: 529
SNMPv2-SMI::mib-2.17.1.4.1.2.529 = INTEGER: 535
SNMPv2-SMI::mib-2.17.1.4.1.2.530 = INTEGER: 537
SNMPv2-SMI::mib-2.17.1.4.1.2.531 = INTEGER: 539
SNMPv2-SMI::mib-2.17.1.4.1.2.533 = INTEGER: 546
SNMPv2-SMI::mib-2.17.1.4.1.2.534 = INTEGER: 547
SNMPv2-SMI::mib-2.17.1.4.1.2.535 = INTEGER: 548
SNMPv2-SMI::mib-2.17.1.4.1.2.536 = INTEGER: 549
SNMPv2-SMI::mib-2.17.1.4.1.2.564 = INTEGER: 553
# The correct snmp info about the interface vlan
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3.23.564
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.564 = INTEGER: 3
Netxms instead use the ifindex ( 553 ) so the vlan is not assigned (because not exists in the mapping) or when exists it's wrongly assigned to a different interface:
# Example of an interface incorrectly recognized by netxms:
snmpwalk -v2c -c public 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3.23.534
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.534 = INTEGER: 3
# The wrong assumption
snmpwalk -v2c -c public 172.x.x.x 172.29.1.25 1.3.6.1.2.1.2.2.1.2.534
IF-MIB::ifDescr.534 = STRING: ge-0/0/16
and indeed in my previous post screenshot, the vlan is incorrectly assigned to ge-0/0/16