Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I install DHCP Server with

but I need to make reserve IP addresses for specific machine (192.168.1.XXX) and further to assign a name to each machine (machine 1 machine 2 machine 3).

My configuration file is as follows.

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

subnet netmask {
option routers;
option domain-name-servers 192.168.1.x,;
option domain-name "mydomain.lan"; }

This is to replace fortinet service and add hostnames for each IP assigned and have control of them.

If there is any visual alternative (via web) to manage what I need, would be helpful.

share|improve this question
up vote 5 down vote accepted

In this example the DHCP server IP address reservation will use the NIC's MAC Address. You need to know the MAC address to add it to DHCP configuration file. (I will be using a dummy MAC address and IP address in the example).

To find the MAC address use ifconfig, and look for the HWaddr entry

To do so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo nano /etc/dhcp3/dhcpd.conf

and add the following lines:

host Accountant {
hardware ethernet 00:1F:6A:21:71:3F;

Save file and exit.

Now the DHCP server will always assign to the 00:1F:6A:21:71:3F MAC address.

Restart DHCP

service dhcpd restart


sudo /etc/init.d/dhcp3-server restart
share|improve this answer
So if I have it clear, in fact that it makes my Fortinet device, but want to be able to further identify the MAC address to assign its hostname – JHOSMAN Dec 18 '13 at 18:55
Are you asking if you have to know the MAC address of all devices that you need to reserve and IP for? – Mitch Dec 18 '13 at 19:05
There are many machines that I administer, it would be easier if you could put an alias or hostname to search for them and not a MAC address. – JHOSMAN Dec 18 '13 at 19:15
It's possible to my question? ** host NAMEHOST { ... }** host HSLABTEACHER01 { hardware ethernet 00:25:64:be:3f:48; fixed-address; } host ESLABTEACHER01 { hardware ethernet 00:25:64:c2:c4:d7; fixed-address; } host NOTE2 { hardware ethernet e0:cb:4e:37:2b:92; fixed-address; } host ACCOUNTANT { hardware ethernet 44:87:fc:95:de:3f; fixed-address; } host SECRETARY { hardware ethernet 00:26:2d:2e:19:c1; fixed-address; } – JHOSMAN Dec 18 '13 at 19:19
You may want to take a look at DHCP – Mitch Dec 18 '13 at 19:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.