You want the router to obtain its IP addressing information dynamically.
The ip address dhcp configuration command allows the router to obtain the address information for an interface dynamically:
configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#
ip address dhcpRouter1(config-if)#
endRouter1# Interface FastEthernet0/1 assigned DHCP address 172.25.1.57, mask 255.255.255.0 Router1#
Prior to Release 12.2(8)T, the ip address dhcp command was only supported on Ethernet interfaces.
Cisco started to include DHCP client functionality in IOS Version 12.1(2)T. This allows routers to obtain interface IP address information via DHCP. While we don’t recommend using dynamic addressing for routers in an internal network, this can be extremely useful for routers that connect to the Internet through an ISP. It is increasingly common for service providers to use DHCP to give address information to allocate information to client devices.
When an interface on the router is configured as a DHCP client like this, it is able to dynamically learn its IP address, and netmask, via DHCP. In addition, the router also learns its TFTP server address, NETBIOS nameserver, vendor-specific information, static routes, domain name, DNS servers, and default router information.
Beginning with IOS Version 12.3(8)T, you can control which options ...