Table Of Contents
DHCP Release and Renew CLI in EXEC Mode
Prerequisites for DHCP Release and Renew CLI in EXEC Mode
Restrictions for DHCP Release and Renew CLI in EXEC Mode
Information About DHCP Release and Renew CLI in EXEC Mode
Benefits of the DHCP Release and Renew CLI in EXEC Mode Feature
DHCP Release and Renew CLI Operation
How to Enable DHCP Release and Renew CLI in EXEC Mode
Enabling DHCP Release and Renew CLI in EXEC Mode
Configuration Examples for DHCP Release and Renew CLI in EXEC Mode
DHCP Release and Renew CLI in EXEC Mode
The DHCP Release and Renew CLI in EXEC Mode feature provides the ability to perform two independent operations from the command-line interface (CLI):
•
Immediately release a Dynamic Host Configuration Protocol (DHCP) lease for a DHCP client.
•
Force a DHCP renewal of a lease for a DHCP client.
Feature History for the DHCP Release and Renew CLI in EXEC Mode Feature
Release Modification12.3(4)T
This feature was introduced.
12.2(27)SBA
This feature was integrated into Cisco IOS Release 12.2(27)SBA.
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Prerequisites for DHCP Release and Renew CLI in EXEC Mode
•
Restrictions for DHCP Release and Renew CLI in EXEC Mode
•
Information About DHCP Release and Renew CLI in EXEC Mode
•
How to Enable DHCP Release and Renew CLI in EXEC Mode
•
Configuration Examples for DHCP Release and Renew CLI in EXEC Mode
Prerequisites for DHCP Release and Renew CLI in EXEC Mode
Before you use the DHCP Release and Renew CLI in EXEC Mode feature, the DHCP client must be assigned an IP address by the DHCP server.
Restrictions for DHCP Release and Renew CLI in EXEC Mode
If the DHCP client is not assigned an IP address by the DHCP server, the DHCP Release and Renew CLI commands will fail.
Information About DHCP Release and Renew CLI in EXEC Mode
Before using the DHCP Release and Renew CLI in EXEC Mode feature, you should understand the following concepts:
•
Benefits of the DHCP Release and Renew CLI in EXEC Mode Feature
•
DHCP Release and Renew CLI Operation
Benefits of the DHCP Release and Renew CLI in EXEC Mode Feature
The DHCP Release and Renew CLI in EXEC Mode feature provides the ability to perform two independent operations from the CLI:
•
Immediately release a Dynamic Host Configuration Protocol (DHCP) lease for a DHCP client.
•
Force a DHCP renewal of a lease for a DHCP client.
The DHCP Release and Renew CLI in EXEC Mode feature provides the following benefits:
•
Eliminates the need to go into the configuration mode to reconfigure the router to release or renew a DHCP lease.
•
Simplifies the release and renewal of a DHCP lease.
•
Reduces the amount of time spent performing DHCP IP release and renewal configuration tasks.
DHCP Release and Renew CLI Operation
Release a DHCP Lease
The release dhcp command starts the process to immediately release a DHCP lease for the specified interface. After the lease is released, the interface address is deconfigured. The release dhcp command does not deconfigure the ip address dhcp command specified in the configuration file for the interface. During a write memory or show running configuration file action, or if the router is rebooted, the ip address dhcp command executes to acquire a DHCP address for the interface.
The original IP address for the interface must be assigned by the DHCP server. If the interface is not assigned an IP address by the DHCP server, the release dhcp command fails and displays the following error message:
Interface does not have a DHCP originated address
Renew a DHCP Lease
The renew dhcp command advances the DHCP lease timer to the next stage, at which point one of the following occurs:
•
If the lease is currently in a BOUND state, the lease is advanced to the RENEW state and a DHCP RENEW request is sent.
•
If the lease is currently in a RENEW state, the timer is advanced to the REBIND state and a DHCP REBIND request is sent.
If there is no response to the RENEW request, the interface remains in the RENEW state. In this case, the lease timer will advance to the REBIND state and subsequently send a REBIND request.
If a NAK response is sent in response to the RENEW request, the interface is deconfigured.
The original IP address for the interface must be assigned by the DHCP server. If the interface is not assigned an IP address by the DHCP server, the renew dhcp command fails and displays the following error message:
Interface does not have a DHCP originated address
How to Enable DHCP Release and Renew CLI in EXEC Mode
This section contains the following procedure:
•
Enabling DHCP Release and Renew CLI in EXEC Mode (required)
Enabling DHCP Release and Renew CLI in EXEC Mode
To enable the DHCP Release and Renew CLI in EXEC Mode feature, perform the following steps:
SUMMARY STEPS
1.
enable
2.
release dhcp type number
3.
renew dhcp type number
DETAILED STEPS
Configuration Examples for DHCP Release and Renew CLI in EXEC Mode
This section contains the following configuration examples:
Release DHCP Lease: Example
In the following example, a DHCP release is performed on an interface that was originally assigned an IP address by the DHCP server.
Router# release dhcp ethernet 3/1In the following example, an attempt is made to release the DHCP lease on an interface that was not originally assigned an IP address by the DHCP server.
Router# release dhcp ethernet 3/1Interface does not have a DHCP originated address
In the following example, the release dhcp command is executed without specifying the type and number arguments.
Router# release dhcpIncomplete command.
Renew DHCP Lease: Example
In the following example, the DHCP lease is renewed on an interface that was originally assigned an IP address by the DHCP server.
Router# renew dhcp ethernet 3/1In the following example, an attempt is made to renew the DHCP lease on an interface that was not originally assigned an IP address by the DHCP server.
Router# renew dhcp ethernet 3/1Interface does not have a DHCP originated address
In the following example, the renew dhcp command is executed without specifying the type and number arguments.
Router# renew dhcpIncomplete command.
Additional References
This section provides references related to the DHCP Release and Renew CLI in EXEC Mode feature.
Related Documents
Related Topic Document TitleInformation about managing configuration files
Cisco IOS Configuration Fundamentals and Network Management Command Reference, Release 12.3 T
Commands for showing interface statistics
Cisco IOS Interface and Hardware Component Command Reference, Release 12.3 T
DHCP commands
Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services, Release 12.3 T
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
RFCs
Technical Assistance
Command Reference
This section documents new commands. All other commands used with this feature are documented in the Cisco IOS Release 12.3 T command reference publications.
release dhcp
To perform an immediate release of a Dynamic Host Configuration Protocol (DHCP) lease for an interface, use the release dhcp command in user EXEC or privileged EXEC mode.
release dhcp type number
Syntax Description
Command Modes
User EXEC
Privileged EXECCommand History
Release Modification12.3(4)T
This command was introduced.
12.2(27)SBA
This command was integrated into Cisco IOS Release 12.2(27)SBA.
Usage Guidelines
The release dhcp command immediately releases the DHCP lease on the interface specified by the type and number arguments. If the router interface was not assigned a DHCP IP address by the DHCP server, the release dhcp command fails and displays the following error message:
Interface does not have a DHCP originated address
This command does not have a no form.
Examples
The following example shows how to release a DHCP lease for an interface.
Router# release dhcp ethernet 3/1Related Commands
renew dhcp
To perform an immediate renewal of a Dynamic Host Configuration Protocol (DHCP) lease for an interface, use the renew dhcp command in user EXEC or privileged EXEC mode.
renew dhcp type number
Syntax Description
Command Modes
User EXEC
Privileged EXECCommand History
Release Modification12.3(4)T
This command was introduced.
12.2(27)SBA
This command was integrated into Cisco IOS Release 12.2(27)SBA.
Usage Guidelines
The renew dhcp command immediately renews the DHCP lease for the interface specified by the type and number arguments. If the router interface was not assigned an IP address by the DHCP server, the renew dhcp command fails and displays the following error message:
Interface does not have a DHCP originated address
This command does not have a no form.
Examples
The following example shows how to renew a DHCP lease for an interface.
Router# renew dhcp Ethernet 3/1Related Commands
![]()
Copyright © 2003-2005 Cisco Systems, Inc. All rights reserved.