Configure Cisco router as a basic DHCP server

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: Cisco router  

Using a Cisco router as a DHCP server can simplify a network configuration by cetralizing DHCP services in a large network or decentralizing DHCP services to the endpoint routers at satellite locations. The ease of remote management of Cisco-based DHCP services is a great advantage.


conf t
service dhcp
ip dhcp pool 192.168.1.0/24
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 192.168.1.5 192.168.1.6
exit
ip dhcp excluded-address 192.168.1.1 192.168.1.199
ip dhcp excluded-address 192.168.1.241 192.168.1.255
^Z

This example shows a Cisco router configuration as a basic DHCP server in the 192.168.1.0/24 network. The DHCP options implemented are default-router (DHCP option 3) and dns-server (DHCP option 6). Two DNS servers are configured. With the excluded-address commands, using only ip addresses between 192.168.1.200-192.168.1.240 will be available for client use.

 

17 Comments -


  1. winelle said on December 21, 2008

    where did you get the dns server?? and what ip should be use is it the lan or wan?

  2. ABC said on March 16, 2009

    DNS Servers are manually configured by the System admin… In the above example the DNS Servers are assigned IP from the Excluded range because DNS Servers need to be configured by Static IP’s..

  3. Sridhar V said on April 10, 2009

    We are getting a 4 mb internet leased line to our college. We have a cisco 2600 series router. I want to config NAT as well as DNS in the router so that the clients will be given static IP address in the local LAN side with Gate way only. WIll the router be able to resolve the DNS queries of the computers. If can please give me details how to configure the above in the router.

  4. Buddie said on August 19, 2009

    Is it really manadatory to configure dns server on the router along with the dhcp server.
    pls do mail me for details bfun4real@gmail.com .
    Thank u

  5. Anonymous said on October 17, 2009

    thanks

  6. abdulelah said on January 7, 2010

    how can configruation router until don’t change ip for client inside (the ip is dhcp between range)

  7. Anonymous said on May 9, 2010

    good one example

  8. Anonymous said on May 9, 2010

    good one example

  9. Armin_zakarian said on October 7, 2010

    almost its useful you use in your configuration :

    Specify the lease duration for the addresses you’re using from the pool.

    Router(dhcp-config)#lease 7

    ## Armin Zakarian – iran ##

  10. Martin DePores said on November 13, 2010

    How do I disable a Cisco SR2024C DHCP SERVER on this switch? I am a novice but willing to learn

  11. Jim Flerlage said on December 6, 2010

    I’am new at this and not sure of a cisco 3750 swt. when plug a IP 2002 PH INTO JUST A FREE PORT i JUST GET DIAL TONE NO PROGRAM FEATURES and what program is used in the cisco router to make the phone programable. Thanks jim.

  12. Faizrel1 said on February 13, 2011

    what purpose using for these IP range from it means without excluded ip mentioned above 192.168.1.200 192.168.1.240

  13. Fffff said on February 13, 2011

    thanx

  14. Arutembesa said on April 4, 2011

    Hi I have a Cisco router 878w , and I have a LAN, and I need to connect the router to my LAN and give it a DHCP wirless sercer setting , in case all the computers with wireless can get internet via my wireless router.

  15. Pool Installation said on June 16, 2011

    I’ll back again for sure, thanks for great article :D

  16. Gitesh said on July 12, 2011

    My requirememnt is to install DHCP for providing the IP’s automatically.. is it necessary to install DNS with it ..if yes any guidelines to install it…

  17. Gitesh said on July 12, 2011

    My requirememnt is to install DHCP for providing the IP’s automatically.. is it necessary to install DNS with it ..if yes any guidelines to install it…

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -