[Contents] [Prev] [Next] [Index] [Report an Error]

# Monitoring DHCP Binding Information

#### Purpose

Display information for specified DHCP client bindings, with results arranged in ascending order by binding ID.

| Note: The show dhcp binding command replaces the show ip dhcp-external binding, show ip dhcp-external binding-id, and show ip dhcp-local binding commands, which are deprecated and might be removed completely in a future release.

#### Action

To display information about all DHCP local server bindings:

    host1:vr1#show dhcp binding 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
    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
    2409734618   8000.000b.9365   local   0.0.0.0    81.3.0.7    bound
    2409734619   8000.0009.9365   local   0.0.0.0    81.3.0.6    bound

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

To display information about a specific DHCP binding ID:

    host1#show dhcp binding 3070230530
    BindingId:   3070230530
    HwAddress:   7000.0002.9365
    IpSubnet:    0.0.0.0
    IpAddress:   192.168.0.90
    State:       bound
    Type:        relay-p
    Server:      192.168.15.1
    Giaddr:      192.168.0.1
    Lease:       3600
    Remaining:   2079
    IpInterface: GigabitEthernet1/0/1.101
    ClientId:    45-41-48-00-01-70-00-00-02-93-65
    Interface:
    Relay Agent:

    Agent Circuit Id: test circuit id
    Agent Remote Id:  test remote id
    Vendor Specific:  01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10
    Unrecognized:     11-12-13-14-15-16-17-18-19-1a-1b-1c-1d-1e-1f-20

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

    host1:vr2#show dhcp binding 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 binding 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 binding command are arranged in ascending order by binding ID.

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

    host1:vr3#show dhcp binding 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
    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
    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
    3070230569   7000.0016.9365   relay-p   0.0.0.0    71.1.0.24   bound
    3070230572   7000.0004.9365   relay-p   0.0.0.0    71.1.0.6    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 binding 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 information about DHCP local server bindings with a specified subnet address:

    host1:vr1#show dhcp binding local 0.0.0.0

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

    host1:vr1#show dhcp binding ip—prefix 10.1.0.0/28

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

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

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

    host1:vr1#show dhcp binding remote-id “remote id.*even”

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

Table 101: show dhcp binding 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 | IP address of the DHCP server that allocated the client IP address
Giaddr | 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 | Total time for which the IP address is available, in seconds
Remaining | Time remaining on the current lease, in seconds
IpInterface | IP interface that is associated with the client
ClientId | DHCP Option 61 received from the client
Interface | Subinterface for DHCP local server bindings; does not apply to DHCP external server and DHCP relay proxy
Relay Agent | Indicates Relay Agent Information option (option 82)
Agent Circuit Id | Suboption 1 of the DHCP Relay Agent information option
Agent Remote Id | Suboption 2 of the DHCP relay agent information option
Vendor Specific | Suboption 9 of the DHCP relay agent information option

#### Related Topics

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

[Contents] [Prev] [Next] [Index] [Report an Error]