How to Install a DHCP Server in Ubuntu and Debian

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

10 Responses

  1. Shuvo says:


    I like to add 3/4 different network on the DHCP pool/range.

    Here is a example:

    subnet netmask {
            option routers        ;
            option subnet-mask    ;
            option domain-search            "tecmint.lan";
            option domain-name-servers;

    Note: I like to add this because I have over 400 mobile/laptop user so I was thing if filter with different IP series it will be very easy to maintain.

    Please let me know is it possible ?

    • Lord Randy says:

      You could do that, but your configuration is wrong. You need to learn about subnet masking. Your netmask would need to allow for all those clients to fit in the range. After that you could add all the subnets you want and need.

      Another issue you will run into is broadcast storms with that many clients on the same network partition. This will be even worse if you are using wireless comms.

      If you want to carry on then something like this should do the trick:

      A subnet of will yield = –

      No you can’t just start from .10.x because that subnet is in the middle of another one.

      subnet netmask {
              option routers              ;
              option subnet-mask    ;
              option domain-search            "tecmint.lan";
              option domain-name-servers;

      It looks weird to most people but is a usable address in this subnet. This will give you the first 10 IP address in each number range to be static if you want but maximises on usable address in the dhcp server.

      I would also recommend looking into splitting this into 2 maybe 4 servers. DHCP works on a race. The first server to respond can issue the IP address. Therefore if one of your servers breaks, then the others can still service your clients.
      People don’t like it when “the internet” breaks.

  2. gaboutel says:


    I installed a Debian 9 on a machine, then I configured my network to be able to download on the internet the packets for the DCHP and the DNS

    I installed the 2 packets, then I changed dns to pass on my local network and not that of the company. After I started the network card, now I want to know if we configure the DNS server well before the DHCP server?

  3. Angel Ascanio says:

    Thanks for the article. Question: How do I start/stop the DHCP daemon??

  4. wassim says:

    When i try to install DHCP Server in Ubuntu it says.

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package isc-dhcp-server
    • Aaron Kili says:


      Try to update your system package list from all configured source like this:
      $sudo apt update

      Then try to install isc-dhcp-server once more. If it still fails, let us know.

  5. Blake says:

    “And also remember to configure a static IP address for the interface above.” — Do you mean an IP for the DHCP Range or a static ip say from my network?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.