DHCP Configuration

From OpenNMS

Introduction

DHCP is one of the services that can be discovered by capsd and polled by the poller. With the default configuration, discovery and polling are limited in scope - typically to the same subnet on which the opennms system resides. Additional options beginning with version 1.2.1 allow for broader functionality.

Configuring DHCP

The configuration file etc/dhcpd-configuration.xml with optional parameters looks like this:

<DhcpdConfiguration
       port="5818"
       macAddress="00:06:0D:BE:9C:B2"
       myIpAddress="127.0.0.1"
       extendedMode="false"
       requestIpAddress="127.0.0.1">
</DhcpdConfiguration>

The port and macAddress options were there before, but now you can add myIpAddress, extendedMode and a requestIpAddress.

With the default configuration, the DHCP poller should act as before (although on my test network it now correctly sees that my Airport Express does not have a DHCP server on it that is accessible from the "wired" side*). This is "broadcast" mode.

The following describes each of the new variables:

myIpAddress: This parameter will usually be set to the ip address of the OpenNMS server, which puts the DHCP poller in "relay" mode as opposed to "broadcast" mode. In "relay" mode, the DHCP server being polled will unicast its responses directly back to the ip address specified by myIpAddress rather than broadcasting its responses. This allows DHCP servers to be polled even though they are not on the same subnet as the OpenNMS server, and without the aid of an external relay.

usage: myIpAddress="10.11.12.13" or myIpAddress="broadcast" (default)

extendedMode: When extendedMode is false, the DHCP poller will send a DISCOVER and expect an OFFER in return. When extendedMode is true, the DHCP poller will first send a DISCOVER. If no valid response is received it will send an INFORM. If no valid response is received it will then send a REQUEST. OFFER, ACK, and NAK are all considered valid responses in extendedMode.

usage: extendedMode="true" or extendedMode="false" (default)

requestIpAddress: This parameter only applies to REQUEST queries sent to the DHCP server when extendedMode is true. If an ip address is specified, that ip address will be requested in the query. If "targetHost" is specified, the DHCP server's own ip address will be requested. Since a well-managed server will probably not respond to a request for its own ip, this parameter can also be set to "targetSubnet". This is similar to "targetHost" except the DHCP server's ip address is incremented or decremented by 1 to obtain an ip address that is on the same subnet. (The resulting address will not be on the same subnet if the DHCP server's subnet is a /32 or /31. Otherwise, the algorithm used should be reliable.)

usage: requestIpAddress="10.77.88.99" or requestIpAddress="targetHost" or requestIpAddress="targetSubnet" (default)

Caution on usage: If in extended mode, the time required to complete the poll for an unresponsive node is increased by a factor of 3. Thus it is a good idea to limit the number of retries to a small number.

* comment by Tarus

Version History/Availability

Personal tools
DevJam 2008 Sponsors
DevJam 2008 Sponsor: Google
DevJam 2008 Sponsor: Netregistry
DevJam 2008 Sponsor: Papa John's
NewEdge Networks
OpenNMS takes home the gold award!
Join the Free Software Foundation
Support This Project Commercial OpenNMS Support OpenNMS Italia Get OpenNMS at SourceForge.net. Fast, secure and Free Open Source software downloads Our Network Simulator Our Java Profiler