Administrator Guide
acquire a new IP address, use the renew DHCP command in EXEC Privilege mode or the ip address dhcp command in
INTERFACE Conguration mode.
To manually congure a static IP address on an interface, use the ip address command. A prompt displays to release an existing
dynamically acquired IP address. If you conrm, the ability to receive a DHCP server-assigned IP address is removed.
To enable acquiring a dynamic IP address from a DHCP server on an interface congured with a static IP address, use the ip
address dhcp command. A prompt displays to conrm the IP address reconguration. If you conrm, the statically congured IP
address is released. An error message displays if you enter the release dhcp or renew dhcp commands.
To renew the lease time of the dynamically acquired IP, use the renew dhcp command on an interface already congured with a
dynamic IP address.
NOTE: To verify the currently congured dynamic IP address on an interface, use the show ip dhcp lease
command. The show running-configuration command output only displays ip address dhcp. The currently
assigned dynamic IP address does not display.
To congure and view an interface as a DHCP client to receive an IP address, use the following commands.
1. Enter INTERFACE Conguration mode on an Ethernet interface.
CONFIGURATION mode
interface type slot/port
2. Acquire the IP address for an Ethernet interface from a DHCP network server.
INTERFACE mode
ip address dhcp
Dynamically assigned IP addresses can be released without removing the DHCP client operation on the interface on a switch
congured as a DHCP client.
3. Manually acquire a new IP address from the DHCP server by releasing a dynamically acquired IP address while retaining the
DHCP client conguration on the interface.
EXEC Privilege mode
release dhcp interface type slot/port
4. Acquire a new IP address with renewed lease time from a DHCP server.
EXEC Privilege mode
renew dhcp interface type slot/port
Example of the show ip dhcp client statistics Command
Example of the show ip dhcp lease command
DHCP Client: Debug Messages Logged during DHCP Client Enabling/Disabling
DHCP Client: Debug Messages Logged during DHCP Client Release/Renew
To display DHCP client information, use the following show commands in EXEC Privilege mode.
• To display statistics about DHCP client interfaces, use the show ip dhcp client statistics interface type
slot/port
command.
• To clear DHCP client statistics on a specied or on all interfaces, use the clear ip dhcp client statistics {all |
interface
type slot/port} command.
• To display dynamic IP address lease information currently assigned to a DHCP client interface, use the show ip dhcp lease
[interface type slot/port] command.
• To display log messages for all DHCP packets sent and received on DHCP client interfaces, use the debug ip dhcp client
packets [interface type slot/port] command.
280
Dynamic Host Conguration Protocol (DHCP)