Cisco router DHCP server

Configure DHCP server on a Cisco router or switch.

DHCP is an application layer protocol used to distribute network configuration parameters, such as IP addresses, subnet masks, default gateways, etc.. to devices on the network. a DHCP client send request to a DHCP server. A DHCP server is assigns network parameters (IP address) to the DHCP client from configured IP addresses pool

Cisco router and switches can be configured as a DHCP server, In this post I will walks you through the configuration process.

Getting started

Let’s look at how to configure basic DHCP on a Cisco router. For this example, I will start with the default configuration on a Cisco router.

 

The following steps is to configure DHCP on Cisco IOS router

Configure Cisco router Interfaces

!— Configure an IP address on the router’s Ethernet port, and bring up the interface.

DHCP#config t
Enter configuration commands, one per line. End with CNTL/Z.
DHCP(config)#hostname DHCP
DHCP(config)#interface fastethernet0/0
DHCP(config-if)#ip address 170.10.1.30 255.255.255.224
DHCP(config-if)#no shutdown
DHCP(config-if)#

  

Configur DHCP server on Cisco router

!— Create a DHCP IP address pool.

DHCP(config-if)#ip dhcp pool ITmug_DHCP_SRV

!— Define a subnet for address pool that will be used to assign IP addresses to hosts.

DHCP(dhcp-config)#network 170.10.1.0 /27

!— Define the DNS domain name.

DHCP(dhcp-config)#domain-name ITmug.ca

!— Define the DNS servers (primary and secondary DNS servers).

DHCP(dhcp-config)#dns-server 170.10.1.9 170.10.1.10

!— Define the default gateway.

DHCP(dhcp-config)#default-router 170.10.1.30

!— Define the lease duration for the addresses.

DHCP(dhcp-config)#lease 7
DHCP(dhcp-config)#exit

!— Exclude addresses from being assigned by DHCP (static IP).

DHCP(config)#ip dhcp excluded-address 170.10.1.1 170.10.1.10
DHCP(config)#

  

Release DHCP update command from a client PC to renew the IP address.

  

Helpful command to see DHCP leases that have been assigned, issue the following command.

DHCP#show ip dhcp binding

Good luck!

I hope this post will be useful to you. If you like the post , Please don’t forget to Vote and click the Like Button.

Email me at itmug.pro@gmail.com for corrections, additions, or questions.

 

Ahmet Yakupogku

Advertisements