Command
IP DHCP Pool
Use
This command enables DHCP services on the router and specifies the various DHCP options the server will assign to clients.
Syntax
Router(config)#ip dhcp pool <name>
Options
<network> network addresses that the DHCP pool may assign, this supports slash notation. Ex network 192.168.1.0 255.255.255.0 or network 192.168.1.0 /24
<domain-name> sets a domain-name the DHCP server will assign to clients.
<dns-server> Sets DNS servers that the DHCP server will assign to clients.
<default-router> Sets the default gateway that the DHCP server will assign clients.
Example
In the below example we will configure R2 to provide DHCP services for R1
First we configure the DHCP server with ip dhcp pool
R2(config)#ip dhcp pool R1_Pool |
Currently R1’s Fa0/0 does not have an IP address
R1(config-if)#do show ip interface brief | ex unass |
After we configure ip address dhcp on R1’s Fa0/0 it receives an IP address of 10.1.1.1
R1(config)#int fa0/0 R1(config-if)# R1(config-if)# |