Configuring DHCP

Configuration Examples

Command

Purpose

 

 

 

Router#

clear ip dhcp server statistics

Resets all DHCP Server counters to 0.

 

 

 

Router#

clear ip route [vrf vrf-name]dhcp

Removes routes from the routing table added by the Cisco IOS DHCP

[ip-address]

Server and Relay Agent for the DHCP clients on unnumbered

 

 

interfaces.

 

 

 

To enable DHCP Server debugging, use the following command in privileged EXEC mode:

Command

Purpose

 

 

Router# debug ip dhcp server {events packets linkage}

Enables debugging on the DHCP Server.

 

 

To display DHCP Server information, use the following commands in EXEC mode, as needed:

Command

Purpose

 

 

Router# show ip dhcp binding [address]

Displays a list of all bindings created on a specific DHCP Server.

 

Use the show ip dhcp binding to display the lease expiration time

 

and date of the IP address of the host and the number. You can also

 

use this command to display the IP addresses that have already

 

been assigned.

 

 

Router# show ip dhcp conflict [address]

Displays a list of all address conflicts recorded by a specific DHCP

 

Server.

 

 

Router# show ip dhcp database [url]

Displays recent activity on the DHCP database.

 

Note Use this command in privileged EXEC mode.

 

 

Router# show ip dhcp server statistics

Displays count information about server statistics and messages sent

 

and received.

 

 

Router# show ip dhcp import

Displays the option parameters that were imported into the DHCP

 

Server database. Imported option parameters are not part of the router

 

configuration and are not saved in NVRAM.

 

 

Router# show ip route [vrf vrf-name]dhcp

Displays the routes added to the routing table by the Cisco IOS DHCP

[ip-address]

Server and Relay Agent.

 

 

Configuration Examples

This section provides the following configuration examples:

DHCP Database Agent Configuration Example

DHCP Address Pool Configuration Example

Manual Bindings Configuration Example

Cisco IOS DHCP Client Example

DHCP Server Options Import and Autoconfiguration Example

Cisco IOS IP Configuration Guide

IPC-76

Page 122
Image 122
Cisco Systems 78-11741-02 manual Configuration Examples, IPC-76