Project

General

Profile

Actions

Feature #8574

closed

Enable AgentX-support in lldpd using GUI

Added by Nicklas Björk over 6 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
lldpd
Target version:
-
Start date:
06/14/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:

Description

The lldpd-package provided by the package manager seems to be compiled with AgentX-support, but there is nowhere to activate it using the GUI. An AgentX sub-agent can connect to Net-SNMP and would in this case make LLDP-information available over SNMP.

In the Net-SNMP configuration, AgentX has to be enabled. I suppose this could also be added as a GUI option in the Net-SNMP package, but can for now be added to the Custom Options.

master agentx

I made the following changes, which will add the flag -x to the lldpd command line:

--- /usr/local/www/lldpd_settings.php.orig      2018-06-14 11:06:34.932043000 +0200
+++ /usr/local/www/lldpd_settings.php   2018-06-14 11:22:26.464359000 +0200
@@ -63,6 +63,7 @@
                $lldpd = array();
                $lldpd['enable'] = $pconfig['enable'];
                $lldpd['receiveonly'] = $pconfig['receiveonly'];
+               $lldpd['agentx'] = $pconfig['agentx'];
                $lldpd['interfaces'] = $pconfig['interfaces'];
                $lldpd['chassis'] = $pconfig['chassis'];
                $lldpd['management'] = $pconfig['management'];
@@ -150,6 +151,13 @@
        $pconfig['receiveonly']
 ));

+$section->addInput(new Form_Checkbox(
+       'agentx',
+       'Enable AgentX',
+       'With this option, lldpd will enable an SNMP subagent using AgentX protocol',
+       $pconfig['agentx']
+));
+
 $section->addInput(new Form_Select(
        'interfaces_a',
        'Interfaces',

--- /usr/local/pkg/lldpd/lldpd.inc.orig 2018-06-14 11:10:58.582840000 +0200
+++ /usr/local/pkg/lldpd/lldpd.inc      2018-06-14 11:11:41.649295000 +0200
@@ -155,6 +155,10 @@
                }
        }

+       if ($lldpd_config['agentx'] == 'yes') {
+               $cmd .= ' -x';
+       }
+
        /* Write the rc script */
        $start = "      $cmd";
        $stop = "       /usr/bin/killall -q lldpd";

LLDP information can then be queried using the LLDP-MIB tree at .1.0.8802.1.1.2.

Actions #1

Updated by Jon Gerdes almost 6 years ago

The above patch works for me. The Net-SNMP package already adds "master agentx" to /var/etc/netsnmpd.conf by default.

(Edit) - Applied the above patches by hand to three pfSense boxes (all 2.4.something) now. Netdisco (http://netdisco.org/) is happy with the results and shows links. To be honest, the net-snmp package is far better than the built in SNMP GUI and might be worth considering becoming the default or ditch the built in package.

Actions #2

Updated by Jim Pingle over 5 years ago

  • Category set to lldpd

Can you submit those patches as a PR?

Actions #4

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Pull Request Review
Actions #5

Updated by Renato Botelho over 4 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

Actions #6

Updated by Jordan G almost 3 years ago

with lldpd v0.9.11 and net-snmp v0.1.5_9 installed, lldpd settings offers enable agentx option

Actions #7

Updated by Jim Pingle almost 3 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF