Tags

, ,

To set up DHCP on Debian, we first need to install the dhcp server package.

apt-get install dhcp3-server

 

After the package is sucessfully installed,we can now proceed to configure the configuration files.

open up /etc/dhcp/dhcpd.conf

To add a scope, add the following lines

subnet 192.168.10.0 netmask 255.255.255.0 {

  range 192.168.10.200 192.168.10.254;

  option broadcast-address 192.168.10.255;

  option routers 192.168.10.1;

  option domain-name-servers 192.168.10.10;

  option domain-name “wssX.local”;

  default-lease-time 3600;

}

 

To reserve static ip addresses for certain machines, add the following lines

host statichost {

  hardware ethernet 12:34:56:78:90:AB;

  fixed-address 192.168.10.10;

}

 

Save and exit the text editor.

Restart the DHCP service.

service isc-dhcp-server restart

 

Connect a client to the network and verify if the DHCP server is working.

Advertisements