<chapter id="chap2-26"><title>Planning for DHCP Service (Tasks)</title><highlights><para>You can use the DHCP service in a network that you are creating or in
a network that exists. If you are setting up a network, see <olink targetptr="ipplan-1" remap="internal">Chapter&nbsp;2, Planning an IPv4 Addressing Scheme (Tasks</olink> before
you attempt to set up the DHCP service. If the network already exists, continue
in this chapter.</para><para>This chapter describes what you need to do before you set up the DHCP
service on your network. The information is intended for use with DHCP Manager,
although you can also use the command-line utility <literal>dhcpconfig</literal> to
set up the DHCP service.</para><itemizedlist><para>This chapter contains the following information:</para><listitem><para><olink targetptr="chapter2-4" remap="internal">Preparing Your Network for the
DHCP Service (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="chapter2-29" remap="internal">Making Decisions for Your DHCP
Server Configuration (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="chapter2-30" remap="internal">Making Decisions for IP Address
Management (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-plan-1" remap="internal">Planning for Multiple DHCP
Servers</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-plan-2" remap="internal">Planning DHCP Configuration
of Your Remote Networks</olink></para>
</listitem><listitem><para><olink targetptr="chapter2-34" remap="internal">Selecting the Tool for Configuring
DHCP</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="chapter2-4"><title>Preparing Your Network for the DHCP Service
(Task Map)</title><para>Before you set up your network to use DHCP, you must collect information
to help you make decisions for configuring one or more servers. Use the following
task map to identify the tasks for preparing your network for DHCP.</para><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="33*"/><colspec colname="colspec1" colwidth="33*"/><colspec colname="colspec2" colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Map your network topology.</para>
</entry><entry><para>Determine and locate the services that are available on the network.</para>
</entry><entry><para><olink targetptr="chapter2-5" remap="internal">Mapping Your Network Topology</olink></para>
</entry>
</row><row><entry><para>Determine the number of DHCP servers you need.</para>
</entry><entry><para>Use the expected number of DHCP clients as a basis for determining the
number of DHCP servers you need.</para>
</entry><entry><para><olink targetptr="dhcp-plan-3" remap="internal">Determining the Number of DHCP Servers</olink></para>
</entry>
</row><row><entry><para>Update system files and <filename>netmasks</filename> table.</para>
</entry><entry><para>Reflect the network topology accurately.</para>
</entry><entry><para><olink targetptr="chapter2-7" remap="internal">Updating System Files and Netmask Tables</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><sect2 id="chapter2-5"><title>Mapping Your Network Topology</title><para>If you have not already done so, you should map the physical structure
of your network. Indicate the location of routers and clients, and the location
of servers that provide network services. This map of your network topology
can help you determine which server to use for the DHCP service. The map can
also help you determine the configuration information that the DHCP server
can provide to clients.</para><para>See <olink targetptr="ipplan-1" remap="internal">Chapter&nbsp;2, Planning an IPv4 Addressing Scheme (Tasks</olink> for more information about planning your network.</para><itemizedlist><para>The DHCP configuration process can gather some network information from
the server's system and network files. <olink targetptr="chapter2-7" remap="internal">Updating
System Files and Netmask Tables</olink> discusses these files. However, you
might want to give clients other service information, which you must enter
into the server's macros. As you examine your network topology, record the
IP addresses of any servers you want your clients to know about. The following
servers, for example, might provide services on your network. The DHCP configuration
does not discover these servers.</para><listitem><para>Time server</para>
</listitem><listitem><para>Log server</para>
</listitem><listitem><para>Print server</para>
</listitem><listitem><para>Install server</para>
</listitem><listitem><para>Boot server</para>
</listitem><listitem><para>Web proxy server</para>
</listitem><listitem><para>Swap server</para>
</listitem><listitem><para>X Window font server</para>
</listitem><listitem><para>Trivial File Transfer Protocol (TFTP) server</para>
</listitem>
</itemizedlist><sect3 id="chapter2-6"><title>Network Topology to Avoid</title><para>In some IP network environments, several local area networks (LANs)
share the same network hardware media. The networks may use multiple network
hardware interfaces or multiple logical interfaces. DHCP does not work well
in this kind of shared media network. When multiple LANs run across the same
physical network, a DHCP client's request arrives on all network hardware
interfaces. This effect makes the client appear to be attached to all of the
IP networks simultaneously.</para><para>DHCP must be able to determine the address of a client's network in
order to assign an appropriate IP address to the client. If more than one
network is present on the hardware media, the server cannot determine the
client's network. The server cannot assign an IP address without knowing the
network number.</para><itemizedlist><para>You can use DHCP on only one of the networks. If one network does not
suit your DHCP needs, you must reconfigure the networks. You should consider
the following suggestions:</para><listitem><para>Use a variable length subnet mask (VLSM) on your subnets to
make better use of the IP address space you have. You may not need to run
multiple networks on the same physical network. See the <olink targetdoc="refman4" targetptr="netmasks-4" remap="external"><citerefentry><refentrytitle>netmasks</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page for information about
implementing variable length subnetting. For more detailed information about
Classless Inter-Domain Routing (CIDR) and VLSM, see <ulink url="http://www.ietf.org/rfc/rfc1519.txt" type="url"></ulink>.</para>
</listitem><listitem><para>Configure the ports on your switches to assign devices to
different physical LANs. This technique preserves the mapping of one LAN to
one IP network, required for Solaris DHCP. See the documentation for the switch
for information about port configuration.</para>
</listitem>
</itemizedlist>
</sect3>
</sect2><sect2 id="dhcp-plan-3"><title>Determining the Number of DHCP Servers</title><para>The data store option that you choose has a direct effect on the
number of servers you must have to support your DHCP clients. The following
table shows the maximum number of DHCP and BOOTP clients that can be supported
by one DHCP server for each data store.</para><table frame="topbot" id="dhcp-plan-tbl-3"><title>Estimated Maximum Number
of Clients Supported by One DHCP Server</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="32.98*"/><colspec colname="colspec1" colwidth="67.02*"/><thead><row rowsep="1"><entry><para>Data Store Type</para>
</entry><entry><para>Maximum Number of Clients Supported</para>
</entry>
</row>
</thead><tbody><row><entry><para>Text files</para>
</entry><entry><para>10,000</para>
</entry>
</row><row><entry><para>NIS+</para>
</entry><entry><para>40,000</para>
</entry>
</row><row><entry><para>Binary files</para>
</entry><entry><para>100,000</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>This maximum number is a general guideline, not an absolute number.
A DHCP server's client capacity depends greatly on the number of transactions
per second that the server must process. Lease times and usage patterns have
a significant impact on the transaction rate. For example, suppose leases
are set to 12 hours and users turn their systems off at night. If many users
turn on their systems at the same time in the morning, the server must handle
transaction peaks as many clients request leases simultaneously. The DHCP
server can support fewer clients in such an environment. The DHCP server can
support more clients in an environment with longer leases, or an environment
that consists of constantly connected devices such as cable modems.</para><para>The section <olink targetptr="chapter2-39" remap="internal">Choosing the DHCP Data Store</olink> compares
the types of data stores.</para>
</sect2><sect2 id="chapter2-7"><title>Updating System Files and Netmask Tables</title><para>During DHCP configuration, the DHCP tools scan various system files
on your server for information that can be used to configure the server.</para><para>You must be sure the information in the system files is current before
you run DHCP Manager or <literal>dhcpconfig</literal> to configure your server.
If you notice errors after you configure the server, use DHCP Manager or <literal>dhtadm</literal> to modify the macros on the server.</para><para>The following table lists some of the information gathered during
DHCP server configuration, and the sources for the information. Be sure this
information is set correctly on the server before you configure DHCP on the
server. If you make changes to the system files after you configure the server,
you should reconfigure the service to reflect these changes.</para><table frame="topbot" id="chapter2-tbl-8"><title>Information Used for DHCP
Configuration</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colwidth="115*"/><colspec colwidth="119*"/><colspec colwidth="162*"/><thead><row rowsep="1"><entry><para>Information</para>
</entry><entry><para>Source</para>
</entry><entry><para>Comments</para>
</entry>
</row>
</thead><tbody><row><entry><para>Time zone</para>
</entry><entry><para>System date, time zone settings</para>
</entry><entry><para>The date and time zone are initially set during Solaris installation.
You can change the date by using the <command>date</command> command. You
can change the time zone by editing the <filename>/etc/default/init</filename> file
to set the <envar>TZ</envar> environment variable. See the <olink targetdoc="refman4" targetptr="uc-timezone-4" remap="external"><citerefentry><refentrytitle>TIMEZONE</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page for
more information.</para>
</entry>
</row><row><entry><para>DNS parameters</para>
</entry><entry><para><filename>/etc/resolv.conf</filename> </para>
</entry><entry><para>The DHCP server uses the <filename>/etc/resolv.conf</filename> file
to obtain DNS parameters such as the DNS domain name and DNS server addresses.
See <olink targetdoc="sysadv5" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)</citetitle></olink> or
the <olink targetdoc="refman4" targetptr="resolv.conf-4" remap="external"><citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page for more information about <command>resolv.conf</command>.</para>
</entry>
</row><row><entry><para>NIS or NIS+ parameters</para>
</entry><entry><para>System domain name, <filename>nsswitch.conf</filename>, NIS or NIS+</para>
</entry><entry><para>The DHCP server uses the <command>domainname</command> command to obtain
the domain name of the server system. The <filename>nsswitch.conf</filename> file
tells the server where to look for domain-based information. If the server
system is an NIS or NIS+ client, the DHCP server performs a query to get NIS
or NIS+ server IP addresses. See the <olink targetdoc="refman4" targetptr="nsswitch.conf-4" remap="external"><citerefentry><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page for more information.</para>
</entry>
</row><row><entry><para>Default router</para>
</entry><entry><para>System routing tables, user prompt</para>
</entry><entry><para>The DHCP server searches the network routing tables to find the default
router for clients that are attached to the local network. For clients not
on the same network, the DHCP server must prompt you for the information.</para>
</entry>
</row><row><entry><para>Subnet mask</para>
</entry><entry><para>Network interface, <filename>netmasks</filename> table</para>
</entry><entry><para>The DHCP server looks to its own network interfaces to determine the
netmask and broadcast address for local clients. If the request was forwarded
by a relay agent, the server obtains the subnet mask in the <literal>netmasks</literal> table
on the relay agent's network.</para>
</entry>
</row><row><entry><para>Broadcast address</para>
</entry><entry><para>Network interface, <filename>netmasks</filename> table</para>
</entry><entry><para>For the local network, the DHCP server obtains the broadcast address
by querying the network interface. For remote networks, the server uses the
BOOTP relay agent's IP address and the remote network's netmask to calculate
the broadcast address for the network.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
</sect1><sect1 id="chapter2-29"><title>Making Decisions for Your DHCP Server Configuration
(Task Map)</title><para>This section discusses some of the decisions to make before you configure
the first DHCP server on your network. Use this task map to identify the decisions
that you must make.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Select a server for DHCP.</para>
</entry><entry><para>Determine if a server meets the system requirements to run the DHCP
service.</para>
</entry><entry><para><olink targetptr="chapter2-38" remap="internal">Selecting a Host to Run the DHCP Service</olink></para>
</entry>
</row><row><entry><para>Choose a data store.</para>
</entry><entry><para>Compare the data store types to determine the best data store for your
site.</para>
</entry><entry><para><olink targetptr="chapter2-39" remap="internal">Choosing the DHCP Data Store</olink></para>
</entry>
</row><row><entry><para>Set a lease policy.</para>
</entry><entry><para>Learn about IP address leases to help you determine appropriate lease
policy for your site.</para>
</entry><entry><para><olink targetptr="chapter2-40" remap="internal">Setting a Lease Policy</olink></para>
</entry>
</row><row><entry><para>Select a router address or router discovery.</para>
</entry><entry><para>Determine whether DHCP clients use router discovery or a specific router.</para>
</entry><entry><para><olink targetptr="chapter2-41" remap="internal">Determining Routers for DHCP Clients</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><sect2 id="chapter2-38"><title>Selecting a Host to Run the DHCP Service</title><para>With your network topology in mind, you can use the following
system requirements to select a host on which to set up a DHCP server.</para><itemizedlist><para>The host must meet the following requirements:</para><listitem><para>The host must run the Solaris 2.6 release or later. If you
need to support a large number of clients, you must install the Solaris 8
7/01 release or a later version.</para>
</listitem><listitem><para>The host must be accessible to all the networks that have
clients that plan to use DHCP, either directly on the network or through a
BOOTP relay agent.</para>
</listitem><listitem><para>The host must be configured to use routing.</para>
</listitem><listitem><para>The host must have a correctly configured <filename>netmasks</filename> table
that reflects your network topology.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="chapter2-39"><title>Choosing the DHCP Data Store</title><para>You can choose to store the DHCP data in text files, binary files,
or the NIS+ directory service. The following table summarizes the features
of each type of data store, and indicates the environment in which to use
each data store type.</para><table frame="topbot" pgwide="1" id="dhcp-plan-tbl-1"><title>Comparison of
DHCP Data Stores</title><tgroup cols="5" colsep="0" rowsep="0"><colspec colname="colspec1" colwidth="68.87*"/><colspec colname="colspec6" colwidth="63.64*"/><colspec colname="colspec3" colwidth="89.87*"/><colspec colname="colspec7" colwidth="68.41*"/><colspec colname="colspec4" colwidth="127.24*"/><thead><row rowsep="1"><entry><para>Data Store Type</para>
</entry><entry><para>Performance</para>
</entry><entry><para>Maintenance</para>
</entry><entry><para>Sharing</para>
</entry><entry><para>Environment</para>
</entry>
</row>
</thead><tbody><row><entry><para>Binary files</para>
</entry><entry><para>High performance, high capacity</para>
</entry><entry><para>Low maintenance, no database servers required. Contents must be viewed
with DHCP Manager or <literal>dhtadm</literal> and <literal>pntadm</literal>.
Regular file backups suggested.</para>
</entry><entry><para>Data stores cannot be shared among DHCP servers.</para>
</entry><entry><para>Midsize to large environments with many networks with thousands of clients
per network. Useful for small to medium ISPs.</para>
</entry>
</row><row><entry><para>NIS+ </para>
</entry><entry><para>Moderate performance and capacity, dependent upon NIS+ service's performance
and capacity</para>
</entry><entry><para>DHCP server system must be configured as an NIS+ client. Requires NIS+
service maintenance. Contents must be viewed with DHCP Manager or <literal>dhtadm</literal> and <literal>pntadm</literal>. Regular backup with <literal>nisbackup</literal> is
suggested.</para>
</entry><entry><para>DHCP data is distributed in NIS+, and multiple servers can access the
same containers.</para>
</entry><entry><para>Small to midsize environments with up to 5000 clients per network.</para>
</entry>
</row><row><entry><para>Text files</para>
</entry><entry><para>Moderate performance, low capacity</para>
</entry><entry><para>Low maintenance, no database servers required. ASCII format is readable
without DHCP Manager, <literal>dhtadm</literal>, or <literal>pntadm</literal>.
Regular file backups suggested.</para>
</entry><entry><para>Data store can be shared among DHCP servers if DHCP data is stored on
one file system that is exported through an NFS mount point.</para>
</entry><entry><para>Small environments with less than 10,000 clients, with a few hundred
to a thousand clients per network.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>Traditional NIS is not offered as a data store option because NIS does
not support fast incremental updates. If your network uses NIS, you should
use text files or binary files for your data store.</para>
</sect2><sect2 id="chapter2-40"><title>Setting a Lease Policy</title><para>A <emphasis>lease</emphasis> specifies the amount of time the
DHCP server permits a DHCP client to use a particular IP address. During the
initial server configuration, you must specify a site-wide lease policy. The <emphasis>lease policy</emphasis> indicates the lease time and specifies whether clients
can renew their leases. The server uses the information that you supply to
set option values in the default macros that the server creates during configuration.
You can set different lease policies for specific clients or type of clients,
by setting options in configuration macros you create.</para><para>The <emphasis>lease time</emphasis> is specified as a number of
hours, days, or weeks for which the lease is valid. When a client is assigned
an IP address, or renegotiates a lease on an IP address, the lease expiration
date and time is calculated. The number of hours in the lease time is added
to the timestamp on the client's DHCP acknowledgement. For example, suppose
the timestamp of the DHCP acknowledgment is September 16, 2005 9:15 A.M.,
and the lease time is 24 hours. The lease expiration time in this example
is September 17, 2005 9:15 A.M. The lease expiration time is stored in the
client's DHCP network record, viewable in DHCP Manager or with the <command>pntadm</command>utility.</para><para>The lease time value should be relatively small so that expired addresses
are reclaimed quickly. The lease time value also should be large enough to
outlast DHCP service disruptions. Clients should be able to function while
the system that runs the DHCP service is repaired. A general guideline is
to specify a time that is two times the predicted downtime of a system. For
example, if you need four hours to obtain and replace a defective part and
reboot the system, specify a lease time of eight hours.</para><para>The lease negotiation option determines whether a client can renegotiate
its lease with the server before the lease expires. If lease negotiation is
allowed, the client tracks the time that remains in its lease. When half of
the lease time has passed, the client requests the DHCP server to extend its
lease to the original lease time. You should disable lease negotiation in
environments where there are more systems than IP addresses. The time limit
is then enforced on the use of IP addresses. If there are enough IP addresses,
you should enable lease negotiation to avoid forcing clients to take down
their network interfaces when leases expire. If you make clients obtain new
leases, the clients' TCP connections such as NFS and telnet sessions might
be interrupted. You can enable lease negotiation for all clients during the
server configuration. You can enable lease negotiation for particular clients
or particular types of clients through the use of the <literal>LeaseNeg</literal> option
in configuration macros.</para><note><para>Systems that provide services on the network should retain their
IP addresses. Such systems should not be subject to short-term leases. You
can use DHCP with such systems if you assign reserved manual IP addresses
to those systems, rather than IP addresses with permanent leases. You can
then detect when the system's IP address is no longer in use.</para>
</note>
</sect2><sect2 id="chapter2-41"><title>Determining Routers for DHCP Clients</title><para>Host systems use routers for any network communication beyond
their local network. The hosts must know the IP addresses of these routers.</para><para>When you configure a DHCP server, you must provide DHCP clients with
router addresses in one of two ways. One way is to provide specific IP addresses
for routers. However, the preferred method is to specify that clients should
find routers with the router discovery protocol.</para><para>If clients on your network can perform router discovery, you should
use the router discovery protocol, even if there is only one router. Router
discovery enables a client to adapt easily to router changes in the network.
For example, suppose that a router fails and is replaced by a router with
a new address. Clients can discover the new address automatically without
having to obtain a new network configuration to get the new router address.</para>
</sect2>
</sect1><sect1 id="chapter2-30"><title>Making Decisions for IP Address Management
(Task Map)</title><para>As part of the DHCP service setup, you determine several aspects
of the IP addresses that the server is to manage. If your network needs more
than one DHCP server, you can assign responsibility for some IP addresses
to each server. You must decide how to divide responsibility for the addresses.
The following task map can help you make IP address management decisions.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="33*"/><colspec colname="colspec1" colwidth="33*"/><colspec colname="colspec2" colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Specify which addresses that the server should manage.</para>
</entry><entry><para>Determine how many addresses you want the DHCP server to manage, and
what those addresses are.</para>
</entry><entry><para><olink targetptr="chapter2-31" remap="internal">Number and Ranges of IP Addresses</olink></para>
</entry>
</row><row><entry><para>Decide if the server should automatically generate host names for clients.</para>
</entry><entry><para>Learn how client host names are generated so that you can decide whether
to generate host names.</para>
</entry><entry><para><olink targetptr="chapter2-32" remap="internal">Client Host Name Generation</olink></para>
</entry>
</row><row><entry><para>Determine what configuration macro to assign to clients.</para>
</entry><entry><para>Learn about client configuration macros so that you can select an appropriate
macro for clients.</para>
</entry><entry><para><olink targetptr="chapter2-33" remap="internal">Default Client Configuration Macros</olink></para>
</entry>
</row><row><entry><para>Determine lease types to use.</para>
</entry><entry><para>Learn about lease types to help you determine what type is best for
your DHCP clients.</para>
</entry><entry><para><olink targetptr="chapter2-22" remap="internal">Dynamic and Permanent Lease Types</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><sect2 id="chapter2-31"><title>Number and Ranges of IP Addresses</title><para>During the initial server configuration, DHCP Manager allows you to
add one block, or range, of IP addresses under DHCP management by specifying
the total number of addresses and the first address in the block. DHCP Manager
adds a list of contiguous addresses from this information. If you have several
blocks of noncontiguous addresses, you can add the others by running DHCP
Manager's Address Wizard again, after the initial configuration.</para><para>Before you configure your IP addresses, know how many addresses are
in the initial block of addresses you want to add and the IP address of the
first address in the range.</para>
</sect2><sect2 id="chapter2-32"><title>Client Host Name Generation</title><para>The dynamic nature of DHCP means that an IP address is not permanently
associated with the host name of the system that is using it. The DHCP management
tools can generate a client name to associate with each IP address if you
select this option. The client names consist of a prefix, or root name, plus
a dash and a number assigned by the server. For example, if the root name
is <literal>charlie</literal>, the client names are <literal>charlie-1</literal>, <literal>charlie-2</literal>, <literal>charlie-3</literal>, and so on.</para><para>By default, generated client names begin with the name of the DHCP server
that manages them. This strategy is useful in environments that have more
than one DHCP server because you can quickly see in the DHCP network tables
which clients any given DHCP server manages. However, you can change the root
name to any name you choose.</para><para>Before you configure your IP addresses, decide if you want the DHCP
management tools to generate client names, and if so, what root name to use
for the names.</para><para>The generated client names can be mapped to IP addresses in <filename>/etc/inet/hosts</filename>, DNS, or NIS+ if you specify to register host names during DHCP
configuration. See <olink targetptr="dhcp-overview-5sm" remap="internal">Client Host Name Registration</olink> for more information.</para>
</sect2><sect2 id="chapter2-33"><title>Default Client Configuration Macros</title><para>In Solaris DHCP, a <emphasis>macro</emphasis> is a collection
of network configuration options and their assigned values. The DHCP server
uses macros to determine what network configuration information to send to
a DHCP client.</para><itemizedlist><para>When you configure the DHCP server, the management tools gather information
from system files and directly from you through prompts or command-line options
you specify. With this information, the management tools create the following
macros:</para><listitem><para><emphasis role="strong">Network address macro</emphasis> &mdash;
The network address macro is named to match the IP address of the client network.
For example, if the network is <literal>192.68.0.0</literal>, the network
address macro is also named <literal>192.68.0.0</literal>. The macro contains
information needed by any client that is part of the network, such as subnet
mask, network broadcast address, default router or router discovery token,
and NIS/NIS+ domain and server if the server uses NIS/NIS+. Other options
that are applicable to your network might be included. The network address
macro is automatically processed for all clients located on that network,
as described in <olink targetptr="dhcp-overview-10" remap="internal">Order of Macro Processing</olink>.</para>
</listitem><listitem><para><emphasis role="strong">Locale macro</emphasis> &mdash; The
locale macro is named <literal>Locale</literal>. The macro contains the offset
(in seconds) from Coordinated Universal Time (UTC) to specify the time zone.
The locale macro is not automatically processed, but is included in the server
macro.</para>
</listitem><listitem><para><emphasis role="strong">Server macro</emphasis> &mdash; The
server macro is named to match the server's host name. For example, if the
server is named <literal>pineola</literal>, the server macro is also named <literal>pineola</literal>. The server macro contains information about the lease policy,
time server, DNS domain, and DNS server, and possibly other information that
the configuration program was able to obtain from system files. The server
macro includes the locale macro, so the DHCP server processes the locale macro
as part of the server macro.</para><para>When you configure IP addresses for
the first network, you must select a client configuration macro to be used
for all DHCP clients that use the addresses you are configuring. The macro
that you select is mapped to the IP addresses. By default, the server macro
is selected because the macro contains information needed by all clients that
use this server.</para>
</listitem>
</itemizedlist><para>Clients receive the options contained in the network address macro before
the options in the macro that is mapped to IP addresses. This processing order
causes the options in the server macro to take precedence over any conflicting
options in the network address macro. See <olink targetptr="dhcp-overview-10" remap="internal">Order
of Macro Processing</olink> for more information about the order in which
macros are processed.</para>
</sect2><sect2 id="chapter2-22"><title>Dynamic and Permanent Lease Types</title><para>The <emphasis>lease type</emphasis> determines whether the lease
policy applies to the IP addresses you are configuring. During initial server
configuration, DHCP Manager allows you to select either dynamic or permanent
leases for the addresses you are adding. If you configure the DHCP server
with the <literal>dhcpconfig</literal> command, leases are dynamic.</para><para>When an IP address has a <emphasis>dynamic lease</emphasis>, the DHCP
server can manage the address. The DHCP server can allocate the IP address
to a client, extend the lease time, detect when the address is no longer in
use, and reclaim the address. When an IP address has a <emphasis>permanent
lease</emphasis>, the DHCP server can only allocate the address. The client
then owns the address until explicitly releasing the address. When the address
is released, the server can assign the address to another client. The address
is not subject to the lease policy as long as the address is configured with
a permanent lease type.</para><para>When you configure a range of IP addresses, the lease type you select
applies to all the addresses in the range. To get the most benefit from DHCP,
you should use dynamic leases for most of the addresses. You can later modify
individual addresses to make them permanent, if necessary. However, the total
number of permanent leases should be kept to a minimum.</para>
</sect2><sect2 id="dhcp-plan-4"><title>Reserved IP Addresses and Lease Type</title><itemizedlist><para>IP addresses can be reserved by manually assigning them to particular
clients. A reserved address can be associated with a permanent lease or a
dynamic lease. When a reserved address is assigned a permanent lease, the
following statements are true:</para><listitem><para>The address can be allocated only to the client that is bound
to the address.</para>
</listitem><listitem><para>The DHCP server cannot allocate the address to another client.</para>
</listitem><listitem><para>The address cannot be reclaimed by the DHCP server.</para>
</listitem>
</itemizedlist><para>If a reserved address is assigned a dynamic lease, the address can be
allocated only to the client that is bound to the address. However, the client
must track lease time and negotiate for a lease extension as if the address
were not reserved. This strategy enables you to track when the client is using
the address by looking at the network table.</para><para>You cannot create reserved addresses for all the IP addresses during
the initial configuration. Reserved addresses are intended to be used sparingly
for individual addresses.</para>
</sect2>
</sect1><sect1 id="dhcp-plan-1"><title>Planning for Multiple DHCP Servers</title><itemizedlist><para>If you want to configure more than one DHCP server to manage your
IP addresses, consider the following guidelines:</para><listitem><para>Divide the pool of IP addresses so that each server is responsible
for a range of addresses, and there is no overlap of responsibility.</para>
</listitem><listitem><para>Choose NIS+ as your data store, if available. If not, choose
text files and specify a shared directory for the absolute path to the data
store. The binary files data store cannot be shared.</para>
</listitem><listitem><para>Configure each server separately so that address ownership
is allocated correctly and so that server-based macros can be automatically
created.</para>
</listitem><listitem><para>Set up the servers to scan the options and macros in the <filename>dhcptab</filename> table at specified intervals so that the servers are using
the latest information. You can use DHCP Manager to schedule automatic reading
of <literal>dhcptab</literal> as described in <olink targetptr="dhcp-admin-76" remap="internal">Customizing
Performance Options for the DHCP Server</olink>.</para>
</listitem><listitem><para>Be sure all clients can access all DHCP servers so that the
servers can support one another. A client that has a valid IP address lease
might try to verify its configuration or extend the lease when the server
that owns the client's address is not reachable. Another server can respond
to the client after the client has attempted to contact the primary server
for 20 seconds. If a client requests a specific IP address, and the server
that owns the address is not available, one of the other servers handles the
request. In this case, the client does not receive the requested address.
The client receives an IP address that is owned by the responding DHCP server.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="dhcp-plan-2"><title>Planning DHCP Configuration of Your Remote
Networks</title><itemizedlist><para>After the initial DHCP configuration, you can place IP addresses in
remote networks under DHCP management. However, because the system files are
not local to the server, DHCP Manager and <literal>dhcpconfig</literal> cannot
look up information to provide default values, so you must provide the information.
Before you try to configure a remote network, be sure you know the following
information:</para><listitem><para>The remote network's IP address.</para>
</listitem><listitem><para>The subnet mask of the remote network. This information can
be obtained from the <filename>netmasks</filename> table in the name service.
If the network uses local files, look in <filename>/etc/netmasks</filename> on
a system in the network. If the network uses NIS+, use the command <command>niscat
netmasks.org_dir</command>. If the network uses NIS, use the command <command>ypcat
-k netmasks.byaddr</command>. Make sure the <filename>netmasks</filename> table
contains all the topology information for all the subnets you want to manage.</para>
</listitem><listitem><para>The network type. The clients connect to the network through
either a local area network (LAN) connection or a Point-to-Point Protocol
(PPP).</para>
</listitem><listitem><para>Routing information. Can the clients use router discovery?
If not, you must determine the IP address of a router they can use.</para>
</listitem><listitem><para>NIS domain and NIS servers, if applicable.</para>
</listitem><listitem><para>NIS+ domain and NIS+ servers, if applicable.</para>
</listitem>
</itemizedlist><para>See <olink targetptr="dhcp-admin-17" remap="internal">Adding DHCP Networks</olink> for
the procedure for adding DHCP networks.</para>
</sect1><sect1 id="chapter2-34"><title>Selecting the Tool for Configuring DHCP</title><para>After you gather information and plan for DHCP service, you are ready
to configure a DHCP server. You can use the DHCP Manager or the command-line
utility <literal>dhcpconfig</literal> to configure a server. DHCP Manager
lets you select options and specify data that is then used to create the <filename>dhcptab</filename> and network tables used by the DHCP server. The <literal>dhcpconfig</literal> utility requires you to use command-line options to specify data. </para><sect2 id="chapter2-35"><title>DHCP Manager Features</title><para>DHCP Manager, a Java&trade; technology-based GUI tool,
provides a DHCP Configuration Wizard. The configuration wizard starts automatically
the first time you run DHCP Manager on a system that is not configured as
a DHCP server. The DHCP Configuration Wizard provides a series of dialog boxes
that prompt you for the essential information required to configure a server:
data store format, lease policy, DNS/NIS/NIS+ servers and domains, and router
addresses. Some of the information is obtained by the wizard from system files,
and you only need to confirm that the information is correct, or to correct
information, if necessary.</para><para>When you progress through the dialog boxes and approve the information,
the DHCP server daemon starts on the server system. You are then prompted
to start the Add Addresses Wizard to configure IP addresses for the network.
Only the server's network is configured for DHCP initially, and other server
options are given default values. You can run DHCP Manager again after the
initial configuration is complete to add networks and modify other server
options.</para><para>See <olink targetptr="chapter3-21" remap="internal">Configuring and Unconfiguring a DHCP
Server Using DHCP Manager</olink> for more information about the DHCP Configuration
Wizard. See <olink targetptr="dhcp-admin-1" remap="internal">About DHCP Manager</olink> for
more detailed information about DHCP Manager.</para>
</sect2><sect2 id="chapter2-36"><title><literal>dhcpconfig</literal> Features</title><para>The <literal>dhcpconfig</literal> utility supports options that enable
you to configure and unconfigure a DHCP server, as well as convert to a new
data store and import/export data to and from other DHCP servers. When you
use the <literal>dhcpconfig</literal> utility to configure a DHCP server,
the utility obtains information from the system files discussed in <olink targetptr="chapter2-7" remap="internal">Updating System Files and Netmask Tables</olink>. You
cannot view and confirm the information obtained from system files as you
can with DHCP Manager. So, it is important that the system files be updated
before you run <literal>dhcpconfig</literal>. You can also use command-line
options to override the values <literal>dhcpconfig</literal> would obtain
by default from system files. The <literal>dhcpconfig</literal> command can
be used in scripts. See the <olink targetdoc="refman1m" targetptr="dhcpconfig-1m" remap="external"><citerefentry><refentrytitle>dhcpconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page for more information.</para>
</sect2><sect2 id="chapter2-37"><title>Comparison of DHCP Manager and <literal>dhcpconfig</literal></title><para>The following table summarizes the differences between the two server
configuration tools.</para><table frame="all" id="dhcp-plan-tbl-4"><title>Comparison of DHCP Manager
and the <literal>dhcpconfig</literal> Command</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec2" colwidth="25*"/><colspec colname="colspec3" colwidth="25*"/><colspec colname="colspec5" colwidth="25*"/><thead><row><entry><para>Feature</para>
</entry><entry><para>DHCP Manager</para>
</entry><entry><para><literal>dhcpconfig</literal> With Options</para>
</entry>
</row>
</thead><tbody><row><entry><para>Network information that is gathered from system.</para>
</entry><entry><para>Enables you to view the information gathered from system files, and
to change it if needed.</para>
</entry><entry><para>You can specify the network information with command-line options.</para>
</entry>
</row><row><entry><para>Speed of configuration.</para>
</entry><entry><para>Speeds the configuration process by omitting prompts for nonessential
server options, using default values instead. You can change nonessential
options after initial configuration.</para>
</entry><entry><para>Fastest configuration process, but you might need to specify values
for many options.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para><olink targetptr="chapter3-20" remap="internal">Chapter&nbsp;14, Configuring the DHCP Service (Tasks)</olink> includes procedures you can use to configure your
server with either DHCP Manager or the <literal>dhcpconfig</literal> utility.</para>
</sect2>
</sect1>
</chapter>