<chapter id="dhcp-overview-1"><title>About Solaris DHCP (Overview)</title><highlights><para>This chapter introduces the Dynamic Host Configuration Protocol (DHCP),
and explains the concepts that underlie the protocol. This chapter also describes
the advantages of using DHCP in your network.</para><itemizedlist><para>This chapter contains the following information:</para><listitem><para><olink targetptr="dhcp-overview-2" remap="internal">About the DHCP Protocol</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-overview-12a" remap="internal">Advantages of Using Solaris
DHCP</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-overview-3" remap="internal">How DHCP Works</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-overview-14a" remap="internal">Solaris DHCP Server</olink></para>
</listitem><listitem><para><olink targetptr="dhcp-overview-36a" remap="internal">Solaris DHCP Client</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="dhcp-overview-2"><title>About the DHCP Protocol</title><para>The DHCP protocol enables host systems in a TCP/IP network to
be configured automatically for the network as the systems boot. DHCP uses
a client-server mechanism. Servers store and manage configuration information
for clients and provide that information upon a client's request. The information
includes the client's IP address and information about network services that
are available to the client.</para><para>DHCP evolved from an earlier protocol, BOOTP, which was designed for
booting over a TCP/IP network. DHCP uses the same format as BOOTP for messages
between the client and server. However, unlike BOOTP messages, DHCP messages
can include network configuration data for the client.</para><para>A primary benefit of DHCP is its ability to manage IP address assignments
through leases. <emphasis>Leases</emphasis> allow IP addresses to be reclaimed
when they are not in use. The reclaimed IP addresses can be reassigned to
other clients. A site that uses DHCP can use a smaller pool of IP addresses
than would be needed if all clients were assigned a permanent IP address.</para>
</sect1><sect1 id="dhcp-overview-12a"><title>Advantages of Using Solaris DHCP</title><para>DHCP relieves you of some of the time-consuming tasks involved
in setting up a TCP/IP network and in the daily management of that network.
Note that Solaris DHCP works only with IPv4.</para><itemizedlist><para>Solaris DHCP offers the following advantages:</para><listitem><para><emphasis role="strong">IP address management</emphasis> &ndash;
A primary advantage of DHCP is easier management of IP addresses. In a network
without DHCP, you must manually assign IP addresses. You must be careful to
assign unique IP addresses to each client and to configure each client individually.
If a client moves to a different network, you must make manual modifications
for that client. When DHCP is enabled, the DHCP server manages and assigns
IP addresses without administrator intervention. Clients can move to other
subnets without manual reconfiguration because they obtain, from a DHCP server,
new client information appropriate for the new network.</para>
</listitem><listitem><para><emphasis role="strong">Centralized network client configuration</emphasis> &ndash;
You can create a tailored configuration for certain clients, or for certain
types of clients. The configuration information is stored in one place, in
the DHCP data store. You do not need to log in to a client to change its configuration.
You can make changes for multiple clients just by changing the information
in the data store.</para>
</listitem><listitem><para><emphasis role="strong">Support of BOOTP clients</emphasis> &ndash;
Both BOOTP servers and DHCP servers listen and respond to broadcasts from
clients. The DHCP server can respond to requests from BOOTP clients as well
as DHCP clients. BOOTP clients receive an IP address and the information needed
to boot from a server.</para>
</listitem><listitem><para><emphasis role="strong">Support of local clients and remote
clients</emphasis> &ndash; BOOTP provides for the relaying of messages from
one network to another network. DHCP takes advantage of the BOOTP relay feature
in several ways. Most network routers can be configured to act as BOOTP relay
agents to pass BOOTP requests to servers that are not on the client's network.
DHCP requests can be relayed in the same manner because, to the router, DHCP
requests are indistinguishable from BOOTP requests. The Solaris DHCP server
can also be configured to behave as a BOOTP relay agent, if a router that
supports BOOTP relay is not available.</para>
</listitem><listitem><para><emphasis role="strong">Network booting</emphasis> &ndash;
Clients can use DHCP to obtain the information that is needed to boot from
a server on the network, instead of using RARP (Reverse Address Resolution
Protocol) and the <literal>bootparams</literal> file. The DHCP server can
give a client all the information that the client needs to function, including
IP address, boot server, and network configuration information. Because DHCP
requests can be relayed across subnets, you can deploy fewer boot servers
in your network when you use DHCP network booting. RARP booting requires that
each subnet have a boot server.</para>
</listitem><listitem><para><emphasis role="strong">Large network support</emphasis> &ndash;
Networks with millions of DHCP clients can use Solaris DHCP. The DHCP server
uses multithreading to process many client requests simultaneously. The server
also supports data stores that are optimized to handle large amounts of data.
Data store access is handled by separate processing modules. This data store
approach enables you to add support for any database that you require.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="dhcp-overview-3"><title>How DHCP Works</title><para>You must first install and configure the DHCP server. During configuration,
you specify information about the network that clients need to operate on
the network. After this information is in place, clients are able to request
and receive network information.</para><para>The sequence of events for DHCP service is shown in the following diagram.
The numbers in circles correlate to the numbered items in the description
following the diagram.</para><figure id="dhcp-overview-fig-20"><title>Sequence of Events for DHCP Service</title><mediaobject><imageobject><imagedata entityref="protocol-diagram"/>
</imageobject><textobject><simpara>Diagram shows communication sequence between a DHCP client
and server. The description that follows the diagram explains the sequence.</simpara>
</textobject>
</mediaobject>
</figure><para>The preceding diagram shows the following steps:</para><orderedlist><listitem><para>The client discovers a DHCP server by broadcasting a <emphasis>discover
message</emphasis> to the limited broadcast address (<literal>255.255.255.255</literal>)
on the local subnet. If a router is present and configured to behave as a
BOOTP relay agent, the request is passed to other DHCP servers on different
subnets. The client's <emphasis>broadcast</emphasis> includes its unique ID,
which, in the Solaris DHCP implementation, is derived from the client's Media
Access Control (MAC) address. On an Ethernet network, the MAC address is the
same as the Ethernet address.</para><itemizedlist><para>DHCP servers that receive the discover message can determine the client's
network by looking at the following information:</para><listitem><para>Which network interface did the request come in on? The server
determines either that the client is on the network to which the interface
is connected, or that the client is using a BOOTP relay agent connected to
that network.</para>
</listitem><listitem><para>Does the request include the IP address of a BOOTP relay agent?
 When a request passes through a relay agent, the relay agent inserts its
address in the request header. When the server detects a <emphasis>relay agent
address</emphasis>, the server  knows that the network portion of the address
indicates the client's network address because the relay agent must be connected
to the client's network.</para>
</listitem><listitem><para>Is the client's network subnetted?  The server consults the <literal>netmasks</literal> table to find the subnet mask used on the network indicated
by the relay agent's address or by the address of the network interface that
received the request. Once the server knows the subnet mask used, it can determine
which portion of the network address is the host portion, and then it can
select an IP address appropriate for the client. See the <olink targetdoc="refman4" targetptr="netmasks-4" remap="external"><citerefentry><refentrytitle>netmasks</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page for information on <literal>netmasks</literal>.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>After the DHCP servers determine the client's network, the
servers select an appropriate IP address and verify that the address is not
already in use. The DHCP servers then respond to the client by broadcasting
an <emphasis>offer message</emphasis>. The offer message includes the selected
IP address and information about services that can be configured for the client.
Each server temporarily reserves the offered IP address until the client determines
whether to use the IP address.</para>
</listitem><listitem><para>The client selects the best offer, based on the number and
type of services offered. The client broadcasts a request that specifies the
IP address of the server that made the best offer. The broadcast ensures that
all the responding DHCP servers know that the client has chosen a server.
The servers that are not chosen can cancel the reservations for the IP addresses
that they had offered.</para>
</listitem><listitem><para>The selected server allocates the IP address for the client
and stores the information in the DHCP data store. The server also sends an
acknowledgement message (ACK) to the client. The <emphasis>acknowledgement
message</emphasis> contains the network configuration parameters for the client.
The client uses the <command>ping</command> utility to test the IP address
to make sure no other system is using it. The client then continues booting
to join the network.</para>
</listitem><listitem><para>The client monitors the lease time. When a set period of time
has elapsed, the client sends a new message to the chosen server to increase
the lease time.</para>
</listitem><listitem><para>The DHCP server that receives the request extends the lease
time if the lease still adheres to the local lease policy set by the administrator.
If the server does not respond within 20 seconds, the client broadcasts a
request so that one of the other DHCP servers can extend the lease.</para>
</listitem><listitem><para>When the client no longer needs the IP address, the client
notifies the server that the IP address is released. This notification can
happen during an orderly shutdown and can also be done manually.</para>
</listitem>
</orderedlist>
</sect1><sect1 id="dhcp-overview-14a"><title>Solaris DHCP Server</title><itemizedlist><para>The Solaris DHCP server runs as a daemon in the Solaris Operating
System (Solaris OS) on a host system. The server has two basic functions:</para><listitem><para><emphasis role="strong">Managing IP addresses</emphasis> &ndash;
The DHCP server controls a range of IP addresses and allocates them to clients,
either permanently or for a defined period of time. The server uses a lease
mechanism to determine how long a client can use a nonpermanent address. When
the address is no longer in use, it is returned to the pool and can be reassigned.
The server maintains information about the binding of IP addresses to clients
in its DHCP network tables, ensuring that no address is used by more than
one client.</para>
</listitem><listitem><para><emphasis role="strong">Providing network configuration for
clients</emphasis> &ndash; The server assigns an IP address and provides other
information for network configuration, such as a host name, broadcast address,
network subnet mask, default gateway, name service, and potentially much more
information. The network configuration information is obtained from the server's <filename>dhcptab</filename> database.</para>
</listitem>
</itemizedlist><itemizedlist><para>The Solaris DHCP server can also be configured to perform the following
additional functions:</para><listitem><para><emphasis role="strong">Responding to BOOTP client requests</emphasis> &ndash;
The server listens for broadcasts from BOOTP clients discovering a BOOTP server
and provides them with an IP address and boot parameters. The information
must have been configured statically by an administrator. The DHCP server
can simultaneously perform as a BOOTP server and as a DHCP server.</para>
</listitem><listitem><para><emphasis role="strong">Relaying requests</emphasis> &ndash;
The server relays BOOTP and DHCP requests to appropriate servers on other
subnets. The server cannot provide DHCP or BOOTP service when configured as
a BOOTP relay agent.</para>
</listitem><listitem><para><emphasis role="strong">Providing network booting support
for DHCP clients</emphasis> &ndash; The server can provide DHCP clients with
information needed to boot over the network: an IP address, boot parameters,
and network configuration information. The server can also provide information
that DHCP clients need to boot and install over a wide area network (WAN).</para>
</listitem><listitem><para><emphasis role="strong">Updating DNS tables for clients that
supply a host name</emphasis> &ndash; For clients that provide a <literal>Hostname</literal> option and value in their requests for DHCP service, the server
can attempt DNS updates on their behalf.</para>
</listitem>
</itemizedlist><sect2 id="dhcp-overview-16a"><title>DHCP Server Management</title><para>As superuser, you can start, stop, and configure the DHCP server
with DHCP Manager or with command-line utilities described in <olink targetptr="dhcp-overview-15" remap="internal">DHCP Command-Line Utilities</olink>. Generally,
the DHCP server is configured to start automatically when the system boots,
and to stop when the system is shut down. You should not need to start and
stop the server manually under normal conditions.</para>
</sect2><sect2 id="dhcp-overview-22a"><title>DHCP Data Store</title><para>All the data used by the Solaris DHCP server is maintained in
a data store. The data store might consist of plain text files, NIS+ tables,
or binary-format files. While configuring the DHCP service, you choose the
type of data store to be used. The section <olink targetptr="chapter2-39" remap="internal">Choosing
the DHCP Data Store</olink> describes the differences between the types of
data stores. You can convert a data store from one format to another by using
DHCP Manager or the <literal>dhcpconfig</literal> command.</para><para>You can also move data from one DHCP server's data store to another
server's data store. You can use export and import utilities that work with
the data stores, even if the servers are using different data store formats.
You can export and import the entire content of a data store, or just some
of the data within it, using DHCP Manager or the <literal>dhcpconfig</literal> command.</para><note><para>Any database or file format can be used for DHCP data storage
if you develop your own code module to provide an interface between Solaris
DHCP (server and management tools) and the database. .</para>
</note><itemizedlist><para>Within the Solaris DHCP data store are two types of tables. You can
view and manage the contents if these tables by using either DHCP Manager
or the command-line utilities. The data tables are as follows:</para><listitem><para><literal>dhcptab</literal> <emphasis role="strong">table</emphasis> &ndash;
Table of configuration information that can be passed to clients.</para>
</listitem><listitem><para><emphasis role="strong">DHCP network tables</emphasis> &ndash;
Tables containing information about the DHCP and BOOTP clients that reside
on the network specified in the table name. For example, the network <literal>192.168.32.0</literal> would have a table whose name includes <filename>192_168_32_0</filename>.</para>
</listitem>
</itemizedlist><sect3 id="dhcp-overview-13"><title>The <filename>dhcptab</filename> Table</title><para>The <filename>dhcptab</filename> table contains all the information
that clients can obtain from the DHCP server. The DHCP server scans the <filename>dhcptab</filename> table each time it starts. The file name of the <literal>dhcptab</literal> table varies according to the data store used. For example, the <literal>dhcptab</literal> table created by the NIS+ data store <literal>SUNWnisplus</literal> is <literal>SUNWnisplus1_dhcptab</literal>.</para><para>The DHCP protocol defines a number of standard items of information
that can be passed to clients. These items are referred to as parameters,
symbols, or options. Options are defined in the DHCP protocol by numeric codes
and text labels, but without values. Some commonly used standard options are
shown in the following table.</para><table frame="topbot" id="dhcp-overview-tbl-19"><title>Sample DHCP Standard
Options</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec3" colwidth="26.26*"/><colspec colname="colspec2" colwidth="36.62*"/><colspec colname="colspec4" colwidth="87.13*"/><thead><row rowsep="1"><entry><para>Code</para>
</entry><entry><para>Label</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para>1</para>
</entry><entry><para><literal>Subnet</literal></para>
</entry><entry><para>Subnet mask IP address</para>
</entry>
</row><row><entry><para>3</para>
</entry><entry><para><literal>Router</literal></para>
</entry><entry><para>IP address for the router</para>
</entry>
</row><row><entry><para>6</para>
</entry><entry><para><literal>DNSserv</literal></para>
</entry><entry><para>IP address for the DNS server</para>
</entry>
</row><row><entry><para>12</para>
</entry><entry><para><literal>Hostname</literal></para>
</entry><entry><para>Text string for the client host name</para>
</entry>
</row><row><entry><para>15</para>
</entry><entry><para><literal>DNSdmain</literal></para>
</entry><entry><para>DNS domain name</para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>Some options are automatically assigned values when you provide information
during server configuration. You can also explicitly assign values to other
options at a later time. Options and their values are passed to the client
to provide configuration information. For example, the option/value pair, <literal>DNSdmain=Georgia.Peach.COM</literal>, sets the client's DNS domain name to <literal>Georgia.Peach.COM</literal>.</para><para>Options can be grouped with other options in containers known as <emphasis>macros</emphasis>, which makes it easier to pass information to a client.
Some macros are created automatically during server configuration and contain
options that were assigned values during configuration. Macros can also contain
other macros.</para><para>The format of the <filename>dhcptab</filename> table is described in
the <olink targetdoc="refman4" targetptr="dhcptab-4" remap="external"><citerefentry><refentrytitle>dhcptab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man
page. In DHCP Manager, all the information shown in the Options and Macros
tabs comes from the <filename>dhcptab</filename> table. See <olink targetptr="dhcp-overview-19a" remap="internal">About DHCP Options</olink> for more information
about options. See <olink targetptr="dhcp-overview-9" remap="internal">About DHCP Macros</olink> for
more information about macros.</para><para>Note that the <filename>dhcptab</filename> table should not be edited
manually. You should use either the <command>dhtadm</command> command or DHCP
Manager to create, delete, or modify options and macros.</para>
</sect3><sect3 id="dhcp-overview-14"><title>DHCP Network Tables</title><para>A DHCP network table maps client identifiers to IP addresses and
the configuration parameters associated with each address. The format of the
network tables is described in the <olink targetdoc="refman4" targetptr="dhcp-network-4" remap="external"><citerefentry><refentrytitle>dhcp_network</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page. In DHCP Manager,
all the information shown in the Addresses tab comes from the network tables.</para>
</sect3>
</sect2><sect2 id="dhcp-overview-4"><title>DHCP Manager</title><para>DHCP Manager is a graphical user interface (GUI) tool you can
use to perform all management duties associated with the DHCP service. You
can use it to manage the server as well as the data the server uses. You must
be superuser when you run DHCP Manager.</para><itemizedlist><para>You can use DHCP Manager with the server in the following ways:</para><listitem><para>Configuring and unconfiguring the DHCP server</para>
</listitem><listitem><para>Starting, stopping, and restarting the DHCP server</para>
</listitem><listitem><para>Disabling and enabling DHCP service</para>
</listitem><listitem><para>Customizing DHCP server settings</para>
</listitem>
</itemizedlist><itemizedlist><para>DHCP Manager enables you to manage the IP addresses, network configuration
macros, and network configuration options in the following ways:</para><listitem><para>Adding and deleting networks under DHCP management</para>
</listitem><listitem><para>Viewing, adding, modifying, deleting, and releasing IP addresses
under DHCP management</para>
</listitem><listitem><para>Viewing, adding, modifying, and deleting network configuration
macros</para>
</listitem><listitem><para>Viewing, adding, modifying, and deleting nonstandard network
configuration options</para>
</listitem>
</itemizedlist><itemizedlist><para>DHCP Manager allows you to manage the DHCP data stores in the following
ways:</para><listitem><para>Convert data to a new data store format</para>
</listitem><listitem><para>Move DHCP data from one DHCP server to another by exporting
it from the first server and importing it on the second server</para>
</listitem>
</itemizedlist><para>DHCP Manager includes extensive online help for procedures you can perform
with the tool. For more information, see <olink targetptr="dhcp-admin-1" remap="internal">About
DHCP Manager</olink>.</para>
</sect2><sect2 id="dhcp-overview-15"><title>DHCP Command-Line Utilities</title><para>All DHCP management functions can be performed by using command-line
utilities. You can run the utilities if you are logged in as superuser or
as a user assigned to the DHCP Management profile. See <olink targetptr="dhcp-admin-rbac1211" remap="internal">Setting Up User Access to DHCP Commands</olink>.</para><para>The following table lists the utilities and describes the purpose of
each utility.</para><table frame="all" id="dhcp-overview-tbl-27"><title>DHCP Command-Line Utilities</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="168.73*"/><colspec colwidth="342.20*"/><colspec colname="colspec0" colwidth="223.94*"/><thead><row><entry><para>Command</para>
</entry><entry><para>Description and Purpose</para>
</entry><entry><para>Man Page Links</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>in.dhcpd</literal></para>
</entry><entry><para>The DHCP service daemon. Command-line arguments enable you to
set several runtime options.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="in.dhcpd-1m" remap="external"><citerefentry><refentrytitle>in.dhcpd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><literal>dhcpconfig</literal></para>
</entry><entry><para>Used to configure and unconfigure a DHCP server. This utility
enables you to perform many of the functions of DHCP Manager from the command
line. This utility is primarily intended for use in scripts for sites that
want to automate some configuration functions. <filename>dhcpconfig</filename> collects
information from the server system's network topology files to create useful
information for the initial configuration.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="dhcpconfig-1m" remap="external"><citerefentry><refentrytitle>dhcpconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><literal>dhtadm</literal></para>
</entry><entry><para>Used to add, delete, and modify configuration options and macros
for DHCP clients. This utility lets you edit the <filename>dhcptab</filename> table
indirectly, which ensures the correct format of the <filename>dhcptab</filename> table.
You should not directly edit the <filename>dhcptab</filename> table.</para>
</entry><entry><para><olink targetdoc="refman1m" targetptr="dhtadm-1m" remap="external"><citerefentry><refentrytitle>dhtadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row><row><entry><para><literal>pntadm</literal></para>
</entry><entry><para>Used to manage the DHCP network tables. You can use this utility
to perform the following tasks:</para><itemizedlist><listitem><para>Add and remove IP addresses and networks under DHCP management.</para>
</listitem><listitem><para>Modify the network configuration for specified IP addresses.</para>
</listitem><listitem><para>Display information about IP addresses and networks under
DHCP management.</para>
</listitem>
</itemizedlist>
</entry><entry><para><olink targetdoc="refman1m" targetptr="pntadm-1m" remap="external"><citerefentry><refentrytitle>pntadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="dhcp-overview-6"><title>Role-Based Access Control for DHCP Commands</title><para>Security for the <literal>dhcpconfig</literal>, <literal>dhtadm</literal>,
and <literal>pntadm</literal> commands is determined by role-based access
control (RBAC) settings. By default, the commands can be run only by superuser.
If you want to use the commands under another user name, you must assign the
user name to the DHCP Management profile as described in <olink targetptr="dhcp-admin-rbac1211" remap="internal">Setting Up User Access to DHCP Commands</olink>.</para>
</sect2><sect2 id="dhcp-overview-7"><title>DHCP Server Configuration</title><para>You configure the Solaris DHCP server the first time you run DHCP
Manager on the system where you want to run the DHCP server.</para><itemizedlist><para>DHCP Manager server configuration dialog boxes prompt you for essential
information needed to enable and run the DHCP server on one network. Some
default values are obtained from existing system files. If you have not configured
the system for the network, there are no default values. DHCP Manager prompts
for the following information:</para><listitem><para>Role of the server, either as the DHCP server or as the BOOTP
relay agent</para>
</listitem><listitem><para>Data store type (files, binary files, NIS+, or something specific
to your site)</para>
</listitem><listitem><para>Data store configuration parameters for the data store type
you selected</para>
</listitem><listitem><para>Name service to use to update host records, if any (<literal>/etc/hosts</literal>, NIS+, or DNS)</para>
</listitem><listitem><para>Length of lease time and whether clients should be able to
renew leases</para>
</listitem><listitem><para>DNS domain name and IP addresses of DNS servers</para>
</listitem><listitem><para>Network address and subnet mask for the first network you
want to configure for DHCP service</para>
</listitem><listitem><para>Network type, either local area network (LAN) or point-to-point
network</para>
</listitem><listitem><para>Router discovery or the IP address of a particular router</para>
</listitem><listitem><para>NIS domain name and IP address of NIS servers</para>
</listitem><listitem><para>NIS+ domain name and IP address of NIS+ servers</para>
</listitem>
</itemizedlist><para>You can also configure the DHCP server using the <command>dhcpconfig</command> command.
This utility automatically gathers information from existing system files
to provide a useful initial configuration. Therefore, you must ensure that
the files are correct before running <command>dhcpconfig</command>. See the <olink targetdoc="refman1m" targetptr="dhcpconfig-1m" remap="external"><citerefentry><refentrytitle>dhcpconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page
for information about the files that <command>dhcpconfig</command> uses to
obtain information.</para>
</sect2><sect2 id="dhcp-overview-8"><title>IP Address Allocation</title><itemizedlist><para>The Solaris DHCP server supports the following types of IP address
allocation:</para><listitem><para><emphasis role="strong">Manual allocation</emphasis> &ndash;
The server provides a specific IP address that you choose for a specific DHCP
client. The address cannot be reclaimed or assigned to another client.</para>
</listitem><listitem><para><emphasis role="strong">Automatic, or permanent, allocation</emphasis> &ndash;
The server provides an IP address that has no expiration time, making it permanently
associated with the client until you change the assignment or the client releases
the address.</para>
</listitem><listitem><para><emphasis role="strong">Dynamic allocation</emphasis> &ndash;
The server provides an IP address to a requesting client, with a lease for
a specific period of time. When the lease expires, the address is taken back
by the server and can be assigned to another client. The period of time is
determined by the lease time configured for the server.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="dhcp-overview-18a"><title>Network Configuration Information</title><para>You determine what information to provide to DHCP clients. When
you configure the DHCP server, you provide essential information about the
network. Later, you can add more information that you want to provide to clients.</para><para>The DHCP server stores network configuration information in the <literal>dhcptab</literal> table, in the form of option/value pairs and macros. Options are
keywords for network data that you want to supply to clients. Values are assigned
to options and passed to clients in DHCP messages. For example, the NIS server
address is passed by way of an option called <literal>NISservs</literal>.
The <literal>NISservs</literal> option has a value that is equal to a list
of IP addresses, which is assigned by the DHCP server. Macros provide a convenient
way to group together any number of options that you want to supply to clients.
You can use DHCP Manager to create macros to group options and to assign values
to the options. If you prefer a command-line tool, you can use <command>dhtadm</command>,
the DHCP configuration table management utility, to work with options and
macros.</para>
</sect2><sect2 id="dhcp-overview-19a"><title>About DHCP Options</title><para>In Solaris DHCP, an <emphasis>option</emphasis> is a piece of
network information to be passed to a client. The DHCP literature also refers
to options as <emphasis>symbols</emphasis> or <emphasis>tags</emphasis>. An
option is defined by a numeric code and a text label. An option receives a
value when it is used in the DHCP service.</para><para>The DHCP protocol defines a large number of standard options for commonly
specified network data: <literal>Subnet</literal>, <literal>Router</literal>, <literal>Broadcst</literal>, <literal>NIS+dom</literal>, <literal>Hostname</literal>,
and <literal>LeaseTim</literal> are a few examples. A complete list of standard
options is shown in the <olink targetdoc="refman4" targetptr="dhcp-inittab-4" remap="external"><citerefentry><refentrytitle>dhcp_inittab</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man page. You cannot modify the standard option keywords
in any way. However, you can assign values to the options that are relevant
to your network when you include the options in macros.</para><itemizedlist><para>You can create new options for data that is not represented by the standard
options. Options you create must be classified in one of three categories:</para><listitem><para><emphasis role="strong">Extended</emphasis> &ndash; Reserved
for options that have become standard DHCP options but are not yet included
in the DHCP server implementation. You might use an extended option if you
know of a standard option that you want to use, but you do not want to upgrade
your DHCP server.</para>
</listitem><listitem><para><emphasis role="strong">Site</emphasis> &ndash; Reserved for
options that are unique to your site. You create these options.</para>
</listitem><listitem><para><emphasis role="strong">Vendor</emphasis> &ndash; Reserved
for options that should apply only to clients of a particular class, such
as a hardware or vendor platform. The Solaris DHCP implementation includes
a number of vendor options for Solaris clients. For example, the option <literal>SrootIP4</literal> is used to specify the IP address of a server that a client
that boots from the network should use for its root (/) file system.</para>
</listitem>
</itemizedlist><para><olink targetptr="dhcp-admin-9" remap="internal">Chapter&nbsp;15, Administering DHCP (Tasks)</olink> includes procedures for creating, modifying, and deleting
DHCP options.</para>
</sect2><sect2 id="dhcp-overview-9"><title>About DHCP Macros</title><para>In the Solaris DHCP service, a <emphasis>macro</emphasis> is
a collection of network configuration options and the values that you assign
to them. Macros are created to group options together to be passed to specific
clients or types of clients. For example, a macro intended for all clients
of a particular subnet might contain option/value pairs for subnet mask, router
IP address, broadcast address, NIS+ domain, and lease time.</para><sect3 id="dhcp-overview-16"><title>Macro Processing by the DHCP Server</title><para>When the DHCP server processes a macro, it places the network
options and values defined in the macro in a DHCP message to a client. The
server processes some macros automatically for clients of a particular type.</para><para>For the server to process a macro automatically, the name of the
macro must comply with one of the categories shown in the following table.</para><table frame="topbot" id="dhcp-overview-tbl-17"><title>DHCP Macro Categories
for Automatic Processing</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="colspec0" colwidth="27.52*"/><colspec colname="colspec1" colwidth="72.48*"/><thead><row rowsep="1"><entry><para>Macro Category</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para>Client class</para>
</entry><entry><para>The macro name matches a class of client, indicated by the client
machine type, operating system, or both. For example, if a server has a macro
named <literal>SUNW.Sun-Blade-100</literal>, any client whose hardware implementation
is <literal>SUNW,Sun-Blade-100</literal> automatically receives the values
in the <literal>SUNW.Sun-Blade-100</literal> macro.</para>
</entry>
</row><row><entry><para>Network address</para>
</entry><entry><para>The macro name matches a DHCP-managed network IP address. For
example, if a server has a macro named <literal>10.53.224.0</literal>, any
client connected to the <literal>10.53.224.0</literal> network automatically
receives the values in the <literal>10.53.224.0</literal> macro.</para>
</entry>
</row><row><entry><para>Client ID</para>
</entry><entry><para>The macro name matches some unique identifier for the client,
usually derived from an Ethernet or MAC address. For example, if a server
has a macro named <literal>08002011DF32</literal>, the client with the client
ID <literal>08002011DF32</literal> (derived from the Ethernet address <literal>8:0:20:11:DF:32</literal>) automatically receives the values in the macro named <literal>08002011DF32</literal>.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><itemizedlist><para>A macro with a name that does not use one of the categories listed in <olink targetptr="dhcp-overview-tbl-17" remap="internal">Table 12&ndash;3</olink> can be processed
only if one of the following is true: </para><listitem><para>The macro is mapped to an IP address.</para>
</listitem><listitem><para>The macro is included in another macro that is processed automatically.</para>
</listitem><listitem><para>The macro is included in another macro that is mapped to an
IP address.</para>
</listitem>
</itemizedlist><note><para>When you configure a server, a macro that is named to match the
server's name is created by default. This server macro is <emphasis>not</emphasis> processed
automatically for any client because it is not named with one of the name
types that cause automatic processing. When you later create IP addresses
on the server, the IP addresses are mapped to use the server macro by default.</para>
</note>
</sect3><sect3 id="dhcp-overview-10"><title>Order of Macro Processing</title><orderedlist><para>When a DHCP client requests DHCP services, the DHCP server determines
which macros match the client. The server processes the macros, using the
macro categories to determine the order of processing. The most general category
is processed first, and the most specific category is processed last. The
macros are processed in the following order:</para><listitem><para>Client class macros &ndash; The most general category</para>
</listitem><listitem><para>Network address macros &ndash; More specific than Client class</para>
</listitem><listitem><para>Macros mapped to IP addresses &ndash; More specific than Network
address</para>
</listitem><listitem><para>Client ID macros &ndash; The most specific category, pertaining
to one client</para>
</listitem>
</orderedlist><para>A macro that is included in another macro is processed as part of the
container macro.</para><para>If the same option is included in more than one macro, the value for
that option in the macro with the most specific category is used because it
is processed last. For example, if a Network address macro contains the lease
time option with a value of 24 hours, and a Client ID macro contains the lease
time option with a value of 8 hours, the client receives a lease time of 8
hours.</para>
</sect3><sect3 id="eyatk"><title>Size Limit for DHCP Macros</title><para>The sum total of the values assigned to all the options in a macro must
not exceed 255 bytes, including the option codes and length information. This
limit is dictated by the DHCP protocol.</para><para>The macros that are most likely to be impacted by this limit are macros
that are used to pass paths to files on Solaris installation servers. Generally,
you should pass the minimum amount of vendor information needed. You should
use short path names in options that require path names. If you create symbolic
links to long paths, you can pass the shorter link names.</para>
</sect3>
</sect2>
</sect1><sect1 id="dhcp-overview-36a"><title>Solaris DHCP Client</title><para>The term &ldquo;client&rdquo; is sometimes used to refer to a
physical machine that is performing a client role on the network. However,
the DHCP client described in this document is a software entity. The Solaris
DHCP client is a daemon (<literal>dhcpagent</literal>) that runs in the Solaris
OS on a system that is configured to receive its network configuration from
a DHCP server. DHCP clients from other vendors can also use the services of
the Solaris DHCP server. However, this document describes only the Solaris
DHCP client.</para><para>See <olink type="auto-generated" targetptr="eyatl" remap="internal">Chapter&nbsp;16, Configuring and Administering  DHCP Clients</olink> for detailed information
about the Solaris DHCP client.</para>
</sect1>
</chapter>