Show Menu
Cheatography

Cisco IOS DHCP Cheat Sheet by

Cisco IOS DHCP command

To configure DHCP server

Command
Purpose
Device­(co­nfig)# service dhcp
Enables the DHCP server and relay agent on your switch.
Device­(co­nfig)# ip dhcp exclud­ed-­address low-ad­dress [high-­add­ress]
Specifies IP addresses that the DHCP server should not assign to DHCP clients.
Device­(co­nfig)# ip dhcp pool 1
Creates a name for the DHCP server address pool and enters DHCP pool config­uration mode.
Device­(dh­cp-­con­fig)# network 172.20.0.0 /24
Specifies the subnet network number and mask of the DHCP address pool.
Device­(dh­cp-­con­fig)# dns server 8.8.4.4 8.8.8.8
Specifies the IP address of a DNS server that is available to a DHCP client.
Device­(dh­cp-­con­fig)# defaul­t-r­outer 172.16.20.0.1
Specifies the IP address of the default device for a DHCP client.

To display DHCP server inform­ation

Command
Purpose
Device­­> show ip dhcp binding [address]
Displays a list of all bindings created on a specific DHCP server.
Device­­> show ip dhcp conflict [address]
Displays a list of all address conflicts recorded by a specific DHCP server.
Device­­> show ip dhcp server statistics
Displays count inform­ation about server statistics and messages sent and received.

To clear DHCP server variables:

Command
Purpose
Device­# clear ip dhcp binding address | *
Deletes an automatic address binding from the DHCP database. Specifying address clears the automatic binding for a specific (client) IP address whereas specifying asterisk (*) clears all automatic bindings.
Device­# clear ip dhcp conflict address | *
Clears an address conflict from the DHCP database. Specifying address clears the conflict for a specific IP address whereas specifying an asterisk (*) clears conflicts for all addresses.
Device­# clear ip dhcp server statistics
Resets all DHCP server counters to 0.

To enable DHCP server debugging

Command
Purpose
Device­# debug ip dhcp server {events | packets}
Enables debugging on the DHCP server.
           

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Basic Cisco IOS Commands Cheat Sheet
          Cisco 101 Exam #1 Cheat Sheet