Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Monitoring the DHCP Server Configuration

This topic discusses about how to trace various DHCP operations in a DHCP server. You can use various trace options discussed in this topic to troubleshoot any issues that arise in the DHCP server. For more information, read this topic.

Tracing DHCP Local Server Operations

The extended DHCP tracing operations track the extended DHCP local server operations and record them in a log file. By default, no extended DHCP local server processes are traced. If you include the traceoptions statement at the [edit system processes dhcp-service] hierarchy level, the default tracing behavior is the following:

  • Important extended DHCP local server events are logged in a file called jdhcpd located in the /var/log directory.

  • When the file jdhcpd reaches 128 kilobytes (KB), it is renamed jdhcpd.0, then jdhcpd.1, and so on, until there are three trace files. Then the oldest trace file (jdhcpd.2) is overwritten. For more information about how log files are created, see the Junos System Log Messages Reference.

  • Log files can be accessed only by the user who configures the tracing operation.

To trace DHCP local server operations, include the traceoptions statement at the [edit system processes dhcp-service] hierarchy level:

The following topics describe the tracing operation configuration statements:

Configuring the Filename of the DHCP Local Server Processes Log

By default, the name of the file that records trace output is jdhcpd. You can specify a different name by including the file statement at the [edit system processes dhcp-service traceoptions] hierarchy level:

Configuring the Number and Size of DHCP Local Server Processes Log Files

By default, when the trace file reaches 128 kilobytes (KB) in size, it is renamed jdhcpd.0, then jdhcpd.1, and so on, until there are three trace files. Then the oldest trace file (jdhcpd.2) is overwritten.

You can configure the limits on the number and size of trace files by including the following statements at the [edit system processes dhcp-service traceoptions] hierarchy level:

For example, set the maximum file size to 2 MB, and the maximum number of files to 20. When the file that receives the output of the tracking operation (jdhcpd) reaches 2 MB, jdhcpd is renamed jdhcpd.0, and a new file called jdhcpd is created. When the new jdhcpd reaches 2 MB, jdhcpd.0 is renamed jdhcpd.1 and filename is renamed jdhcpd.0. This process repeats until there are 20 trace files. Then the oldest file (jdhcpd.19) is overwritten by the newest file (jdhcpd.0).

The number of files can be from 2 through 1000 files. The file size of each file can be from 10KB through 1 gigabyte (GB).

Configuring Access to the Log File

By default, log files can be accessed only by the user who configures the tracing operation.

To specify that any user can read all log files, include the file world-readable statement at the [edit system processes dhcp-service traceoptions] hierarchy level:

To set the default behavior explicitly, include the file no-world-readable statement at the [edit system processes dhcp-service traceoptions] hierarchy level:

Configuring a Regular Expression for Lines to Be Logged

By default, the trace operations output includes all lines relevant to the logged events.

You can refine the output by including the match statement at the [edit system processes dhcp-service traceoptions] hierarchy level and specifying a regular expression (regex) to be matched:

Configuring Trace Option Flags

By default, only important events are logged. You can configure the trace operations to be logged by including extended DHCP local server tracing flags at the [edit system processes dhcp-service traceoptions] hierarchy level:

You can configure the following tracing flags:

  • all—Trace all operations.

  • auth—Trace authentication operations.

  • database—Trace database events.

  • fwd—Trace firewall process events.

  • general—Trace miscellaneous events.

  • ha—Trace high availability-related events.

  • interface—Trace interface operations.

  • io—Trace I/O operations.

  • packet—Trace packet decoding operations.

  • performance—Trace performance measurement operations.

  • profile—Trace profile operations.

  • rpd—Trace routing protocol process events.

  • rtsock—Trace routing socket operations.

  • session-db—Trace session database operations.

  • state—Trace changes in state.

  • statistics—Trace baseline statistics.

  • ui—Trace user interface operations.