DHCP Commands
  • 10 Jul 2024
  • 3 Minutes to read
  • Contributors
  • PDF

DHCP Commands

  • PDF

Article summary

DHCP (Dynamic Host Configuration Protocol) CLI commands are categorized as follows:

Configuration Commands

This section includes DHCP configuration commands.

release dhcp

Command Objective:
This command releases the DHCP lease obtained for an IP address from a DHCP server and assigned to the specified interface. The current lease assigned to that interface is manually terminated.

Syntax:
release dhcp { cpu0 | vlan < vlan_vfi_inner_id > | < interface-type > < interface-id > }

Parameter Description:

  • cpu0 - Releases the DHCP lease for the management interface.
  • < vlan_vfi_inner_id > - Releases the DHCP lease for the specified VLAN ID. This is a unique value that represents the specific VLAN created. This value ranges from 1 to 4094. For double tagged VLAN, the syntax is < vlan id:inner vlan id >
  • < interface-type > - Releases the DHCP lease for the specified type of interface.
  • < interface-id > - Releases the DHCP lease for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash for interface type other than i-lan. For example: 0/1 represents that the slot number is 0 and port number is 1. Only i-lan ID is provided for interface type i-lan. For example: 1 represents i-lan ID.

Mode:
Privileged EXEC Mode


Note: This command only executes successfully if the VLAN interfaces and router ports are in BOUND state (that is, IP address is dynamically acquired from DHCP server and an active lease is bound to the interface). The port should have been configured as router port for dynamically acquiring an IP address from DHCP server.

Example:

Your Product# release dhcp vlan 1
Your Product(config)# release dhcp vlan 1

renew dhcp

Command Objective:
This command immediately renews the DHCP lease for the specified interface. The current lease acquired by the specified interface is manually renewed; otherwise, a new DHCP lease is acquired for the interface whose lease is terminated. The DHCP lease is automatically renewed once the lease expires.

Syntax:
renew dhcp { cpu0 | vlan < vlan_vfi_inner_id > | < interface-type > < interface-id > }

Parameter Description:

  • cpu0 - Renews the DHCP lease for the management interface.
  • < vlan_vfi_inner_id > - Renews the DHCP lease for the specified VLAN ID. This is a unique value that represents the specific VLAN created. This value ranges from 1 to 4094. For double-tagged VLAN, the syntax is < vlan id:inner vlan id >
  • < interface-type > - Renews the DHCP lease for the specified type of interface.
  • < interface-id > - Renews the DHCP lease for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash for interface type other than i-lan. For example: 0/1 represents that the slot number is 0 and port number is 1. Only i-lan ID is provided for interface type i-lan. For example: 1 represents i-lan ID.

Mode:
Privileged EXEC Mode


Note: This command executes successfully only if the VLAN interfaces and router ports are in BOUND state (that is, IP address is dynamically acquired from DHCP server and an active lease is bound to the interface). The port should have been configured as router port for dynamically acquiring an IP address from DHCP server.

Example:

Your Product# renew dhcp vlan 1
Your Product(config)# renew dhcp vlan 1

© 2024 Cisco and/or its affiliates. All rights reserved.
 
For more information about trademarks, please visit: Cisco trademarks
For more information about legal terms, please visit: Cisco legal terms

For legal information about Accedian Skylight products, please visit: Accedian legal terms and tradmarks



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.