DHCP Configuration
Last updated
Last updated
First we must configure the VLANs, assign the correct ports to the VLANs, and create the SVIs. It assumed that you already know how to do this. If not please refer to the VLANs guide
Next comes the actual DHCP iOS Configuration
SW1(config)ip dhcp pool [NAME]
# This command will create the DHCP pool.
SW1(config-dhcp)#network [network address][CIDR]
# This command sets the network address in the pool
SW1(config-dhcp)#default-router [DG IP Address]
# This command sets the default gateway in the pool
SW1(config-dhcp)dns-server [Primary DNS IP][Secondary DNS IP]
# This command sets the DNS server IP addresses to be allocated in the pool
SW1(config-dhcp)#lease 7
# This command sets a time for how long an IP address can assigned to an endpoint before being released back into the DHCP pool
SW1(config-dhcp)#option 150 ip [Primary CUCM IP] [Secondary CUCM IP]
# This command sets the IP addresses for the Cisco Unified Call Managers. These are the servers that deliver a phones configuration via TFTP.
SW1(config-dhcp)$option 66 ip [WDS|PXE IP address]
# This command sets the IP address for a Windows Deployment Server which is needed for the Pre-execution Environment which allows re-imaging of computers over the LAN/Wire.
SW1(config)#ip dhcp excluded-address [IP Address | X.X.X.X]
# This command will exclude an IP address from being assigned to a user.
SW1(config)#ip dhcp excluded-address 10.10.10.50 10.10.10.60
# This command sets a range of IP addresses to be excluded from being assigned to an endpoint device.
SW1(config)#ip dhcp pool [NAME]
# This command will create the DHCP pool.
SW1(config-dhcp)#vrf [NAME]
# This command will set the DHCP pool to be apart of the VRF
SW1(config)#interface vlan 10
# This command creates an SVI on the switch
SW1(config-if)#ip helper-address [ip address X.X.X.X]
# This command will now redirect any broadcast traffic destined to the ip address that we have configured
SW1#show ip dhcp pool
# This command will show the current DHCP pools configured on your Cisco iOS device, the amount of available IP addresses in the pool, and the currently leased addresses.
SW1#show ip dhcp binding
# This command will show all the current IP addresses assigned to devices, the MAC addresses of devices, and the lease times.
SW1#show ip dhcp vrf [name] binding *
# This command will show all the DHCP bindings under a VRF
SW1#show ip dhcp conflicts
# This command will show if any devices are trying to pull the same IP address from a DHCP pool
SW1#clear ip dhcp binding [ * | X.X.X.X | vrf]
# This command will clear DHCP bindings. There are a few options you put on this command. Clear all bindings with an *. Clear one binding by specifying an IP address. And clear bindings under a VRF.
SW1#clear ip dhcp conflicts [ * | X.X.X.X | vrf]
# This command will clear DHCP conflicts. There are a few options you put on this command. Clear all conflicts with an *. Clear one conflict by specifying an IP address. And clear conflicts under a VRF.