When using the DHCP protocol to retrieve an IP address, the device acts as a DHCP client.
To retrieve an IP address from a DHCP server:
1. Select and connect any port to a DHCP server or to a subnet which has a DHCP server on it, in order to retrieve the IP address.
2. Enter the following commands to use the selected port for receiving the IP address, as shown in the following example.
console> enable
console# configure
console(config)# interface vlan 1
console(config-if)# ip address dhcp hostname <string>
console(config-if)# exit
console(config)# exit
3. The device receives the IP address automatically.
To verify the IP address:
1. Type show ip interface at the system prompt. See the following display example.
console> enable
console# show ip interface
Gateway IP Address Activity status
----------------------- -----------------------
IP Address I/F
----------------------- ----------------------
10.1.1.1/8 vlan1
console#
NOTE:
The device configuration does not need to be deleted to retrieve an IP address for the DHCP server.