Feature #8574


Enable AgentX-support in lldpd using GUI

Added by Nicklas Björk over 3 years ago. Updated about 2 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:


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 @@

+$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(

--- /usr/local/pkg/lldpd/ 2018-06-14 11:10:58.582840000 +0200
+++ /usr/local/pkg/lldpd/      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 about 3 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 ( 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 2 years ago

  • Category set to lldpd

Can you submit those patches as a PR?

Actions #4

Updated by Jim Pingle almost 2 years ago

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

Updated by Renato Botelho almost 2 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 Greene about 2 months 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 about 2 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF