27.4. DHCP diagnostics, statistics and debug

27.4.1. DHCP diagnostics

The following commands are used to display diagnostics:

d d dhcp / d de dhcp

It informs about the MODE configuration [RELAY/SERVER], the STATE of the resource [DOWN, INACT, STOP, ACTIVE, ERR] and the current bindings situation.

[17:49:20] ABILIS_CPX:d d dhcp

RES:Dhcp ----------------------------------------------------------------------
       Dynamic_Host_Configuration_Protocol
       MODE:SERVER     STATE:ACTIVE
       - Server Bindings ------------------------------------------------------
       ------- Summary -------|------- Types ---------|------- States ---------
       MAX      |300          |ACT-STATIC  |20        |ACTIVE     |35         |
       USED     |67           |ACT-DYNAMIC |15        |EXPIRED    |32         |
       FREE     |233          |            |          |RELEASED   |0          |
       REUSABLE |32           |ALL-STATIC  |20        |ABANDONED  |0          |
                |             |ALL-DYNAMIC |47        |INCOMPLETE |0          |
                |             |            |          |INVALID    |0          |
       ------------------------------------------------------------------------

27.4.2. DHCP statistics

The following commands are used to display statistics:

d s dhcp / d se dhcp

Statistics are divided between Server mode and Relay mode.

Meaning of the most important statistics about Server mode:

  • REQUESTS: it shows the total number of packets sent from DHCP client to DHCP server.

  • RESPONSES: it shows the total number of packets sent from DHCP server to DHCP client.

  • CHAR: it shows the total number of received (INPUT) and sent (OUTPUT) characters. UDP interface overhead excluded.

  • PCK: it shows the total number of received (INPUT) and sent (OUTPUT) packets.

  • LONG: it shows the total number of lost received (INPUT) and number of not sent (OUTPUT) DHCP packets which are too long for the configured msg-len value from configuration.

  • BAD-FORMAT: it shows the total number of lost received DHCP packets with bad format.

  • UNK-IPP: it shows the total number of received packets with “unknown” IP resource. This situation can occur only for software bugs.

The other statistics are “simple” counters of the relative packets used by DHCP protocols.

Meaning of the most important statistics about Server mode:

  • REQUESTS: it shows the total number of good incoming requests received from client which are suitable for relaying (INPUT) and the total number of requests actually relayed to the servers (OUTPUT). In the case of multiple servers the counter is increased for each of them.

  • RESPONSES: it shows the total number of good incoming responses received from server(s) which are suitable for relaying to the client (INPUT) and the total number of responses actually relayed to the client (OUTPUT).

  • HOP-EXCEED: number of discarded requests because the “hops number” value in the DHCP packet exceeded the threshold. Incremented for client's request that was already relayed by several agents and their count, present in 'hops' field of the received packet, exceeds the threshold configured in MAX-HOPS.

  • BAD-GW: it shows the total number of discarded responses for “not matching” gateway address ('giaddr' field in DHCP packet). Incremented for every server's response packet whose 'giaddr' field value does not match any address of the router's interfaces.

[11:42:10] ABILIS_CPX:d s dhcp

RES:Dhcp ----------------------------------------------------------------------
       Dynamic_Host_Configuration_Protocol                                     
       --- Cleared 0 days 00:32:44 ago, on 05/06/2015 at 09:30:26 -------------
       ------------------------------------------------------------------------
       Server mode
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       REQUESTS   |          4|           |RESPONSES  |           |          0|
       CHAR       |       1200|          0|PCK        |          4|          0|
       LONG       |          0|          0|BAD-FORMAT |          0|           |
       UNK-IPP    |          0|           |           |           |           |
       DISCOVER   |          0|           |OFFER      |           |          0|
       REQUEST    |          0|           |ACK        |           |          0|
       DECLINE    |          0|           |NAK        |           |          0|
       RELEASE    |          0|           |           |           |           |
       INFORM     |          4|           |
       ------------------------------------------------------------------------
       Relay mode
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       REQUESTS   |          0|          0|RESPONSES  |          0|          0|
       HOP-EXCEED |          0|           |BAD-GW     |          0|           |
       ------------------------------------------------------------------------

27.4.3. DHCP debug

The following commands allows to purge INVALID bindings which may appear upon networks configuration changes.

[20:57:46] ABILIS_CPX:_debug res:dhcp

RES:Dhcp ----------------------------------------------------------------------
       Dynamic_Host_Configuration_Protocol                                     
       BufferLength:454    Date/Time:05/06/2015 10:03:54 TraceTime:2010508

Usage:
  LSN:0             - This help
  LSN:1             - Complete debug
  LSN:2             - Statistics
  LSN:3             - DHCP log
  LSN:3  CMD:CLR    - Clear DHCP log
  LSN:4             - Incoming datagrams dump
  LSN:4  CMD:CLR    - Clear incoming datagrams dump
  LSN:5             - Restore host table
  LSN:6  CMD:<MAC>  - Delete INV (invalid) bindings with specified MAC
  LSN:6  CMD:ALL    - Delete ALL INV (invalid) bindings