Interface name of my laptop is not properly advertised in LibreNMS

Hi there,

I have a strange problem with the ethernet interface of my laptop (Dell XPS 15 with Linux Mint 18.1) in LibreNMS. When I start my laptop the interface name in LibreNMS is ‘eth0’. LibreNMS does not draw interface graphics for this interface. When I restart the snmd service on my laptop the proper interface name is polled and interface graphics are drawn.

erik@LAPTOP-ERIK ~ $ snmpwalk -v 2c -c ZGqZZEuBH9 192.168.1.95 | grep -i enx18dbf260f245
iso.3.6.1.2.1.25.4.2.1.5.1413 = STRING: "-d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-enx18dbf260f245.pid -lf /var/lib/NetworkManager/dhclient-"
iso.3.6.1.2.1.55.1.5.1.2.2 = STRING: "enx18dbf260f245"
erik@LAPTOP-ERIK ~ $ sudo service snmpd restart
[sudo] password for erik: 
erik@LAPTOP-ERIK ~ $ snmpwalk -v 2c -c ZGqZZEuBH9 192.168.1.95 | grep -i enx18dbf260f245
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "enx18dbf260f245"
iso.3.6.1.2.1.25.3.2.1.3.262146 = STRING: "network interface enx18dbf260f245"
iso.3.6.1.2.1.25.4.2.1.5.1413 = STRING: "-d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-enx18dbf260f245.pid -lf /var/lib/NetworkManager/dhclient-"
iso.3.6.1.2.1.25.4.2.1.5.2891 = STRING: "--color=auto -i enx18dbf260f245"
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: "enx18dbf260f245"
iso.3.6.1.2.1.55.1.5.1.2.2 = STRING: "enx18dbf260f245"
erik@LAPTOP-ERIK ~ $

I suppose it has something to do with the net-snmp deamon on my laptop but I am not sure where to look. I can’t find where and when the interface name/alias is set.

Thanks for you input.

run poller debug and discovery debug on ports see if anything strange shows.

./poller.php -h HOSTNAME -d -m ports
./discovery.php -h HOSTNAME -d -m ports

The output of these commands don’t show any errors. ‘enx18dbf260f245’ is listed as interface name and interface description. But this is after I have restarted the snmp daemon.

I’d say this is most likely the case of ifIndex value changing and it needs to be rediscovered. You could try changing the default port association mode for that device and set it to something ifName or ifDescr.

Yesterday I updated to 1.34 and now my wireless interface lists two times. The first entry carries the IP address of my LAN port instead of the wireless port:

This is before I restart the snmp daemon on my laptop.

When I do snmpwalk -v 2c -c public 192.168.1.95 | grep -i enx18dbf260f245 on my laptop one of the output lines is: iso.3.6.1.2.1.2.2.1.2.3 = STRING: "enx18dbf260f245", which translates to iso.org.dod.internet.mgmt.mib-2.interfaces.iftable.ifentry.ifdescr.3

So I set the Port Association Mode to “ifDescr”, so it should read ‘enx18dbf260f245’. But after the next polling round only my deactivated wireless interface with the IP address of my LAN port, shows up:

This is the ouput of ‘./poller.php -h laptop_erik -d -m ports’. The strange thing is that ifDescr and ifName both show up in the snmpbulkwalk with the value ‘enx18dbf260f245’.

But when I set Port Association Mode to “ifDescr” or “ifName” the interface ‘enx18dbf260f245’ does not show up. Only the wireless interface with the IP address of my LAN port, shows up.

When I restart the snmp daemon and set Port Association Mode back to ‘ifIndex’ again the wireless interface shows up two times as seen in the first picture. The interface ‘enx18dbf260f245’ does not show up at all.

Will reboot my laptop to see if the exact thing as described above will happen again.

[EDIT]. Rebooted the laptop. But now the interfaces appear as follows in LibreNMS:

I am a bit puzzled here. The first interface shows the name of my wireless interface, with the MAC address of the wireless interface and the graphs of the Ethernet interface. Then second interface shows the name of my wireless interface, with the MAC address of the wireless interface but with the IP address of my LAN interface.

I am beginning to suspect my LAN interface. I have a Dell XPS15 with a external Thunderbolt to Ethernet adapter. This adapter seems still a bit buggy under Linux. Sometimes I have to pull out and reinsert the adapter to get network connection. Maybe this is causing the trouble with the SNMP daemon.

So this is what happens. The event log lines from 10:45:03 - 10:50:11 appear when I start my laptop. When I restart the snmp daemon the eventlog lines 11:20:11 - 11:20:14 appear. Clearly when the snmp daemon is started the wrong interface name is advertised in snmp.

Maybe it is my Linux Mint version. I still have 18.0 installed. It has a rather old 4.4.0 kernel. Maybe this kernel is a bit outdated for my relatively new hardware (Dell XPS 15 9550). When I have a bit of time I will try a version bump from mint 18.0 to 18.3 which has a 4.10 kernel.

My dmesg output however, shows that the lan interface is renamed way before the snmp daemon is started

[ 4.899843] r8152 4-1:1.0 eth0: v1.08.6
[ 5.751696] r8152 4-1:1.0 enx18dbf260f245: renamed from eth0
[ 5.775808] IPv6: ADDRCONF(NETDEV_UP): enx18dbf260f245: link is not ready
[ 5.805620] IPv6: ADDRCONF(NETDEV_UP): enx18dbf260f245: link is not ready
[ 8.107933] IPv6: ADDRCONF(NETDEV_CHANGE): enx18dbf260f245: link becomes ready
[ 626.837156] VBoxNetFlt: attached to ‘enx18dbf260f245’ / 18:db:f2:60:f2:45

If a newer kernel does not help maybe I have to investigate the SNMP daemon and it’s startup process.

Keep you posted.