linux poison RSS
linux poison Email

DHCP server Configuration in Ubuntu


At a terminal prompt, enter the following command to install dhcpd:

sudo apt-get install dhcp3-server

You will probably need to change the default configuration by editing /etc/dhcp3/dhcpd.conf to suit your needs and particular configuration.

You also need to edit /etc/default/dhcp3-server to specify the interfaces dhcpd should listen to. By default it listens to eth0.

Most commonly, what you want to do is assign an IP address randomly. This can be done with settings as follows:

# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask;
option broadcast-address;
option routers;
option domain-name-servers,;
option domain-name "mydomain.example";

subnet netmask {

This will result in the DHCP server giving a client an IP address from the range or It will lease an IP address for 600 seconds if the client doesn't ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also "advise" the client that it should use as its subnet mask, as its broadcast address, as the router/gateway and and as its DNS servers.


Post a Comment

Related Posts with Thumbnails