Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

DHCP Monitoring and Management

Requesting DHCP Local Server to Initiate Reconfiguration of Client Bindings

You can request that the DHCP local server initiate reconfiguration of all of clients or only specified clients.

To request reconfiguration of all clients:

  • Specify the all option.

You can use any of the following methods to request reconfiguration of specific clients:

  • Specify the IP address of the DHCPv4 client.

  • Specify the MAC address of a DHCPv4 client.

  • Specify an interface; reconfiguration is attempted for all clients on this interface.

  • Specify a logical system; reconfiguration is attempted for all clients or the specified clients in this logical system.

  • Specify a routing instance; reconfiguration is attempted for all clients or the specified clients in this routing instance.

Viewing and Clearing DHCP Bindings

This topic provides the procedure you use to display current DHCP bindings, clear selected bindings, and verify that the specified bindings are successfully cleared.

Subscriber management enables you to clear DHCP bindings at several different levels for DHCP local server and DHCP relay agent. For example, you can clear the DHCP bindings on all interfaces, a group of interfaces, or a specific interface. You can also clear DHCP bindings based on IP address, MAC address, session-ID, DHCPv6 prefix, DHCPv6 Client ID, FPC, PIC, port, VLAN, or stacked VLAN (S-VLAN).

This topic includes examples to show several variations of the clear DHCP binding feature. The examples use DHCP local server commands; however, the procedure and commands are similar for DHCP relay agent, DHCPv6 local server, and DHCPv6 relay agent.

To clear bindings and verify the results for a specific IP address:

  1. Display current bindings. Issue the appropriate variation of the show dhcp server binding command.
  2. Clear the binding you want to remove.
  3. Verify that the binding has been cleared.

The following examples show variations of the clear DHCP binding feature. The examples use the DHCP local server version of the commands.

Note:

IP demux interfaces are not supported by the show and clear DHCP bindings commands for DHCP local server and DHCP relay agent.

To clear all bindings:

To clear bindings on a specific interface:

To clear all bindings over an interface. This example uses the wildcard option.

To clear bindings on top of a specific VLAN. This example clears all bindings on top of VLAN 100.

To clear bindings for a specific S-VLAN. This example clears bindings on S-VLAN 100-200.

To clear all bindings on top of all demux VLANs:

To clear all bindings on top of an underlying interface. This example clears the bindings on all demux VLANS on top of interface ae0:

To clear PPP bindings. This example uses the wildcard feature and clears the PPP bindings over interface pp0.100 and pp0.200.

To clear all bindings on an FPC. This example uses the wildcard feature and clears all DHCP bindings on FPC 1.

To clear all bindings on a PIC. This example uses the wildcard feature and clears all DHCP bindings on FPC 1, PIC 0.

To clear all bindings on a port. This example uses the wildcard feature and clears all DHCP bindings on FPC 1, PIC 0, port 0.

Monitoring DHCP Relay Server Responsiveness

You can configure DHCP relay agent and DHCPv6 relay agent to enable the router to monitor DHCP server responsiveness. To monitor DHCP server responsiveness, you specify the length of time during which the router tracks how DHCP servers respond to relayed packets. If a configured DHCP server within the routing instance fails to respond to all relayed packets during the specified time period, the router generates the DH_SVC_EXTERN_SERVER_STATE_CHG system log message. When the DHCP server begins responding successfully, the router generates the log message again to indicate that responsiveness is restored. You can also use show dhcp relay statistics and show dhcpv6 relay statistics commands to display DHCP server responsiveness statistics.

The following procedure describes how to configure DHCP relay agent to enable the router to monitor DHCP server responsiveness. To configure DHCPv6 server responsiveness, include the server-response-time statement at the [edit forwarding-options dhcp-relay] hierarchy level.

To monitor DHCP server responsiveness:

  1. Specify that you want to configure DHCP relay agent.

Verifying DHCP Server Binding and Server Statistics

Purpose

View or clear information about client address bindings and statistics for the extended DHCP local server.

Note:

If you delete the DHCP server configuration, DHCP server bindings might still remain. To ensure that DHCP bindings are removed, issue the clear dhcp server binding command before you delete the DHCP server configuration.

Action

  • To display the address bindings in the client table on the extended DHCP local server:

  • To display extended DHCP local server statistics:

  • To display the address bindings in the client table on the extended DHCP local server at routing-instance level:

  • To display extended DHCP local server statistics at routing-instance level:

  • To clear the binding state of a DHCP client from the client table on the extended DHCP local server at routing-instance level:

  • To clear all extended DHCP local server statistics:

  • To clear the binding state of a DHCP client from the client table on the extended DHCP local server:

  • To clear all extended DHCP local server statistics at routing-instance level:

Verifying and Managing DHCP Relay Configuration

Purpose

View or clear address bindings or statistics for extended DHCP relay agent clients:

Action

  • To display the address bindings for extended DHCP relay agent clients:

  • To display extended DHCP relay agent statistics:

  • To clear the binding state of DHCP relay agent clients:

  • To clear all extended DHCP relay agent statistics:

Tracing Extended DHCP Operations

Both the extended DHCP local server and the extended DHCP relay agent support 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 and DHCP relay:

The tracing configuration is applied globally to all DHCP applications 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, DHCP applications (local server or relay) do not have be configured in the default LS:RI.

Note:

We recommend that you use configure tracing statements at the [edit system processes dhcp-service] hierarchy level.

Because you can configure DHCP tracing at three different hierarchy levels (one new and recommended, two old and deprecated), the following rules apply to manage the interaction:

  • When you configure a filename or any other options for the trace log file, the configuration at the [edit system processes dhcp-service] hierarchy level has the highest precedence, followed by the configuration at the [edit system services dhcp-local-server] hierarchy level, and finally with the lowest precedence, the configuration at the [edit forwarding-options dhcp-relay] hierarchy level.

  • The flag configurations for multiple hierarchy levels are merged and applied to all trace log events.

  • The deprecated statements do not support filtering the generation of DHCP trace log events by severity level. If you use these statements, trace logging operates with an implicit severity of all, regardless of the severity level configured at the [edit system processes dhcp-service] hierarchy level.

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 and DHCP relay agent both support the file option for the traceoptions statement and the interface-traceoptions statement.

To change the filename:

  • Specify a filename for global tracing operations.

  • Specify a filename for per-interface tracing operations.

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 and DHCP relay agent both support 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.

  • Specify the name, number, and size of the file used for the trace output for per-interface tracing operations.

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 and DHCP relay agent both support 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.

  • Configure the log file to be world-readable for per-interface tracing operations.

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.

  • Configure the log file to be no-world-readable for per-interface tracing operations.

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 and DHCP relay agent both support 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.

  • Specify the regular expression for per-interface tracing operations.

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 and DHCP relay agent both support 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.

  • Specify the flags for per-interface tracing operations.

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 and DHCP relay agent both support 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.

  • Specify the severity level for per-interface tracing operations.

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.
      • For DHCP local server, DHCPv6 local server, DHCP relay agent, and DHCPv6 relay agent:

    2. (Optional) Specify the tracing file options.
    3. (Optional) Specify tracing flag options.
    4. (Optional) Configure a severity level for messages to specify which event messages are logged.
  2. Enable tracing on an interface or interface range.

    The following examples show a DHCP local server configuration. You can also use the trace statement at the [edit forwarding-options dhcp-relay] hierarchy level and at the [edit system services dhcp-local-server dhcpv6] hierarchy level.

    • Enable tracing on a specific interface.

    • Enable tracing on a range of interfaces.