DHCP is relatively straightforward to configure. You can probably use the sample configuration file with very little editing, provided that your network uses the same IP address range. Still, certain aspects of DHCP require careful consideration, and this will be covered here.
The following is a 'short list' of the things that need to be accomplished
using the sample files, plus some additional information. The first step, of
course, is to install the latest version of DHCP on your computer. FreeBSD includes
the 'ISC' version of DHCP (note link above) in its 'ports' collection. For other
operating systems, such as Linux, you may have to install it as a package, via an
'RPM' or one of the other package systems. Following that, you should do each of
these steps in the order specified.
Once your DHCP system is running, you can verify its operation by connecting a computer, configuring it as a 'DHCP Client' (for windows, 'Obtain IP Address Automatically'), and then verifying that an IP address has been correctly assigned, and that you can 'ping' any locations that should be reachable through the network.
The contents of the various files are shown here. You can 'clip' the text out
of the html text and paste it into the appropriately named file, modifying the
text as needed for your operating system, machine name, domain name, and
network settings.
NOTE: The 'dhcpd.conf' file shown below was taken from the sample
file included with the 'ISC' DHCP implementation, and modified so that it would
work on the 192.168.1/24 subnet, with a domain name of WORKGROUP.local, and a
server name of FreeBSDServer. If your subnet, domain, and machine name do not
match these values, you can edit the sample file here, or make similar changes to
the sample file provided by ISC.
This is the only configuration file needed for the ISC DHCP implementation. You should edit it to match your system. The subnet chosen in this file is 192.168.1/24 and the IP address allocation range is 192.168.1.16 through 192.168.1.63 . Also the domain name is specified as 'WORKGROUP.local'. You should make the appropriate changes and save the text to the '/usr/local/etc/dhcpd.conf' file (or its equivalent, based on your operating system).
# dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks... option domain-name "WORKGROUP.local"; option domain-name-servers 192.168.1.1; # this code is defined for the "Automatically Determine Proxy Settings" feature # used by the Windows 'Internet Explorer' and Netscape web browsers. option custom-proxy-server code 252 = text; default-lease-time 600; max-lease-time -1; # This DHCP server is the official DHCP server for the local network authoritative; # ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates. # The 'ad-hoc' style works well with BIND on FreeBSD. ddns-update-style ad-hoc; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # subnet declaration (trimmed down a bit from the sample) # see 'man dhcp-options' for list of options. The options here are # specified subnet 192.168.1.0 netmask 255.255.255.0 { # this subnet allocates 192.168.1.16 through 192.168.1.63 - you can change # this if you want a different range range 192.168.1.16 192.168.1.63; # the remaining options allow clients to determine certain things about the # network automatically, such as gateways, DNS, and so forth option dhcp-server-identifier 192.168.1.1; option domain-name-servers 192.168.1.1; option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; default-lease-time 600; # setting the max lease time to '-1' means that leases are typically indefinite # if you do not want to do this, pick a shorter time in minutes, like 1440 for one day. max-lease-time -1; # SERVICES - the remaining entries are for various services that DHCP is # advertising to the network. # these next 2 are for the Samba server. If you are NOT running Samba, # you can comment them out. option netbios-name-servers 192.168.1.1; option netbios-node-type 8; # the domain name - make sure you update this! option domain-name "WORKGROUP.local"; # uncomment these next lines (and edit them) if you are running NIS # option nis-servers 192.168.1.1; # option nis-domain "WORKGROUP.local"; # if your DHCP server is operating as a router (such as NAT) uncomment this # line, or put the correct 'gateway' IP address here instead. # option routers 192.168.1.1; # if you are running the various services these refer to, uncomment them # and update the IP address information accordingly # option finger-server 192.168.1.1; # option time-servers 192.168.1.1; # option pop-server 192.168.1.1; # option smtp-server 192.168.1.1; # option www-server 192.168.1.1; # Uncomment this if you want to provide a proxy server configuration file and # indicate the correct web address in the string # option custom-proxy-server "http://192.168.1.1/wpad.pac"; } # for additional configuration options, see the documentation and the sample 'dhcpd.conf' # file that is installed with the software.
©2004-2013 by Stewart~Frazier Tools, Inc. - all rights reserved
Last Update: 6/23/2013
Back to 'Windows to UNIX®' page
Back to S.F.T. Inc. main page