OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

3.2. Configuration


The error message the installation ends with might be a little confusing, but the following steps will help you configure the service:


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


# minimal sample /etc/dhcp/dhcpd.conf default-lease-time 600;

max-lease-time 7200;


subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.150 192.168.1.200;

option routers 192.168.1.254;

option domain-name-servers 192.168.1.1, 192.168.1.2; option domain-name "mydomain.example";

}


This will result in the DHCP server giving clients an IP address from the range 192.168.1.150-192.168.1.200. 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 to use 192.168.1.254 as the default-gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers.


After changing the config file you have to restart the dhcpd:


sudo systemctl restart isc-dhcp-server.service


Top OS Cloud Computing at OnWorks: