Here they are commands that are required to, on a Router/L3 Switch, enable DHCP service.
There are other settings but, this example, simple give you a general idea:
Switch# config t
Switch(config)#
Switch(config)# ip dhcp pool description_or_vlan_name
Switch(config-dhcp)# network lower_vlan_ip subnet
Switch(config-dhcp)# domain-name domain name
Switch(config-dhcp)# dns-server dns_server_1 dns_server_2
Switch(config-dhcp)# default-router default_gateway_ip
Switch(config-dhcp)# ip dhcp excluded-address lower_vlan_ip_range upper_vlan_ip_range
Switch(config-dhcp)# ip dhcp excluded-address lower_vlan_ip_range upper_vlan_ip_range
related articles: