Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Tracing Extended DHCP Operations

    The extended DHCP local server supports tracing operations. DHCP tracing operations track extended DHCP operations and record them in a log file. The error descriptions captured in the log file provide detailed information to help you solve problems.

    You can configure DHCP trace operations at the global level and at the interface level. Global DHCP tracing logs all DHCP-related events, whereas interface-level tracing logs only interface-specific DHCP events. If you configure interface-level trace operations, you can specify tracing for a range of interfaces or an individual interface. However, only a single interface-level log file is supported. That is, you cannot specify different interface-level log files for different interfaces or groups of interfaces.

    By default, nothing is traced. When you enable the tracing operation, the default tracing behavior is as follows:

    • Important events for both global and per-interface tracing are logged in a file located in the /var/log directory. By default, the router uses the filename, jdhcpd. You can specify a different filename, but you cannot change the directory in which trace files are located.
    • When the trace log file filename reaches 128 kilobytes (KB), it is compressed and renamed filename.0.gz. Subsequent events are logged in a new file called filename, until it reaches capacity again. At this point, filename.0.gz is renamed filename.1.gz and filename is compressed and renamed filename.0.gz. This process repeats until the number of archived files reaches the maximum file number. Then the oldest trace file—the one with the highest number—is overwritten.

      You can optionally specify the number of trace files to be from 2 through 1000. You can also configure the maximum file size to be from 10 KB through 1 gigabyte (GB). (For more information about how log files are created, see the System Log Explorer.)

    • By default, only the user who configures the tracing operation can access log files. You can optionally configure read-only access for all users.

    To configure global DHCP tracing operations.

    • Specify tracing operations for DHCP local server:
      [edit system processes dhcp-service]
      user@host# edit traceoptions

    The tracing configuration is applied globally to DHCP local server in every LS:RI. Configuration of event tracing on a per-LS:RI basis is not supported. DHCP tracing is configurable only in the default LS:RI. However, the DHCP local server do not have to be configured in the default LS:RI.

    For information about configuring per-interface tracing options, see Tracing Extended DHCP Operations for Specific Interfaces.

    The extended DHCP traceoptions operations are described in the following sections:

    Configuring the Extended DHCP Log Filename

    By default, the name of the file that records trace output is jdhcpd. You can specify a different name by including the file option. DHCP local server supports the file option for the traceoptions statement and the interface-traceoptions statement.

    To change the filename:

    • Specify a filename for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set file filename
    • Specify a filename for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set file filename

    Configuring the Number and Size of Extended DHCP Log Files

    You can optionally specify the number of compressed, archived trace log files to be from 2 through 1000. You can also configure the maximum file size to be from 10 KB through 1 gigabyte (GB); the default size is 128 kilobytes (KB).

    The archived files are differentiated by a suffix in the format .number.gz. The newest archived file is .0.gz and the oldest archived file is .(maximum number)-1.gz. When the current trace log file reaches the maximum size, it is compressed and renamed, and any existing archived files are renamed. This process repeats until the maximum number of archived files is reached, at which point the oldest file is overwritten.

    For example, you can 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 tracing operation, filename, reaches 2 MB, filename is compressed and renamed filename.0.gz, and a new file called filename is created. When the new filename reaches 2 MB, filename.0.gz is renamed filename.1.gz and filename is compressed and renamed filename.0.gz. This process repeats until there are 20 trace files. Then the oldest file, filename.19.gz, is simply overwritten when the next oldest file, filename.18.gz is compressed and renamed to filename.19.gz.

    DHCP local server supports the files and size options for the traceoptions statement and the interface-traceoptions statement. To configure the number and size of trace files:

    • Specify the name, number, and size of the file used for the trace output for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set file filename files number size maximum-file-size
    • Specify the name, number, and size of the file used for the trace output for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set file filename files number size maximum-file-size

    Configuring Access to the Extended DHCP Log File

    By default, only the user who configures the tracing operation can access the log files. You can enable all users to read the log file and you can explicitly set the default behavior of the log file.

    DHCP local server supports the world-readable option and the no-world-readable option for the traceoptions statement and the interface-traceoptions statement. To specify that all users can read the log file:

    • Configure the log file to be world-readable for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set file filename world-readable
    • Configure the log file to be world-readable for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set file filename world-readable

    To explicitly set the default behavior, in which the log file can only be read by the user who configured tracing:

    • Configure the log file to be no-world-readable for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set file filename no-world-readable
    • Configure the log file to be no-world-readable for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set file filename no-world-readable

    Configuring a Regular Expression for Extended DHCP Messages to Be Logged

    By default, the trace operation output includes all messages relevant to the logged events. You can refine the output by including regular expressions to be matched.

    DHCP local server supports the match option for the traceoptions statement and the interface-traceoptions statement. To configure regular expressions to be matched:

    • Specify the regular expression for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set file filename match regular-expression
    • Specify the regular expression for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set file filename match regular-expression

    Configuring the Extended DHCP Tracing Flags

    By default, only important events are logged. You can specify which events and operations are logged by specifying one or more tracing flags.

    DHCP local server supports the flag option for the traceoptions statement and the interface-traceoptions statement. A smaller set of flags is supported for interface-level tracing than for global tracing. To configure the flags for the events to be logged:

    • Specify the flags for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set flag flag
    • Specify the flags for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set flag flag

    Configuring the Severity Level to Filter Which Extended DHCP Messages Are Logged

    The messages associated with a logged event are categorized according to severity level. You can use the severity level to determine which messages are logged for the event type. A low severity level is less restrictive—filters out fewer messages—than a higher level. When you configure a severity level, all messages at that level and all higher (more restrictive) levels are logged.

    The following list presents severity levels in order from lowest (least restrictive) to highest (most restrictive). This order also represents the significance of the messages; for example, error messages are of greater concern than info messages.

    • verbose
    • info
    • notice
    • warning
    • error

    The severity level that you configure depends on the issue that you are trying to resolve. In some cases you might be interested in seeing all messages relevant to the logged event, so you specify all. You can also specify verbose with the same result, because verbose is the lowest (least restrictive) severity level; it has nothing to do with the terseness or verbosity of the messages. Either choice generates a large amount of output. You can specify a more restrictive severity level, such as notice or info to filter the messages. By default, the trace operation output includes only messages with a severity level of error.

    DHCP local server supports the level option for the traceoptions statement and the interface-traceoptions statement. To configure the flags for the events to be logged:

    • Specify the severity level for global tracing operations.
      [edit system processes dhcp-service traceoptions]
      user@host# set level severity
    • Specify the severity level for per-interface tracing operations.
      [edit system processes dhcp-service interface-traceoptions]
      user@host# set level severity

    Tracing Extended DHCP Operations for Specific Interfaces

    In addition to the global DHCP tracing operations, subscriber management enables you to trace extended DHCP operations for a specific interface or for a range of interfaces.

    Configuring per-interface tracing is a two-step procedure. In the first step, you specify the tracing options that you want to use, such as file information and flags. In the second step, you enable the tracing operation on the specific interfaces.

    To configure per-interface tracing operations:

    1. Specify the tracing options you want to use.

      Note: Per-interface tracing uses the same default tracing behavior as the global extended DHCP tracing operation. The default behavior is described in Tracing Extended DHCP Operations.

      1. Specify that you want to configure per-interface tracing options.
        [edit system processes dhcp-service]
        user@host# edit interface-traceoptions
      2. (Optional) Specify the tracing file options.
      3. (Optional) Specify tracing flag options.

        See Configuring the Extended DHCP Tracing Flags.

      4. (Optional) Configure a severity level for messages to specify which event messages are logged.

        See Configuring the Severity Level to Filter Which Extended DHCP Messages Are Logged.

    2. Enable tracing on an interface or interface range.

      The following examples show a DHCP local server configuration.

      • Enable tracing on a specific interface.
        [edit system services dhcp-local-server]
        user@host# set group group-name interface interface-name trace
      • Enable tracing on a range of interfaces.
        [edit system services dhcp-local-server]
        user@host# set group group-name interface interface-name upto interface interface-name trace

    Modified: 2017-09-13