DHCP server detection

I’m not doing something right with the DHCP monitor. I’ve tried configuring OpenNMS to detect DHCP services on the network a handful of times over the last decade but have never been successful.

I’ve checked and UDP port 67/68 is not in use, the OpenNMS server itself has a static IP. I believe I added the parameters correctly to the poller-configuration file for DHCP broadcast detection. The DHCP service I’m interested in monitoring is in the same broadcast domain as the OpenNMS server but DHCP is never detected.

I was actually hoping to use this monitor to detect potential rogue DHCP servers on the network.

Is there some magic button I am forgetting to turn on in order for OpenNMS to detect and monitor DHCP services?

Is there DHCP logging I can monitor at the server perhaps?

Share your config.

I would start by monitoring the traffic to and from OpenNMS on those ports via tcpdump or wireshark while executing the monitor via the Karaf shell, so I can see what the requests and responses look like, or if they’re happening at all.

Thanks for the reply.

This is what I added to poller-configuration.xml:

  <service name="DHCP" interval="300000" user-defined="false" status="on">
     <parameter key="retry" value="2" />
     <parameter key="timeout" value="3000" />
     <parameter key="relayMode" value="false"/>
     <parameter key="extendedMode" value="false"/>
     <parameter key="rrd-repository" value="/var/lib/opennms/rrd/response" />
     <parameter key="rrd-base-name" value="dhcp" />
     <parameter key="ds-name" value="dhcp" />
  </service>

Below in the line added to the monitor section near the end of the poller-configuration.xml

monitor service=“DHCP” class-name=“org.opennms.netmgt.poller.monitors.DhcpMonitor”/>

Not sure why the above isn’t showing up properly here in the discussion when it begins with a <

Do you have the opennms-plugin-protocol-dhcp package installed, which is a requirement.
Also, do you have a DhcpDetector setup in your foreign source definition? If there isn’t a detector defined, the system won’t attempt to poll.

I see I have a few issues.

I don’t have a detector configured for DHCP, I’ll need to add that.

I looked at my apt list and also don’t see the opennms-plugin-protocol-dhcp installed.

I try to install the plugin but get an error. I’m running Ubuntu 20.x. Is there some other way to install this plugin?
sudo apt-get install opennms-plugin-protocol-dhcp
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package opennms-plugin-protocol-dhcp is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
opennms-common

E: Package ‘opennms-plugin-protocol-dhcp’ has no installation candidate

Which version are you running?

Running OpenNMS version 28 from a new install, not upgraded