How to install and configure DHCP Server in Ubunut 17.04



Install DHCP package
sudo apt-get install isc-dhcp-server

Make below entry in configuration file /etc/dhcp/dhcpd.conf

$ sudo vim  /etc/dhcp/dhcpd.conf
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;

authoritative;

subnet 10.0.0.0 netmask 255.255.255.0 {
     option routers 10.0.0.1;
     option subnet-mask 255.255.255.0;
     option domain-name-servers 8.8.8.8,4.2.2.2;
     range dynamic-bootp 10.0.0.200 10.0.0.254;
}

Start and enable service
sudo systemctl enable isc-dhcp-server.service
sudo systemctl start isc-dhcp-server.service
sudo systemctl status isc-dhcp-server.service


Error:
Jul 27 22:05:24 shahzad-virtual-machine systemd[1]: isc-dhcp-server.service: Main process exited, code=exited, status=1/FAILURE
Jul 27 22:05:24 shahzad-virtual-machine systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Jul 27 22:05:24 shahzad-virtual-machine systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.

Solutions:
Need to check correct parameter in configuration file and also need to check the subnet range according to LAN network.

Check configuration file
sudo dhcpd -t -cf /etc/dhcp/dhcpd.conf
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

9 comments:

  1. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

    ReplyDelete
  2. You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
    python training institute in chennai
    python training in Bangalore
    python training in pune
    python online training

    ReplyDelete
  3. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.

    java training in omr | oracle training in chennai

    java training in annanagar | java training in chennai

    ReplyDelete
  4. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    angularjs Training in btm

    angularjs Training in electronic-city

    angularjs online Training

    angularjs Training in marathahalli

    angularjs interview questions and answers

    ReplyDelete
  5. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  6. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ReplyDelete