Making Decisions for Your DHCP Server Configuration (Task Map)
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.
Task | Description | For Instructions |
---|---|---|
Select a server for DHCP. | Determine if a server meets the system requirements to run the DHCP service. | |
Choose a data store. | Compare the data store types to determine the best data store for your site. | |
Set a lease policy. | Learn about IP address leases to help you determine appropriate lease policy for your site. | |
Select a router address or router discovery. | Determine whether DHCP clients use router discovery or a specific router. |
Selecting a Host to Run the DHCP Service
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.
The host must meet the following requirements:
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.
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.
The host must be configured to use routing.
The host must have a correctly configured netmasks table that reflects your network topology.
Choosing the DHCP Data Store
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.
Table 13-3 Comparison of DHCP Data Stores
Data Store Type | Performance | Maintenance | Sharing | Environment |
---|---|---|---|---|
Binary files | High performance, high capacity | Low maintenance, no database servers required. Contents must be viewed with DHCP Manager or dhtadm and pntadm. Regular file backups suggested. | Data stores cannot be shared among DHCP servers. | Midsize to large environments with many networks with thousands of clients per network. Useful for small to medium ISPs. |
NIS+ | Moderate performance and capacity, dependent upon NIS+ service's performance and capacity | DHCP server system must be configured as an NIS+ client. Requires NIS+ service maintenance. Contents must be viewed with DHCP Manager or dhtadm and pntadm. Regular backup with nisbackup is suggested. | DHCP data is distributed in NIS+, and multiple servers can access the same containers. | Small to midsize environments with up to 5000 clients per network. |
Text files | Moderate performance, low capacity | Low maintenance, no database servers required. ASCII format is readable without DHCP Manager, dhtadm, or pntadm. Regular file backups suggested. | 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. | Small environments with less than 10,000 clients, with a few hundred to a thousand clients per network. |
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.
Setting a Lease Policy
A lease 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 lease policy 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.
The lease time 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 pntadmutility.
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.
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 LeaseNeg option in configuration macros.
Note - 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.
Determining Routers for DHCP Clients
Host systems use routers for any network communication beyond their local network. The hosts must know the IP addresses of these routers.
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.
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.
Making Decisions for IP Address Management (Task Map)
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.
Task | Description | For Information |
---|---|---|
Specify which addresses that the server should manage. | Determine how many addresses you want the DHCP server to manage, and what those addresses are. | |
Decide if the server should automatically generate host names for clients. | Learn how client host names are generated so that you can decide whether to generate host names. | |
Determine what configuration macro to assign to clients. | Learn about client configuration macros so that you can select an appropriate macro for clients. | |
Determine lease types to use. | Learn about lease types to help you determine what type is best for your DHCP clients. |
Number and Ranges of IP Addresses
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.
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.
Client Host Name Generation
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 charlie, the client names are charlie-1, charlie-2, charlie-3, and so on.
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.
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.
The generated client names can be mapped to IP addresses in /etc/inet/hosts, DNS, or NIS+ if you specify to register host names during DHCP configuration. See Client Host Name Registration for more information.
Default Client Configuration Macros
In Solaris DHCP, a macro 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.
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:
Network address macro -- The network address macro is named to match the IP address of the client network. For example, if the network is 192.68.0.0, the network address macro is also named 192.68.0.0. 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 Order of Macro Processing.
Locale macro -- The locale macro is named Locale. 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.
Server macro -- The server macro is named to match the server's host name. For example, if the server is named pineola, the server macro is also named pineola. 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.
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.
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 Order of Macro Processing for more information about the order in which macros are processed.
Dynamic and Permanent Lease Types
The lease type 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 dhcpconfig command, leases are dynamic.
When an IP address has a dynamic lease, 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 permanent lease, 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.
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.
Reserved IP Addresses and Lease Type
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:
The address can be allocated only to the client that is bound to the address.
The DHCP server cannot allocate the address to another client.
The address cannot be reclaimed by the DHCP server.
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.
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.