Brocade MLX routers IPV6 address discovery

Tags: #<Tag:0x00007f3b8f306110> #<Tag:0x00007f3b8f305eb8>

I have some old Brocade NetIron MLXe routers. Librenms recognizes the os as ironware. Most things work fine.

However it does not discover IPV6 addresses correctly.

In discovery/ipv6-addresses.inc.php, the first option is to query ipAddressIfIndex.ipv6. For these routers, this works and returns some values. It fails when you try to get actual values. The routers return ccitt.0 [SNMPv2-SMI::zeroDotZero] for the ipv6_prefixlen oid and 2 [manual] for the ipv6_origin oid, for each of values obtained from ipAddressIfIndex.ipv6.

As a test, If I wrap this first option section with:

if ($device[‘os’] != “ironware”) {
$oids = snmp_walk($device, ‘ipAddressIfIndex.ipv6’, [’-Osq’, ‘-Ln’], ‘IP-MIB’);

} //end foreach
}

and allow it to continue to the second option for device os type ironware, where it tries to discovery with ipv6AddrPfxLength, it works fine.

Is that the best way to achieve this? Perhaps try the second option first?

I see the same thing with my MLXe-4 routers. Rather than the modification @jh1kim suggested, I tested by changing line 50 from:
if (!$oids) {
to:
if (!$oids | $device['os'] == "ironware") {
and that causes it to work correctly.

This seems to be a bug in the device’s SNMP implementation, but it would be nice to correct for it in LibreNMS.

I think I did that to avoid double snmp queries. But, I guess I don’t know if there are “ironware” devices that the first options works fine and the second one doesn’t. In which case, your option would probably work.

Follow up to this. I was testing the change to the discovery/ipv6-addresses.inc.php with “./discovery -h -m ipv6-addresses” and that works fine. It populates the IPv6 table. But, it seems when ./discovery.php is run without “-m ipv6-addresses”, if there are no IPv6 addresss, it does nothing but when there are IPv6 addresses, it deletes them. Setting for ipv6 discovery is set to true: “discovery_modules.ipv6-addresses=true”. Any ideas why that might be happening?