# Monitoring DHCP Relay Statistics

#### Purpose

Display DHCP packet error and relay agent option statistics that are reported for both DHCP relay and DHCP relay proxy, and also to display DHCP server statistics related only to DHCP relay.

| Note: The show dhcp relay proxy statistics command displays additional DHCP statistics that the router reports only for DHCP relay proxy.

#### Action

To display DHCP relay statistics:

    host1# show dhcp relay statistics
                           DHCP Relay Statistics
                           ---------------------
                             Statistic                            Values
    -----------------------------------------------------------   ------
    Packet error statistics (standard & proxy modes):
      dropped discover packets, no resources                      0
      dropped dhcp packets, no resources                          0
      dropped bad message operation packets                       0
      dropped unknown message type request packets                0
      dropped unknown message type reply packets                  0
    Packet Pacing Algorithm (standard & proxy modes):
      Speed up pacer                                              0
      Slow down pacer                                             0
      Current client pps                                          1024
    Relay Agent Option statistics (standard & proxy modes):
      add Relay Agent Option circuit ID suboption                 On
      add Relay Agent Option remote ID suboption                  On
      packets with giaddr override                                0
      packets with Relay Agent Option override                    2
      packets forwarded with Relay Agent Option already present   4
      dropped packets with Relay Agent Option already present     3
      dropped giaddr spoof packets                                0
    DHCP server statistics (standard mode only):
      dropped duplicate request packets                           12
      packets transmitted to servers                              38
      packets received from servers                               26
      dropped unknown xid reply packets                           0
      dropped stale request packets                               12

To display detailed statistics for DHCP relay only, use the optional detail keyword—this command displays DHCP server statistics and dropped unknown message type reply packets statistics:

    host1# show dhcp relay statistics detail
                         DHCP Relay Detail Statistics
                         ----------------------------
                 Statistics                10.10.1.1  192.168.32.12   192.168.32.1
    ------------------------------------   ---------  -------------   ------------
    Dropped unknown message type replies   0          0               0
    Dropped duplicate requests             6          6               0
    Packets transmitted to server          6          6               26
    Packets received from server           0          0               26
    Dropped unknown xids replies           0          0               0
    Dropped stale requests                 6          6               0

#### Meaning

Table 122 lists the show dhcp relay statistics command output fields.

Table 122: show dhcp relay statistics Output Fields

Field Name | Field Description
--- | ---
Packet error statistics (standard & proxy modes)
dropped discover packets, no resources | Number of received DHCP relay discover messages that were discarded because of lack of resources
dropped dhcp packets, no resources | Number of received DHCP relay messages, other then discover messages, that were discarded because of lack of resources
dropped bad message operation packets | Number of received DHCP relay messages that were discarded because their message operation (for example, bootrequest, bootreply) was unknown, possibly due to corruption
dropped unknown message type request packets | Number of received DHCP relay request messages that were discarded because their message type (for example, discover, offer-request) was unknown, possibly due to corruption
dropped unknown message type reply packets | Number of received DHCP relay reply messages that were discarded because their message type (for example, offer, ack) was unknown, possibly due to corruption
Packet Pacing Algorithm (standard & proxy modes)
Speed up pacer | Number of times the DHCP relay increased the rate of client packets processed
Slow down pacer | Number of times the DHCP relay decreased the rate of client packets processed
Current client pps | Rate of client packets processed per second
Relay Agent Option statistics (standard & proxy modes)
add Relay Agent Option circuit ID suboption | Status of circuit ID suboption, on or off
add Relay Agent Option remote ID suboption | Status of remote ID suboption, on or off
packets with giaddr override | Number of received DHCP relay requests whose giaddr field is overridden with IP address 0.0.0.0
packets with Relay Agent Option override | Number of received DHCP relay requests whose relay agent information option is overridden with an option string created by this relay agent
packets forwarded with Relay Agent Option already present | Number of received DHCP relay requests already containing the relay agent information option that were forwarded to DHCP servers
dropped packets with Relay Agent Option already present | Number of received DHCP relay requests that were discarded because they already contained the relay agent information option when this relay agent was configured to insert the option
dropped giaddr spoof packets | Number of received DHCP relay requests that were discarded because the gateway IP address field already contained this relay agent’s IP address
DHCP server statistics (standard mode only)
dropped duplicate request packets | Number of received DHCP relay requests that were discarded because they have a matching server address and XID of an outstanding DHCP server request
packets transmitted to servers | Number of DHCP relay requests successfully transmitted to DHCP servers
packets received from servers | Number of DHCP relay replies successfully received from DHCP servers
dropped unknown xid reply packets | Number of DHCP relay replies received from DHCP servers that were discarded because their server address and XID do not match an outstanding DHCP server request
dropped stale request packets | Number of DHCP relay requests sent to DHCP servers that were discarded because their replies timed out

#### Related Topics

- show dhcp relay statistics