interface type slot/port
command. If you later enter the
no shutdown
]
command and the lease timer for the dynamic IP address has expired, the IP
address is unconfigured and the interface tries to acquire a new dynamic address
from DHCP server.
You cannot configure a secondary (backup) IP address on an interface using the
ip
address dhcp
command; you must use the
ip address
command at the
interface configuration level.
To release a DHCP-assigned IP address and remove the interface from being a
DHCP client, use the
no ip address dhcp
command. When you use the
no ip
address dhcp
command:
• The IP address dynamically acquired from a DHCP server is released from the
interface.
• The DHCP client is disabled on the interface; it can no longer acquire a
dynamic IP address from a DHCP server.
• DHCP packet transactions on the interface are stopped.
To display the currently configure dynamic IP address and lease time, use the
show
ip dhcp lease
command.
Other Commands Supported by the DHCP Client
The following commands are supported by the DHCP client.
clear ip dhcp client statistics
Display DHCP client statistics, including the number of DHCP messages sent and received on an
interface.
Syntax
clear ip dhcp client statistics {all | interface
type slot/
port
}
Parameters
all
Clear DHCP client statistics on all DHCP client-enabled
interfaces on the switch.
interface type
slot/ port
Clear DHCP client statistics on the specified interface.
• For a 10-GigabitEthernet Ethernet interface, enter
TenGigabitEthernet
then the slot/port numbers; for
example,
tengigabitethernet 1/3
.
• For a 40-GigabitEthernet Ethernet interface, enter
FortyGigabitEthernet
then the slot/port numbers;
for example,
fortygigabitethernet 0/2
.
492
Dynamic Host Configuration Protocol (DHCP)