Configure DHCP in router cisco

DHCP (Dynamic Host Configuration Protocol) 

The DHCP protocol allows clients to dynamically configure network parameters without the need for a manual configuration process.  Dynamically assigns an IP address to the client, subnet mask, default gateway, DNS server, lease time, etc.

The four basic DHCP phases:

  • Step 1.- DHCP Discover.- Broadcast message from a client to find a dhcp server
  • Step 2.- DHCP Offer.- DHCP server response from the client’s DISCOVER message. This message contains the network information provided by the dhcp server, such as, client ip, subnet mask, gateway, dns server and so on. 
  • Step 3.- DHCP Request.- Message used by the client to respond to the DHCP server and accept the information provided in step 3.
  • Step 4.- DHCP Ack.- The DHCP server sends you acknowledgement to confirm the lease.
DHCP server configuration in router:
Switch(config)# ip dhcp excluded-address ////Exclude a range of IP addresses from being delivered automatically.

Switch(config)# ip dhcp pool Users //Assign a name to the address pool

Switch(dhcp-config)# network
Switch(dhcp-config)# default-router
Switch(dhcp-config)# dns-server

Switch(dhcp-config)# lease infinite //Lease time for the client, can be configures by day, hour and minutes


Switch# show ip dhcp binding //Show all IPs assigned by the server

Switch# clear ip dhcp binding * //Delete all DHCP leases

Switch# debug ip dhcp server packet|events //View real-time dhcp discover, offer, request and ack.

DHCP Relay – Relay Agent

Used to forward DHCP messages to DHCP servers on remote networks. It converts the packets to unicast and forwards them to the IP configured as a DHCP server.

It is applied on the physical interface or SVI, so no DHCP pools are created.


Switch(config)# interface vlan 1
Switch(config-if)# ip helper-address

Leave a Comment

Your email address will not be published. Required fields are marked *