Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Verifying DHCP Server Configuration

date_range 06-Dec-23

This topic discusses on various steps involved in verifying the DHCP server configuration.

Verifying DHCP Server Binding and Server Statistics

Purpose

View or clear information about client address bindings and statistics for the extended DHCP local server.

Note:

If you delete the DHCP server configuration, DHCP server bindings might still remain. To ensure that DHCP bindings are removed, issue the clear dhcp server binding command before you delete the DHCP server configuration.

Action

  • To display the address bindings in the client table on the extended DHCP local server:

    content_copy zoom_out_map
    user@host> show dhcp server binding 
    
  • To display extended DHCP local server statistics:

    content_copy zoom_out_map
    user@host> show dhcp server statistics routing-instance customer routing instance
    
  • To display the address bindings in the client table on the extended DHCP local server at routing-instance level:

    content_copy zoom_out_map
    user@host> show dhcp server binding routing-instance customer routing instance
    
  • To display extended DHCP local server statistics at routing-instance level:

    content_copy zoom_out_map
    user@host> show dhcp server statistics routing-instance customer routing instance
    
  • To clear the binding state of a DHCP client from the client table on the extended DHCP local server at routing-instance level:

    content_copy zoom_out_map
    user@host> clear dhcp server binding routing-instance customer routing instance
    
  • To clear all extended DHCP local server statistics:

    content_copy zoom_out_map
    user@host> clear dhcp server statistics 
    
  • To clear the binding state of a DHCP client from the client table on the extended DHCP local server:

    content_copy zoom_out_map
    user@host> clear dhcp server binding 
    
  • To clear all extended DHCP local server statistics at routing-instance level:

    content_copy zoom_out_map
    user@host> clear dhcp server statistics routing-instance customer routing instance
    

Viewing DHCP Bindings (Legacy DHCP)

Use the CLI command show system services dhcp binding to view information about DHCP address bindings, lease times, and address conflicts.

The following example shows the binding type and lease expiration times for IP addresses configured on a router that supports a DHCP server:

content_copy zoom_out_map
user@host> show system services dhcp binding
IP Address       Hardware Address     Type    Lease expires at
192.168.1.2      00:a0:12:00:12:ab       static      never
192.168.1.3      00:a0:12:00:13:02       dynamic     2004-05-03 13:01:42 PDT

Enter an IP address to show binding for a specific IP address:

content_copy zoom_out_map
user@host> show system services dhcp binding 192.168.1.3
DHCP binding information:
IP address      192.168.1.3
Hardware address      00:a0:12:00:12:ab
Client identifier
61 63 65 64 2d 30 30 3a 61 30 3a 31 32 3a 30 30 aced-00:a0:12:00
3a 31 33 3a 30 32
Lease information:
Type       dynamic
Obtained at       2004-05-02 13:01:42 PDT
Expires at       2004-05-03 13:01:42 PDT

Use the detail option to show detailed binding information:

content_copy zoom_out_map
user@host> show system services dhcp binding detail
DHCP binding information:
IP address                 192.168.1.3
Hardware address           00:a0:12:00:12:ab
Pool                       192.168.1.0/24
Interface                  fe-0/0/0, relayed by 192.168.4.254
Lease information:
Type                       dynamic
Obtained at                2004-05-02 13:01:42 PDT
Expires at                 2004-05-03 13:01:42 PDT
DHCP options:
name-server foo.mydomain.tld
domain-name mydomain.tld
option 19 flag off

Viewing DHCP Address Pools (Legacy DHCP)

Use the CLI show system services dhcp pool command to view information about DHCP address pools.

The following example show address pools configured on a DHCP server:

content_copy zoom_out_map
user@ host> show system services dhcp pool
Pool name        Low address     High address     Excluded addresses
10.40.1.0/24     10.40.1.1       10.40.1.254      10.40.1.254

Viewing and Clearing DHCP Conflicts (Legacy DHCP)

When a client receives an IP address from the DHCP server, the client performs a series of ARP tests to verify that the IP address is available and no conflicts exist. If the client detects an address conflict, the client notifies the DHCP server about the conflict and may request another IP address from the DHCP server.

The DHCP server keeps a log of all conflicts and removes addresses with conflicts from the pool. These addresses remain excluded until you manually clear the conflicts list with the clear system services dhcp conflict command. Use the CLI command show system services dhcp conflict to show conflicts.

content_copy zoom_out_map
user@host> show system services dhcp conflict
Detection time                  Detection method       Address
2004-08-03 19:04:00 PDT         client      192.168.1.5
2004-08-04 04:23:12 PDT         ping      192.168.1.8

Use the clear system services dhcp conflicts command to clear the conflicts list and return IP addresses to the pool. The following command shows how to clear an address on the server that has a conflict:

content_copy zoom_out_map
user@host> clear system services dhcp conflict 192.168.1.5

For more information about CLI commands you can use with the DHCP server, see the CLI Explorer.

footer-navigation