Installing DHCP server in Linux

Say, you want to install a DHCP server to your Raspberry Pi (Running Raspbian Linux OS, a version of Debian, similar to Ubuntu and Mint ) computer for a subnet 192.168.10.*.

It’s very easy, actually.

Install the server software (and ignore the startup failure message at the end of installation):

apt-get install isc-dhcp-server
Edit the configuration file (very simple basic config is shown):
/etc/dhcp/dhcpd.conf

To contain this:

ddns-update-style none;

option domain-name “my_domain.my_lan”;
option domain-name-servers 8.8.8.8, 8.8.4.4;

default-lease-time 86400;
max-lease-time 604800;
    
authoritative;

subnet 192.168.10.0 netmask 255.255.255.0 {
 range 192.168.10.30 192.168.10.254;
 option routers 192.168.10.1;
}

Restart the DHCP server:
/etc/init.d/isc-dhcp-server restart

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s