Usually I tend to create DHCP server on Windows Server. However, sometimes there is no server on site. Only what I have are network devices, workstations and voip phones. In those cases I used to create DHCP server on switches. As environment I operate in contains mainly Cisco devices, each location has at least one or more Cisco Catalyst switches (2960 or 3560) it is possible to provide DHCP service using IOS features. Example contains DHCP configuration for network with different VLANs for data, voice and printers.

Below is short description and set of commands demonstrating how to setup:

  • DHCP scopes
  • Exclusions
  • Define DHCP helper on the interface
  • Check status of DHCP assignments

Configure DHCP scopes

ip dhcp pool Printers
   network 192.168.120.0 255.255.255.0
   default-router 192.168.120.1
   dns-server 192.168.10.11
!
ip dhcp pool Voice
   network 192.168.20.0 255.255.255.0
   default-router 192.168.20.1
   dns-server 192.168.10.11
!
ip dhcp pool Data
   network 192.168.10.0 255.255.255.0
   default-router 192.168.10.1
   domain-name domain.com
   dns-server 192.168.10.11

Define exclusions

ip dhcp excluded-address 192.168.120.1 192.168.120.20
ip dhcp excluded-address 192.168.20.1 192.168.20.20
ip dhcp excluded-address 192.168.10.1 192.168.10.20

Define DHCP-helper

interface Vlan120
    description ### Printers VLAN ###
    ip address 192.168.120.2 255.255.255.0

 !
 interface Vlan20
    description ### VoIP VLAN ###
    ip address 192.168.20.2 255.255.255.0
 !
 interface Vlan10
    description ### Data VLAN ###
    ip address 192.168.10.2 255.255.255.0

Monitoring and Diagnostic

Current DHCP leases:

sh ip dhcp binding

Conflicts on DHCP server:

sh ip dhcp conflict