How to Configure DHCP on a Cisco Router Example.

By | November 30, 2023

What Is DHCP?

DHCP stands for Dynamic Host Configuration Protocol. It is a network protocol used to automatically assign and manage IP addresses and other configuration information to devices on a TCP/IP network. DHCP simplifies the process of network administration by allowing devices to obtain necessary network parameters without manual intervention.

Key Components of DHCP

DHCP Server

83% discount on VPN

The DHCP server is responsible for managing a pool of IP addresses and distributing them to devices on the network when requested.
It dynamically assigns IP addresses to devices, eliminating the need for manual configuration.
DHCP Client

Devices seeking network configuration information, such as computers, smartphones, or any device capable of connecting to a network, are DHCP clients.
When a device connects to a network, it sends a DHCP request to obtain necessary network settings.
DHCP Lease

When a DHCP server assigns an IP address to a client, it does so for a specific duration known as the lease time.
The client is allowed to use the assigned IP address and other configuration parameters for the lease duration.
IP Address Pool

DHCP servers maintain a pool of available IP addresses. When a client requests an IP address, the server assigns an address from this pool. The pool ensures that IP addresses are efficiently utilized and prevents address conflicts.

Now; Cisco router uses the Cisco IOS feature known as Easy IP as an optional DHCP server. Easy IP leases IP configurations to network clients for 24 hours by default.

Follow these steps:

Step 1.

Configure excluded address(es): 

These addresses are reserved for network hosts or clients that need Static Addresses, such as servers, routers and printers. These IP addresses are not included in the address pools that are available for assigning to other clients.

DHCP excluded address on R1

Step 2. 

Configure the address pool: 

Define the pool of addresses from which DHCP assigns addresses to clients on the network. in this case (R1) the available addresses are all addresses on the 192.168.30.0 network, except for the range excluded in Step 1.

Configure address pool on R1: define the address pool, default gateway, and DNS server that are assigned to each client requesting DHCP IP configuration.

Do the same on R3 in this case:

Excluded address for R3:

Address pool for R3:

R3#

How to Verify the DHCP Address Pool Configuration

Perform this task to verify your DHCP address pool configuration. Use these show commands, they need not be entered in any specific order.

STEP

1. enable 
Example:

Router> enable

This enables the privileged EXEC mode. Enter your password if prompted.

2. show ip dhcp pool [name]show ip dhcppool [name]

Example:

This displays information about DHCP address pools.

3. show ip dhcp binding [address]show ip dhcpbinding[address]

Example:

This displays a list of all bindings created on a specific DHCP server.

• Use the show ip dhcp binding command to display the IP addresses that have already been assigned.

  • Verify that the address pool has not been exhausted. If necessary, re-create the pool to create a larger pool of addresses.

• Use the show ip dhcp binding command to display the lease expiration date and time of the IP address of the host.
4. show ip dhcp conflict [address]show ip dhcpconflict[address]

Example:

Router# show ip dhcp conflict

This displays a list of all address conflicts.

5. show ip dhcp database [url]show ip dhcpdatabase [url]

Example:

Router# show ip dhcp database

This displays recent activity on the DHCP database.

6. show ip dhcp server statistics [type-number]show ip dhcpserverstatistics[type-number]

Example:

These displays count information about server statistics and messages sent and received.

Defining DHCP Lease Periods on Cisco Router

DHCPv6 How to Configure Static Routes on Cisco Router

How to Configure Default Routes on Cisco Router Spanning Tree Protocol (STP)

VLAN Trunking Protocol (VTP