FreeNAS 8.0 Dhcpd 2 – Creating A Basic DHCP Configuration
The next step in the installation of the ISC DHCP Server on a FreeNAS 8.0 server is to create the configuration file.
The steps in this article provide details of how to create a very basic DHCP configuration file which has a Pool of ten addresses. For a more in depth explanation of the ISC DHCP Server configuration file options please see the article here
A sample dhcp.conf file can also be found under the directory /usr/local/etc/dhcpd.conf.sample which can be copied and modified for your needs.
To create a basic configuration file perform the following steps :-
- Logon to the FreeNAS server through SSH as the root user
- Edit the file /conf/base/etc/local/dhcpd.conf by executing the following command :-
vi /conf/base/etc/local/dhcpd.conf
- In the new file add the following lines :-
ddns-update-style ad-hoc;
log-facility local7;
subnet {Your IP Subnet} netmask {Your netmask} {
range {Starting IP Address of the range} {Ending IP Address of the range}
default-lease-time 600;
max-lease-time 7200;
}
- Save and Exit the file
Below is an example of the above using the 192.168.0.0 IP Subnet with a netmask of 255.255.255.0
ddns-update-style ad-hoc;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.20
default-lease-time 600;
max-lease-time 7200;
}