fbpx

How to configure DHCP Server on Cisco Router / Switch?

· >
ip dhcp config on cisco router switch

Configure DHCP Server in Cisco Router or Switch

In our previous post, we have learnt about DHCP and DHCP process, In this lesson we will learn about configuring DHCP Server in Cisco Router. So lets begin.

To configure a Cisco router as a DHCP server, follow these steps:

  1. Enter configuration mode by typing “configure terminal” at the command prompt.
  2. Create a DHCP pool by typing “ip dhcp pool [name]”, where [name] is the name you want to give to the pool.
  3. Define the pool’s scope by typing “network [network-number] [mask]”, where [network-number] is the network address and [mask] is the subnet mask.
  4. Set the default router for the scope by typing “default-router [router-address]”, where [router-address] is the IP address of the default router.
  5. Set the DNS server for the scope by typing “dns-server [server-address]”, where [server-address] is the IP address of the DNS server.
  6. Set the lease time for the scope by typing “lease [days] [hours] [minutes]”, where [days] is the number of days, [hours] is the number of hours, and [minutes] is the number of minutes for the lease time.
  7. Save the configuration by typing “end” and then “write memory”.

Here’s an example of a complete DHCP configuration on a Cisco router:

Router>enable
Router#configure terminal
Router#ip dhcp excluded-address 10.0.0.1 10.0.0.10
Router(config)#ip dhcp pool mypool
Router(dhcp-config)#network 10.0.0.0 255.255.255.0
Router(dhcp-config)#default-router 10.0.0.1
Router(dhcp-config)#dns-server 10.0.0.2
Router(dhcp-config)#lease 3 0 0
Router(dhcp-config)#end
Router#write memory

This configuration creates a DHCP pool named “mypool” with a scope of 10.0.0.0/24, a default router of 10.0.0.1, a DNS server of 10.0.0.2, and a lease time of 3 days. it will exclude IP addresses from 1 – 10 from DHCP pool and these IP addresses will not be assigned to any client.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments