# Monitoring DHCP Binding Host Information

#### Purpose

Display information for specified DHCP client bindings, with results arranged in ascending order by IP address. The show dhcp host command displays information only for DHCP client bindings with assigned IP addresses.

#### Action

To display information about all DHCP local server bindings:

    host1:vr1#show dhcp host local
    BindingId      HwAddress      Type    IpSubnet   IpAddress   State
    ----------   --------------   -----   --------   ---------   -----
    2409734593   8000.0001.9365   local   0.0.0.0    81.3.0.2    bound
    2409734595   8000.0003.9365   local   0.0.0.0    81.3.0.3    bound
    2409734597   8000.0005.9365   local   0.0.0.0    81.3.0.4    bound
    2409734599   8000.0007.9365   local   0.0.0.0    81.3.0.5    bound
    2409734619   8000.0009.9365   local   0.0.0.0    81.3.0.6    bound
    2409734618   8000.000b.9365   local   0.0.0.0    81.3.0.7    bound
    2409734605   8000.000d.9365   local   0.0.0.0    81.3.0.8    bound
    2409734607   8000.000f.9365   local   0.0.0.0    81.3.0.9    bound
    2409734609   8000.0011.9365   local   0.0.0.0    81.3.0.10   bound
    2409734611   8000.0013.9365   local   0.0.0.0    81.3.0.11   bound

The output of the show dhcp host command is identical to the output of the show dhcp binding command except for the order of the client bindings. The results of the show dhcp host command are arranged in ascending order by IP address, whereas the results of the show dhcp binding command are arranged in ascending order by binding ID.

To display binding information for DHCP clients with a specified interface string:

    host1:vr2#show dhcp host interface ip71.*4
    BindingId      HwAddress        Type     IpSubnet   IpAddress   State
    ----------   --------------   --------   --------   ---------   -----
    3053453315   7000.0002.9365   external   0.0.0.0    71.1.0.4    bound
    3053453325   7000.000c.9365   external   0.0.0.0    71.1.0.14   bound
    3053453353   7000.0016.9365   external   0.0.0.0    71.1.0.24   bound

This show dhcp host 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. The results of the show dhcp host command are arranged in ascending order by IP address.

To display binding information for DHCP clients that match the specified circuit ID string:

    host1:vr3#show dhcp host circuit-id \\xe3
    BindingId      HwAddress       Type     IpSubnet   IpAddress   State
    ----------   --------------   -------   --------   ---------   -----
    3070230529   7000.0000.9365   relay-p   0.0.0.0    71.1.0.2    bound
    3070230531   7000.0002.9365   relay-p   0.0.0.0    71.1.0.4    bound
    3070230572   7000.0004.9365   relay-p   0.0.0.0    71.1.0.6    bound
    3070230535   7000.0006.9365   relay-p   0.0.0.0    71.1.0.8    bound
    3070230537   7000.0008.9365   relay-p   0.0.0.0    71.1.0.10   bound
    3070230539   7000.000a.9365   relay-p   0.0.0.0    71.1.0.12   bound
    3070230541   7000.000c.9365   relay-p   0.0.0.0    71.1.0.14   bound
    3070230543   7000.000e.9365   relay-p   0.0.0.0    71.1.0.16   bound
    3070230545   7000.0010.9365   relay-p   0.0.0.0    71.1.0.18   bound
    3070230547   7000.0012.9365   relay-p   0.0.0.0    71.1.0.20   bound
    3070230549   7000.0014.9365   relay-p   0.0.0.0    71.1.0.22   bound
    3070230569   7000.0016.9365   relay-p   0.0.0.0    71.1.0.24   bound
    3070230553   7000.0018.9365   relay-p   0.0.0.0    71.1.0.26   bound
    3070230555   7000.001a.9365   relay-p   0.0.0.0    71.1.0.28   bound
    3070230557   7000.001c.9365   relay-p   0.0.0.0    71.1.0.30   bound

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 host 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 IP address.

To display information about DHCP external server bindings with a specified subnet address:

    host1:vr1#show dhcp host external 0.0.0.0

To display information about DHCP bindings with a specified IP prefix:

    host1:vr1#show dhcp host ip—prefix 10.2.0.0/28

To display information about DHCP relay proxy bindings without a lower-layer interface:

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

To display binding information for DHCP clients that match the specified remote ID string:

    host1:vr1#show dhcp host remote-id “remote id.*west”

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 108 lists the show dhcp host command output fields.

Table 108: show dhcp host Output Fields

Field Name | Field Description
--- | ---
BindingId | Client binding ID
HwAddress | MAC address of client
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
IpAddress | IP address assigned to client
State | State of the DHCP client binding
Server | (Detailed output only) IP address of the DHCP server that allocated the client IP address
Giaddr | (Detailed output only) For DHCP relay proxy the IP address of the DHCP relay proxy; for DHCP local server bindings, the IP address of the DHCP relay that sent the packet or 0.0.0.0 if the packet comes from the client; for DHCP external server bindings, the giaddr from the DHCP packet
Lease | (Detailed output only) Total time for which the IP address is available, in seconds
Remaining | (Detailed output only) Time remaining on the current lease, in seconds
IpInterface | (Detailed output only) IP interface that is associated with the client

#### Related Documentation

- To compare the output of the show dhcp host command and the show dhcp binding command, see Monitoring DHCP Binding Information
- show dhcp host