Page 191 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 191
Operating System Tools
Notes option ip-forwarding off;
# Set the broadcast address and subnet mask
# to be used by the DHCP clients
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
# Set the NTP server to be used by the
# DHCP clients
option ntp-servers 192.168.1.100;
# Set the DNS server to be used by the
# DHCP clients
option domain-name-servers 192.168.1.100;
# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:
option netbios-name-servers 192.168.1.100;
# You can also assign specific IP addresses based on the clients’
# ethernet MAC address as follows (Host’s name is “laser-printer”:
host laser-printer {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.222;
}
}
#
# List an unused interface here
#
subnet 192.168.2.0 netmask 255.255.255.0 {
}
There are many more options statements you can make use to configure DHCP. These include
telling the DHCP clients where to go for services such as finger and IRC. Check the dhcp-options
man page after you do your install:
[root@bigboy tmp]# man dhcp-options
The host statement seen in the sample dhcpd.conf file can be very valuable. Some devices such as
network printers default to getting their IP addresses using DHCP, but users need to access them
by a fixed IP address to print their documents. This statement can be used to always provide
specific IP address to DHCP queries from a predefined a NIC MAC address. This can help to
reduce systems administration overhead.
10.4.3 Configuring DHCP
The configuration file for your DHCP server is the /etc/dhcpd.conf file. This file has numerous
configuration commands that operate the server and provide configuration information to the
clients.
A DHCP server can supply service to individual hosts through static address assignments
(useful for servers) or to an entire subnet of hosts through dynamic address assignments. The
configuration file uses host and subnet statements that identify the client systems.
184 LOVELY PROFESSIONAL UNIVERSITY