Command
IP Address DHCP
Use
This command is used to set an interface’s ip address via DHCP.
Syntax
Router(config)#ip address dhcp
Example
In this example, we will set 2611XM’s Fa0/0 interface to have its IP resolved by DHCP. First, lets check the current address.
Copy
2611XM(config)#do show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.2.5 YES TFTP up up
Now lets use ip address dhcp
Copy
2611XM(config-if)#ip address dhcp
*Jul 19 00:00:38.166: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 10.10.2.30, mask 255.255.255.0, hostname 2611XM
2611XM(config-if)#
2611XM(config-if)#do sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.2.30 YES DHCP up up