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 services dhcp-local-server] hierarchy level, the default tracing behavior is the following:
To trace DHCP local server operations, include the traceoptions statement at the [edit system services dhcp-local-server] hierarchy level:
-
traceoptions {
- file filename <files number> <size size> <world-readable
| no-world-readable> <match regex>;
- flag flag;
- }
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 services dhcp-local-server traceoptions] hierarchy level:
- [edit system services dhcp-local-server traceoptions]
- file filename;
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 services dhcp-local-server traceoptions] hierarchy level:
- [edit system services dhcp-local-server traceoptions]
- file filename files number size size;
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).
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 services dhcp-local-server traceoptions] hierarchy level:
- [edit system services dhcp-local-server traceoptions]
- file filename world-readable;
To set the default behavior explicitly, include the file no-world-readable statement at the [edit system services dhcp-local-server traceoptions] hierarchy level:
- [edit system services dhcp-local-server traceoptions]
- file filename no-world readable;
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 services dhcp-local-server traceoptions] hierarchy level and specifying a regular expression (regex) to be matched:
- [edit system services dhcp-local-server traceoptions]
- file filename match regex;
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 services dhcp-local-server traceoptions] hierarchy level:
- [edit system services dhcp-local-server traceoptions]
- flag flag;
You can configure the following tracing flags: