Configuring Cisco Router as DHCP Server

Throughout a recent project of configuring routers and Telstra’s Business SIP NTU’s, I have had to configure an interface to have a DHCP Service on it. This has allowed the BSIP device to connect to the Cisco Router as if it was a home/office basic router.

A Cisco router can be configured as a DHCP server. Here are the steps:

  1. Exclude IP addresses from being assigned by DHCP by using the ip dhcp excluded-address FIRST_IP LAST_IP
  2. Create a new DHCP pool with the ip dhcp pool NAME command.
  3. Define a subnet that will be used to assign IP addresses to hosts with the network SUBNET SUBNET_MASK command.
  4. Define the default gateway with the default-router IP command.
  5. Define the DNS server with the dns-server IP address command.
  6. (Optional) Define the DNS domain name by using the ip domain-name NAME command.
  7. (Optional) Define the lease duration by using the lease DAYS HOURS MINUTES command. If you don’t specify this argument, the default lease time of 24 hours will be used.

Here is a copy of a basic configuration on a Layer 2 Interface (EHWIC Card)

conf t
ip dhcp excluded-address
ip dhcp pool BSIP_Network

ip interface gi0/1/0
   description ***Inside Network - BSIP NTU***
   switchport mode access
   switchport access vlan 2
   no shut

ip interface vlan 2
   description ***Inside Network - BSIP NTU***
   ip address
   no shut

To view information about the currently leased addresses, you can use the below command:

show ip dhcp binding

To display information about the configured DHCP pools, you can use the below command:

show ip dhcp pool