venerdì 16 dicembre 2011

Configure DHCP server onto Ubuntu Server 11.04

Hi all,
today I will show you how to configure a DHCP server onto Ubuntu Server 11.04 already running.

first you should check that the server has a static ip address,

vi /etc/network/interfaces

in my case is something like this:

auto eth0
iface eth0 inet static

then check for the name servers:

vi /etc/resolv.conf

I have this:

if you change yours files (interfaces and/or resolv.conf) , you need to type this:

/etc/init.d/networking restart

check also your hostname file:

vi /etc/hosts

should be something like this:          localhost.localdomain  localhost server1

bcause in my case the server is called "server1"

DHCP installation and configuration

First download and install the dhcp service:

sudo apt-get install dhcp3-server

after the installation you will see a failed status, but it's ok, because we still need to configure the service.

vi /etc/dhcp/dhcpd.conf

Now we are going to change the file to configure our subnet,
in my case my server is so my configuration will be something like this:

subnet netmask {
 option broadcast-address;
 option routers;

This way the service will release addresses in the range ->

save the file and restart the dhcp service:

/etc/init.d/isc-dhcp-server start

Now the dhcp should be working fine.

There are a lot of other options that can be configured in the dhcpd.conf file, check the documentaiton for that


Nessun commento:

Posta un commento