Ubuntu DHCP Setting

ubuntu dhcpUbuntu is Linux distro which came later after the transition of the century when some distros rises to fame and some fail. Ubuntu is based on Debian GNU/Linux operating system and uses many debian package management and tools.

Although Ubuntu was realased after the distro of the early days of Linux such as Debian, RedHat, SuSE, it is considered as one of the most famous distros. According to W3Techs Ubuntu is installed on 26.1% of all Linux website, just behind Debian with 32.7%.

Join hundreds of other students who have had success with Ubuntu Linux with this acclaimed course.

The story of Ubuntu
Ubuntu Linux is a complete operating system for desktop, server, phone, tablet, TV and cloud. The name Ubuntu is derived from South African philosophy of humanity toward others.

Ubuntu began in 2005, when Mark Shuttleworth founded the Ubuntu foundation, aimed to develop and Open Source operating system that funded by his own company, Canonical Ltd. Shuttleworth is a founder of Thawte, company who focused on certificate authority and Internet security. In 1999, Thawte was purchased by VeriSign and Shuttleworth received about the equal amount of USD 575 million.

Ubuntu’s aim is to be a complete operating system and stays in the free software movement which emphasizing the freedom to use software without any restriction or limitation. Therefore Ubuntu has its separate package for desktop and server. This approach made Ubuntu has different package that improve users choice which package they want to install, whether on desktop or server. This approach making Ubuntu as the first distro which differentiate the package. Normally, Linux distro do not made separate package for desktop and server. They pack all into one package, and users choose at the installation process which package they want to install: as server or as desktop.

Compared to other distros, suh as RedHat which is now a commercial version, Ubuntu stays on track as a Free Software system, which gives user freedom to study, adapt, modify, and distribute the software as is. Ubuntu has been chosen in many publicized large scale deployment and elected as the best Linux distro in 2005 by LinuxWorld Reader, and InfoWorld in 2007 awarded Ubuntu as the best open source desktop operating system.

The consistent focus on Linux as open source and free software has made Ubuntu its mark. Some other companies who started out publishing Linux distro has made their distro into commercial version and release the secondary distro for public, while the original distro became the flagship for corporate market. There are some business deal the Linux company made which makes many open source communities sees the business decision as unfavorable to Open Source. Such company like RedHat that began in 1995 to release the Red Hat Linux now has focused its support on its Enterprise scale. SuSE Linux is now owned by Novell.

As a recognition to the professional using Red Hat, the company also released its certification called RedHat Certified Engineer (RHCE). If you would like to have a Linux certification on an enterprise level RedHat, the RHCE is for you, You can take the exam preparation in Udemy course for RedHat Certified Engineer Exam.

Therefore, open source community see that Ubuntu, backed by Canonical Ltd has been consistently promoting the Open Source software. Since the business model for supporting Ubuntu is different than its predecessor that published Linux distro. The outcome is that Ubuntu has been known to have some high profile deployment such as the following:

  • Macedonia –  The Ministry of Education and Science installed more than 180,000 Ubuntu-based classroom desktops, and encourages every student in the country to use Ubuntu-powered computer workstations
  • Spain –  195,000 of Ubuntu desktop is installed in Spanish school
  • France – Police department since 2006 replace all their desktop operating system to Ubuntu
  • India – in 2011 Ubuntu is adopted into Indian Justice System
  • Germany – City of Munich, Bavaria forked (modified a version into a new version) of Ubuntu into their own version and used it in the city computer
  • Iceland – In March 2012, the government of Iceland introduce a project to have all the public institution in the country to use free and open source software (foss). One of the key factors for the decision is cost saving and to avoid vendor lock-in, the dependency to vendor.

In order to know more about Ubuntu, you can take the Learning Ubuntu Linux course, a practical easy to follow course on Ubuntu which will guide you to use Ubuntu from installation to managing your Ubuntu desktop. There is also the course to learn the Ubuntu server, which you can enroll in order to learn how to manage your Ubuntu server effectively.

Ubuntu DHCP Configuration
Let us go down to the nitty gritty of how to setup a DHCP server in Ubuntu. A DHCP stands for Dynamic Host Configuration Protocol (DHCP) is a network service that enables host computers to be automatically assigned settings from a server, including its IP address, routing, DNS address and other individual network setting.

The DHCP process consist of four simple step from client request to server handling the request:

  1. Client request IP lease to the DHCP server available
  2. Server offer the list of IP to be leased
  3. Client select the IP from the list
  4. Server acknowledged the selection and IP is assigned to the client.

DHCP Process

To setup the DHCP server for Ubuntu it is a straightforward process, just like the other Linux system if you are familiar with them. All you need is a dhcpd package in your Ubuntu machine. You can achieve this from the command line interface at the terminal prompt:
# sudo apt-get install isc-dhcp-server

That will install dhcp server package for your Ubuntu. The next step is to change the default configuration by editing the file /etc/dhcp/dhcpd.conf to suit your dhcp setting and configuration.  Below is the sample of simple dhcpd.conf setting

default-lease-time 600;
max-lease-time 7200;

subnet netmask {
option routers;
option domain-name-servers,;
option domain-name “mydomain.example”;

  • Default-lease-time = IP Lease time by default is set in second
  • Max-lease-time = Maximum time IP is leased to the client
  • Subnet & Netmask = the network subdivision which the server handle
  • Range = the range of IP to be leased to clients
  • Option = it specifies the setting to set for the clients computer, including the default router (option routers), DNS server setting (option domain-name-servers) and domain name (option domain-name)

Once you have set the configuration, run the following command from command line prompt to restart the dhcp server service as root:
# /etc/init.d/isc-dhcp-server restart

If you do not login as root, use the following command
# sudo /etc/init.d/isc-dhcp-server restart

You will be asked to provide root password. When it is done, your DHCP server in Ubuntu is up and running. You are ready to serve the clients computer.

For more network related course, you may want to consider to take Becoming network engineer course or CompTIA Network+ course.