DHCP Configuration (Cisco)
Technology: Network Services
Area: Network Services
Vendor: Cisco
Software: 12.X , 15.X
Platform: Cisco
DHCP Server functionality can be enabled on switch where are SVI interfaces or physical Layer 3 interfaces enabled. Example shows how to set DHCP configuration on a server with subnet 192.168.10.0/24.
!---- enable SVI -----
Switch(config)# interface VLAN11
Switch(config-if)# ip address 172.21.10.1 255.255.255.0
!---- define the pool name -----
Switch(config)# ip dhcp pool VLAN11
!---- specify network-----
Switch(dhcp-config)#network 172.21.10.0 255.255.255.0
!---- specify default gateway for subnet-----
Switch(dhcp-config)#default-router 172.21.10.1
!---- specify dns servers-----
Switch(dhcp-config)#dns-server 8.8.8.8 4.4.4.4
To add option to DHCP pool use following command
Switch(config)# ip dhcp pool VLAN11
Switch(dhcp-config)#option 150 ip x.x.x.x
!---- where option has number 150 and Call manager server is x.x.x.x -----
To verify DHCP MAC and IP binding configuration you can issue few show commands:
Switch#sh ip dhcp binding
...