Configure Cisco router as DHCP server (2024)

Dynamic Host Configuration Protocol (DHCP) is an application layer protocol used to distribute various network configuration parametersto devices on a TCP/IP network. – IP addresses, subnet masks, default gateways, DNS servers, etc. DHCP employs a client-server architecture; a DHCP client is configured to request network parameters from a DHCP server on the network. A DHCP server is configured with a pool of available IP addresses and assigns one of them to the DHCP client.

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 an example configuration:

Floor1(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.50Floor1(config)#ip dhcp pool Floor1DHCPFloor1(dhcp-config)#network 192.168.0.0 255.255.255.0Floor1(dhcp-config)#default-router 192.168.0.1Floor1(dhcp-config)#dns-server 192.168.0.1

In the example above you can see that I’ve configured the DHCP server with the following parameters:

  • the IP addresses from the 192.168.0.1 – 192.168.0.50 range will not be assigned to hosts
  • the DHCP pool was created and named Floor1DHCP
  • the IP addresses assigned to the hosts will be from the 192.168.0.0/24 range
  • the default gateway’s IP address is 192.168.0.1
  • the DNS server’s IP address is 192.168.0.1

To view information about the currently leased addresses, you can use the show ip dhcp binding command:

Floor1#show ip dhcp bindingIP address Client-ID/ Lease expiration TypeHardware address192.168.0.51 0060.5C2B.3DCC -- Automatic

In the output above you can see that there is a single DHCP client that was assigned the IP address of 192.168.0.51. Since we’ve excluded the IP addresses from the 192.168.0.1 – 192.168.0.50 range, the device got the first address available – 192.168.0.51.

To display information about the configured DHCP pools, you can use the show ip dhcp pool command:

Floor1#show ip dhcp poolPool Floor1DHCP :Utilization mark (high/low) : 100 / 0Subnet size (first/next) : 0 / 0Total addresses : 254Leased addresses : 1Excluded addresses : 1Pending event : none1 subnet is currently in the poolCurrent index IP address range Leased/Excluded/Total192.168.0.1 192.168.0.1 - 192.168.0.254 1 / 1 / 254

This command displays some important information about the DHCP pool(s) configured on the device – the pool name, total number of IP addresses, the number of leased and excluded addresses, subnet’s IP range, etc.

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:

Configure Cisco router as DHCP server (1)

Configure Cisco router as DHCP server (2024)

FAQs

Can a Cisco router be configured as a DHCP server? ›

A Cisco router can be configured as a DHCP server. Here are the steps: Exclude IP addresses from being assigned by DHCP by using the ip dhcp excluded-address FIRST_IP LAST_IP. Create a new DHCP pool with the ip dhcp pool NAME command.

Should you use a router as a DHCP server? ›

Using router as DHCP server is preferable choice. This is especially true for network setups that need to support DHCP for IPv4 and DHCP for IPv6 at the same time. Both IPv4 and IPv6 can be managed through the same management interface because almost all DHCP server suppliers support both protocols.

Which command enables a router to become a DHCP server? ›

Note: The command ג€ip helper-addressג€ enables a router to become a DHCP Relay Agent.

Can a switch act as a DHCP server? ›

At times you may want to configure your TP-Link switch to act as the DHCP server of your network instead of using your router. This FAQ will show you how to do that. *Note: This FAQ assumes you are using a TP-Link ER605 SMB router. Actions on the router may vary depending on what you are using.

Can I specify a DHCP server? ›

Yes, you can. In the DHCP admin tool, right-click on the server and select 'Add/Remove Bindings'. That lets you select which NICs the DHCP service will be offered on.

Do you configure DHCP on router or switch? ›

If the DHCP server and the DHCP clients are on different networks or subnets, you must configure the switch with the ip helper-address address interface configuration command. The general rule is to configure the command on the Layer 3 interface closest to the client.

How is DHCP server configured? ›

You can configure a DHCP server only on an interface's primary IP address. The primary address on an interface is the address that is used by default as the local address for broadcast and multicast packets sourced locally and sent out the interface.

Should DHCP be its own server? ›

DHCP can, honestly, be anywhere. It's easier to manage an all-Microsoft stack with WAC and RMT, but the location of the DHCP server doesn't matter - as long as there's two of them set up correctly for redundancy .

Should I set my router to static IP or DHCP? ›

After comparing DHCP vs static IP, it is undoubtedly that DHCP is the more popular option for most users as they are easier and cheaper to deploy. Having a static IP and guessing which IP address is available is really bothersome and time-consuming, especially for those who are not familiar with the process.

What is the default router in DHCP? ›

default-router address [address2 ... address8] (Optional) Specifies the IP address of the default device for a DHCP client. -The IP address should be on the same subnet as the client. -One IP address is required; however, you can specify up to eight IP addresses in one command line.

How does DHCP automatically configure IP addresses? ›

The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when it starts up on the network. Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.

Which network device can be used as a DHCP server? ›

Many routers and residential gateways have DHCP server capability. Most residential network routers receive a unique IP address within the ISP network. Within a local network, a DHCP server assigns a local IP address to each device.

Do home access routers have DHCP servers? ›

In most cases, Home Routers act as a DHCP Server.

What is DHCP server Cisco? ›

The Dynamic Host Configuration Protocol (DHCP) is based on the Bootstrap Protocol (BOOTP), which provides the framework for passing configuration information to hosts on a TCP/IP network. DHCP adds the capability to automatically allocate reusable network addresses and configuration options to Internet hosts.

What is the difference between DHCP server and DHCP relay in router? ›

Typically, DHCP servers are centralized and are not present on every subnet. DHCP Relay provides a way for DHCP clients to communicate with DHCP servers when none are available on its local subnet. A Relay Agent uses IP routing to forward discover messages to a provisioned DHCP server.

Top Articles
WalMart's Inbound Freight Move Could be a Game Changer
How to apply for refund of excess payment made
Caesars Rewards Loyalty Program Review [Previously Total Rewards]
How to know if a financial advisor is good?
Green Bay Press Gazette Obituary
Santa Clara Valley Medical Center Medical Records
Crusader Kings 3 Workshop
New Mexico Craigslist Cars And Trucks - By Owner
How Many Cc's Is A 96 Cubic Inch Engine
Meritas Health Patient Portal
Peraton Sso
Viha Email Login
7543460065
Snow Rider 3D Unblocked Wtf
Immortal Ink Waxahachie
Craiglist Tulsa Ok
Po Box 35691 Canton Oh
Weepinbell Gen 3 Learnset
MLB power rankings: Red-hot Chicago Cubs power into September, NL wild-card race
Project, Time & Expense Tracking Software for Business
Ups Print Store Near Me
The Weather Channel Local Weather Forecast
Holiday Gift Bearer In Egypt
Bento - A link in bio, but rich and beautiful.
Jesus Calling Feb 13
The Goonies Showtimes Near Marcus Rosemount Cinema
Wheeling Matinee Results
Roch Hodech Nissan 2023
Los Garroberros Menu
Planet Fitness Santa Clarita Photos
Devotion Showtimes Near The Grand 16 - Pier Park
craigslist | michigan
Culver's of Whitewater, WI - W Main St
Fifty Shades Of Gray 123Movies
Gary Lezak Annual Salary
Pro-Ject’s T2 Super Phono Turntable Is a Super Performer, and It’s a Super Bargain Too
Dwc Qme Database
Is Ameriprise A Pyramid Scheme
War Room Pandemic Rumble
Gary Vandenheuvel Net Worth
Chr Pop Pulse
Pickwick Electric Power Outage
Egg Inc Wiki
Laura Houston Wbap
Pronósticos Gulfstream Park Nicoletti
303-615-0055
91 East Freeway Accident Today 2022
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 5879

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.