# Monitoring DHCP Binding Count Information

#### Purpose

Display count information for DHCP client bindings and interfaces.

#### Action

To display count information for all DHCP client bindings and interfaces:

    host1:vr1#show dhcp count
                                                 Assigned    Bound
      Type     IpSubnet   Interfaces   Clients   Clients    Clients
    --------   --------   ----------   -------   --------   -------
    external   0.0.0.0    30           30        30         30
    relay-p    0.0.0.0    2            30        30         30

To display count information for DHCP client bindings and interfaces with the specified interface string:

    host1:vr2#show dhcp count interface ip71.*4
                                                 Assigned    Bound
      Type     IpSubnet   Interfaces   Clients   Clients    Clients
    --------   --------   ----------   -------   --------   -------
    external   0.0.0.0    3            3         3          3

This show dhcp count command uses the * (asterisk) regular expression metacharacter in the interface string to display information for DHCP client bindings on virtual router vr2 with an IP address beginning with 71 and ending with 4.

To display count information for DHCP client bindings and interfaces that match the specified circuit ID string:

    host1:vr3#show dhcp count circuit-id \\xe3
                                                Assigned    Bound
     Type     IpSubnet   Interfaces   Clients   Clients    Clients
    -------   --------   ----------   -------   --------   -------
    relay-p   0.0.0.0    1            15        15         15

To specify nonprintable byte codes in the circuit ID string or remote ID string, you can use the string \\xab, where ab is a hex code of the byte. This show dhcp count command uses the string \\xe3 to represent byte E3 in the circuit ID string. This command displays information for the DHCP client bindings on virtual router vr3 with the specified circuit ID string, with results arranged in ascending order by binding ID.

To display count information for DHCP local server client bindings and interfaces with a specified subnet address:

    host1:vr1#show dhcp count local 0.0.0.0

To display count information for DHCP client bindings and interfaces with a specified IP prefix:

    host1:vr1#show dhcp count ip—prefix 71.1.0.0/28

To display count information for DHCP relay proxy client bindings without a lower-layer interface:

    host1:vr1#show dhcp count relay—proxy no-interface

To display count information for DHCP client bindings that match the specified remote ID string:

    host1:vr1#show dhcp count remote-id “remote id.*odd”

Filtering the display of DHCP client bindings by the circuit ID string or remote ID string is not supported for the DHCP external server application. DHCP external server does not store information about the agent-circuit-id suboption or agent-remote-id suboption of option 82.

#### Meaning

Table 107 lists the show dhcp count command output fields.

Table 107: show dhcp count Output Fields

Field Name | Field Description
--- | ---
Type | Binding type; external (DHCP external server), local (DHCP local server), or relay-p (DHCP relay proxy)
IpSubnet | For DHCP local server bindings, the subnet of the IP address assigned to the client; 0.0.0.0 for DHCP external server and DHCP relay proxy bindings
Interfaces | Number of interfaces associated with this binding type; includes the number of DHCP client bindings without a lower-layer interface, if configured
Clients | Number of DHCP clients associated with this binding type
Assigned Clients | Number of DHCP clients with an assigned IP address
Bound Clients | Number of DHCP clients in a bound state

#### Related Documentation

- show dhcp count