Border
Author: Bruce Grant, Jr. (BX)
Published: April 5, 2008
Installing a DHCP Server on Ubuntu 7.10
How I got my server up Part IV: a Guide for Linux Novices
This guide will walk through how to install and configure a DHCP server on a newly installed Ubuntu Linux Server and is meant for the complete Linux novice. The guide assumes readers have a basic knowledge of DHCP and networking principles in general. This is the fourth installment of a series of articles explaining the technologies used to bring this web site online.
If you don't know what a dhcp server is then you probably don't need to read this. Although I have a dsl modem/router that's capable of serving up dhcp to my home network I don't use it. I setup my own on an Ubuntu server. The reason is so I can configure dhcp to be aware of my dns server and control its functioning. Also, I just don't trust my dsl modem/router to do "everything" inside my network.

  1. Installing a DHCP Server on Ubuntu
    The good news is that this is really, really easy. The bad news is you have to understand networking some to grok what this all means.
    1. Install DHCP
      Lets download and install it:
      Remove udhcpd
      Somehow I got an alternative dhcp server installed named udhcpd. This messed everything up for a while. Remove it if you have it first:

    2. Configure DHCP
      Now lets configure the main dhcp config file.

      /etc/dhcp3/dhcpd.conf
      This is either going to bet 192.168.0.0 or 10.0.0.0 depending on which range you want to use for your internal IP address range. I use 192.168.0.0 so IPs in my internal network are 192.168.0.x.
      This is the range of addresses the DHCP server should hand out. I only wanted addresses from 5 - 200 in the range handed out.
      Change the IP address on this line to be the address of your dns server.
      Replace bxgrant.com with your own internal domain.
      Replace the IP address on this line with the address of our dsl modem/comcast router or whatever IP address you get your Internet from. I use dsl so 192.168.0.1 is the address of my dsl router.
      This is the IP of the last number in the range you're using (just make sure the last number is 255).

      Lastly some distributions of ubuntu don't send the host-name of the domain with requests by default. Lets check and make sure it is.

      dhclinet.conf Host Name Check
      Make sure there's a line in the file that's NOT commented that starts with "send host-name" and then modify the domain to reflect your network. If it's not there add it. If it's commented, uncomment it and add your domain.
    3. Start/stop/restart DHCP
      sysvconfig
      I use "sysvconfig" to manage services so the code below won't work unless you install sysvconfig:

      Then to start/stop/restart your dhcp server:
Comments
Be the first to add a comment.
Add a Comment
User:
Anonymous (Login or Create Account or Help)
Border