SNMP ifDescr shows device name not description

Started by Isabella Borgward, November 22, 2023, 07:08:01 PM

Previous topic - Next topic
Can the interface descriptions seen with SNMP be synced with what is in the web interface?
Eg every interface is seen as the device name:


RFC1213-MIB::ifDescr.1 = STRING: "igb0"
RFC1213-MIB::ifDescr.2 = STRING: "igb1"
RFC1213-MIB::ifDescr.3 = STRING: "igb2"
RFC1213-MIB::ifDescr.4 = STRING: "igb3"
RFC1213-MIB::ifDescr.5 = STRING: "igb4"


but in UI we have the Identifier and Description values which would be more useful than the device name. Running OpnSense on a variety of hardware means that different systems show different names, even though all systems may have LAN, WAN1, WAN2, etc.

Adding VLANs has caused some of the interface indices to be shuffled around. This makes review of historical data difficult. Back in the days of Cisco IOS there was a 'snmp ifindex persist' config parameter [or something like that] that would prevent this. Is there an equivalent in OpnSense?


No, you are not :)

Quote from: Isabella Borgward on November 23, 2023, 11:15:15 AM
Adding VLANs has caused some of the interface indices to be shuffled around. This makes review of historical data difficult. Back in the days of Cisco IOS there was a 'snmp ifindex persist' config parameter [or something like that] that would prevent this. Is there an equivalent in OpnSense?

See this Server Fault discussion:
QuoteShort answer, the SNMP RFCs do not require ifIndex persistence between network manager reinitialization. net-snmp does not provide any special facility to provide this functionality.

One possible solution is to use management software that can cope with the ifindex table changing on each reboot like Observium or LibreNMS.

Quote from: Isabella Borgward on November 23, 2023, 11:15:15 AM
Can the interface descriptions seen with SNMP be synced with what is in the web interface?

Similar to your other question this would at a first glance require extensive modification of a 3rd party module (net-snmp) and is probably outside of the scope of the OPNsense project.

Observium (again) provides scripts to e.g. autodetect the distribution a system is running and different other data including interface descriptions (named aliases in Linux) - but most of them are pretty Linux centric and probably need some adjustment. I'll see what I come up with since I have been toying with Observium and SNMP in my home lab for the last two weeks, anyway.

Kind regards,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

OK, so that Observium page shows that this is all "doable" with Net-SNMP, so I am not going to lose hope just yet.

From this thread:
https://forum.opnsense.org/index.php?topic=33481

I got bsnmpd working, and now Zabbix is picking up readable interface names :)

If you intend to run Observium on FreeBSD there's a howto for that:

https://github.com/pmhausen/observium-freebsd-install
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)