DHCP(Dynamic Host Configuration Protocol)
The Dynamic Host Configuration Protocol (DHCP) is a standardized network protocol used on Internet Protocol (IP) networks for dynamically distributing network configuration parameters, such as IP addresses for interfaces and services. With DHCP, computers request IP addresses and networking parameters automatically from a DHCP server, reducing the need for a network administrator or a user to configure these settings manually.
The DHCP employs a connectionless service model, using the User Datagram Protocol (UDP). It is implemented with two UDP port numbers for its operations which are the same as for the BOOTP protocol. UDP port number 67 is the destination port of a server, and UDP port number 68 is used by the client.
DHCP operations fall into four phases: server discovery, IP lease offer, IP lease request, and IP lease acknowledgement. These stages are often abbreviated as DORA for discovery, offer, request, and acknowledgement.
HOW TO CONFIGURE DHCP ON CISCO ROUTER
Cisco routers running Cisco IOS software include Dynamic Host Configuration Protocol (DHCP) server and relay agent software. The Cisco IOS DHCP server is a full DHCP server implementation that assigns and manages IP addresses from specified address pools within the router to DHCP clients.
STEP 1: Create a DHCP pool
Router(config)# ip dhcp pool name(optional eg: dept,internet,..etc)
Router(config)# ip dhcp pool techpool
Here the dhcp pool name is techpool.
STEP 2: Add the Network
Router(dhcp-config)# network 192.168.1.0 255.255.255.0
Here we choose the 192.168.1.0 with subnet mask 255.255.255.0 it have 254
host addresses. The network address and subnetmask are selected as per our requirement
STEP 3: Add the gateway by using default router option as follows
Router(dhcp-config)#default router 192.168.1.1
Here the router address is 192.168.1.1, it works as gateway also.
STEP 4 : Add the dns server as follows
Here we use dns server is router, if you want to use another then replace router ip by it.
STEP 5: we can also define excluded range by using the option excluded-address
Router(dhcp-config)# ip dhcp excluded-address low-address [high-address]
Here we can exclude some ip addresses like server ip addresses, Printer ip address etc.