Bugs on juniper EX

Started by samuelet, January 16, 2023, 05:58:03 PM

Previous topic - Next topic

samuelet

I can confirm that netxms has at least two bugs with juniper EX:
1) Netxms does not correctly recognized vlans on junipers.
I'm not able to identify a specific pattern of the behaviour because wrong vlans are random and it does not depends on firmware or specific model , for example a single interface has sometimes a lot of vlans (like the trunk) when it should be only one, sometimes instead it has wrong vlanid or empty vlans .
2) Netxms does not always recognize Lldp neightbours printing an empty LLDP table in node tools (and obviously macaddr search does not find his neighbours). I'm using this script https://github.com/stanislavb/snmp-lldp to verify that lldp is correctly exported via snmp for those nodes.

I put some data of a juniper for the vlan bug:

snmpwalk -v2c -c community 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.5.1.2
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.2 = STRING: "CP-1"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.3 = STRING: "SSO-1"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.4 = STRING: "SSO-2"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.5 = STRING: "SSO-3"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.6 = STRING: "SSO-4"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.7 = STRING: "SSO-5"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.8 = STRING: "SSO-6"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.9 = STRING: "SSO-7"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.10 = STRING: "SSO-8"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.11 = STRING: "SSO-9"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.12 = STRING: "SSO-10"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.13 = STRING: "SSO-11"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.14 = STRING: "SSO-12"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.15 = STRING: "SSO-13"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.16 = STRING: "SSO-UnautenthicatedDevice"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.17 = STRING: "Example1"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.18 = STRING: " Example2"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.20 = STRING: "default"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.21 = STRING: "n0-1"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.22 = STRING: "n9-1"
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.5.1.2.23 = STRING: "n9-2"

snmpwalk -v2c -c community 172.x.x.x 1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.519 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.521 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.522 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.3.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.3.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.4.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.4.518 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.4.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.520 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.533 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.6.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.6.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.7.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.7.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.8.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.8.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.9.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.9.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.10.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.10.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.11.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.11.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.11.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.12.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.12.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.13.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.13.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.13.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.15.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.15.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.523 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.533 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.514 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.515 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.20.531 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.21.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.21.530 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.21.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.524 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.525 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.526 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.529 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.530 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.22.564 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.516 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.535 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.536 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.564 = INTEGER: 3

snmpwalk -v2c -c community 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

snmpwalk -v2c -c community172.x.x.x 1.3.6.1.2.1.2.2.1.2
IF-MIB::ifDescr.502 = STRING: ge-0/0/0
IF-MIB::ifDescr.504 = STRING: ge-0/0/1
IF-MIB::ifDescr.506 = STRING: ge-0/0/2
IF-MIB::ifDescr.508 = STRING: ge-0/0/3
IF-MIB::ifDescr.510 = STRING: ge-0/0/4
IF-MIB::ifDescr.512 = STRING: ge-0/0/5
IF-MIB::ifDescr.514 = STRING: ge-0/0/6
IF-MIB::ifDescr.516 = STRING: ge-0/0/7
IF-MIB::ifDescr.518 = STRING: ge-0/0/8
IF-MIB::ifDescr.520 = STRING: ge-0/0/9
IF-MIB::ifDescr.522 = STRING: ge-0/0/10
IF-MIB::ifDescr.524 = STRING: ge-0/0/11
IF-MIB::ifDescr.526 = STRING: ge-0/0/12
IF-MIB::ifDescr.528 = STRING: ge-0/0/13
IF-MIB::ifDescr.530 = STRING: ge-0/0/14
IF-MIB::ifDescr.532 = STRING: ge-0/0/15
IF-MIB::ifDescr.534 = STRING: ge-0/0/16
IF-MIB::ifDescr.536 = STRING: ge-0/0/17
IF-MIB::ifDescr.538 = STRING: ge-0/0/18
IF-MIB::ifDescr.540 = STRING: ge-0/0/19
IF-MIB::ifDescr.541 = STRING: ge-0/0/20
IF-MIB::ifDescr.543 = STRING: ge-0/0/21
IF-MIB::ifDescr.544 = STRING: ge-0/0/22
IF-MIB::ifDescr.545 = STRING: ge-0/0/23
IF-MIB::ifDescr.552 = STRING: ge-0/1/3

Some Port configuration not recognized by netxms:

ge-0/1/3 {
description XXXXXXXX;
unit 0 {
family ethernet-switching {
port-mode trunk;
vlan {
members [ 2920 all ];
}
}
}
}

ge-0/0/16 {
unit 0 {
family ethernet-switching {
port-mode access;
vlan {
members n9-2;
}
}
}
}


Screenshot of netxms retrived ifaces and vlans:
Immagine 2022-12-05 155747.png

Victor Kirhenshtein

Hi!

NetXMS server do walk on .1.3.6.1.4.1.2636.3.40.1.5.1.7.1.5 to collect port membership (but result should be the same as walking on .1.3.6.1.4.1.2636.3.40.1.5.1.7.1.3).

In your data port ge-0/1/3 has ifIndex=552, but I don't see it in VLAN port table (there should be entry with OID SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.nnn.552, where nnn is index in VLAN table).

Same for ge-0/0/16: it has ifIndex=534, and it has multiple entries in VLAN port table:
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.2.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.5.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.14.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.16.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.17.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.18.534 = INTEGER: 3
SNMPv2-SMI::enterprises.2636.3.40.1.5.1.7.1.3.23.534 = INTEGER: 3
which corresponds to VLANs CP-1, SSO-3, SSO-12, SSO-UnautenthicatedDevice, Example1, Example2, n9-2.

If this does not correspond to actual device configuration then it looks like device reports incorrect information via SNMP.

Best regards,
Victor


samuelet

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


Victor Kirhenshtein

Thank you for digging this! I just changed Juniper driver to use bridge port number instead of ifIndex to identify ports in VLANs. Fix will be included into release 4.3.1. If you want to test it before release I can provide intermediate build, just let me know what platform you are using.

Best regards,
Victor

samuelet

ok, i can test it in next days. I prefer a deb package for debian 10.
Thanks

Alex Kirhenshtein

Quote from: samuelet on February 07, 2023, 12:36:18 PMok, i can test it in next days. I prefer a deb package for debian 10.
Thanks

Hi

I've pushed 4.3.0.52 to test repo. You can add following source:
deb http://packages.netxms.org/test buster main

samuelet

I confirm it works, for virtual chassis too. Thanks.

Just one request concerning a different issue:
is it possible to add the "vlan view" (in the Topology menĂ¹) also in the node overview tab in order to have a visual display of their port status? The port view does not display vlans, don't know if the reason is that vlans are on logical interfaces or for design.