System Administration Guide: IP Services

Chapter 15 Administering DHCP (Tasks)

This chapter describes tasks that you might find useful when you administer the Oracle Solaris DHCP service. The chapter includes tasks for the server, BOOTP relay agent, and client. Each task includes a procedure to help you perform the task in DHCP Manager and a procedure for the equivalent task with DHCP command-line utilities. DHCP command-line utilities are more fully documented in man pages.

You should have already completed the initial configuration of your DHCP service and initial network before you use this chapter. Chapter 14, Configuring the DHCP Service (Tasks) discusses DHCP configuration.

This chapter contains the following information:

About DHCP Manager

DHCP Manager is a graphical user interface (GUI) tool that you can use to perform administration tasks on the DHCP service.

DHCP Manager Window

The DHCP Manager window's appearance depends on how the DHCP server is configured on the system on which DHCP Manager is running.

DHCP Manager uses a tab-based window when the system is configured as a DHCP server. You select a tab for the type of information you want to work with. DHCP Manager features the following tabs:

The following figure shows how the DHCP Manager window might look when you start DHCP Manager on a DHCP server.

Figure 15–1 DHCP Manager on a DHCP Server System

Shows Addresses tab with network numbers, client names,
and lease information.

When the server is configured as a BOOTP relay agent, the DHCP Manager window does not show these tabs. The BOOTP relay agent does not need the same information. You can only modify the BOOTP relay agent's properties and stop or start the DHCP daemon with DHCP Manager. The following figure shows how DHCP Manager might look on a system that is configured as a BOOTP relay agent.

Figure 15–2 DHCP Manager on a BOOTP Relay Agent

The window displays the BOOTP Relay tab, which tells
you to manage the relay service through the Service menu.

DHCP Manager Menus

DHCP Manager menus include the following items:

When DHCP Manager runs on a BOOTP relay agent, the Edit and View menus are disabled.

All DHCP management tasks are accomplished through the Edit and Service menus.

You use the commands in the Edit menu to create, delete, and modify items in the selected tab. Items can include networks, addresses, macros, and options. When the Addresses tab is selected, the Edit menu also lists wizards. Wizards are sets of dialogs that help you create networks and multiple IP addresses.

The Service menu lists commands that enable you to manage the DHCP daemon. From the Service menu, you can perform the following tasks:

Starting and Stopping DHCP Manager

You must run DHCP Manager on a DHCP server system as superuser. If you must run DHCP Manager remotely, you can send the display to your system by using the X Window remote display feature.

ProcedureHow to Start and Stop DHCP Manager

  1. Become superuser on the DHCP server system.

  2. (Optional) If you are logged in to the DHCP server system remotely, display DHCP Manager on your local system as follows.

    1. Type the following on the local system:


      # xhost +server-name
      
    2. Type the following on the remote DHCP server system:


      # DISPLAY=local-hostname;export DISPLAY
      
  3. Start DHCP Manager.


    # /usr/sadm/admin/bin/dhcpmgr &
    

    The DHCP Manager window opens. If the server is configured as a DHCP server, the window displays the Addresses tab. If the server is configured as a BOOTP relay agent, the window displays with no tabs.

  4. To stop DHCP Manager, choose Exit from the File menu.

    The DHCP Manager window closes.

Setting Up User Access to DHCP Commands

By default, only root or superuser can execute dhcpconfig, dhtadm, and pntadm commands. If you want non root users to use the commands, you can set up role-based access control (RBAC) for those commands.

Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

You might also find the following man pages helpful: rbac(5), exec_attr(4), and user_attr(4).

The following procedure explains how to assign the DHCP Management profile, which enables the user to execute the DHCP commands.

ProcedureHow to Grant Users Access to DHCP Commands

  1. Become superuser on the DHCP server system.

  2. Edit the file /etc/user_attr to add an entry of the following form. Add one entry for each user or role that should manage the DHCP service.


    username::::type=normal;profiles=DHCP Management

    For example, for user ram, you would add the following entry:

    ram::::type=normal;profiles=DHCP Management

Starting and Stopping the DHCP Service

This section describes starting and stopping the DHCP service by using DHCP Manager and the dhcpconfig command. The DHCP service can also be started and stopped by using the Service Management Facility (SMF) commands. See DHCP Service and the Service Management Facility for more information about using SMF commands with the DHCP service.

Starting and stopping the DHCP service encompasses several degrees of action you can take to affect the operation of the DHCP daemon. You must understand what each action means in order to select the correct procedure to obtain the result that you want. The terms for the actions are as follows:


Note –

If a server has multiple network interfaces but you do not want to provide DHCP services on all the networks, see Specifying Network Interfaces for DHCP Monitoring.


The following procedures help you start, stop, enable, and disable the DHCP service.

ProcedureHow to Start and Stop the DHCP Service (DHCP Manager)

  1. Become superuser on the DHCP server system.

  2. Start DHCP Manager.


    # /usr/sadm/admin/bin/dhcpmgr &
    
  3. Select one of the following:

    • Choose Start from the Service menu to start the DHCP service.

    • Choose Stop from the Service menu to stop the DHCP service.

      The DHCP daemon stops until it is restarted, or the system reboots.

    • Choose Restart from the Service menu to stop and immediately restart the DHCP service.

ProcedureHow to Enable and Disable the DHCP Service (DHCP Manager)

  1. In DHCP Manager, choose one of the following:

    • Choose Enable from the Service menu to configure the DHCP daemon for automatic startup when the system boots.

      The DHCP service starts immediately when it is enabled.

    • Choose Disable from the Service menu to prevent the DHCP daemon from automatically starting when the system boots.

      The DHCP service immediately stops when it is disabled.

ProcedureHow to Enable and Disable the DHCP Service (dhcpconfig -S)

  1. Log in to the DHCP server system.

  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Choose one of the following:

    • To enable the DHCP service, type the following command:


      # /usr/sbin/dhcpconfig -S -e
      
    • To disable the DHCP service, type the following command:


      # /usr/sbin/dhcpconfig -S -d
      

DHCP Service and the Service Management Facility

The Service Management Facility (SMF) is described in Chapter 18, Managing Services (Overview), in System Administration Guide: Basic Administration. The SMF svcadm command can be used to enable and start the DHCP server, and disable and stop the DHCP server. However, you cannot use SMF commands to modify the DHCP service options that the DHCP tools allow you to set. In particular, service options that are stored in the /etc/dhcp/dhcpsvc.conf file cannot be set by using the SMF tools.

The following table maps DHCP commands to the equivalent SMF commands.

Table 15–1 SMF Commands For DHCP Server Tasks

Task 

DHCP Command 

SMF Command 

Enable DHCP service 

dhcpconfig -S -e

svcadm enable svc:/network/dhcp-server

Disable DHCP service 

dhcpconfig -S -d

svcadm disable svc:/network/dhcp-server

Start DHCP service for current session only 

None 

svcadm enable -t svc:/network/dhcp-server

Stop DHCP service for current session 

None 

svcadm disable -t svc:/network/dhcp-server

Restart DHCP service 

dhcpconfig -S -r

svcadm restart svc:/network/dhcp-server

Modifying DHCP Service Options (Task Map)

You can change values for some additional features of the DHCP service, which might not have been offered during the initial configuration with DHCP Manager. To change service options, you can use the Modify Service Options dialog box in DHCP Manager. Or you can specify options with the dhcpconfig command.

The following table is a map that describes tasks to modify DHCP service options. The table also includes links to the procedures to accomplish each task.

Task 

Description 

For Instructions 

Change logging options. 

Enable or disable logging, and select a syslog facility to use for logging DHCP transactions.

How to Generate Verbose DHCP Log Messages (DHCP Manager)

How to Generate Verbose DHCP Log Messages (Command Line)

How to Enable and Disable DHCP Transaction Logging (DHCP Manager)

How to Enable and Disable DHCP Transaction Logging (Command Line)

How to Log DHCP Transactions to a Separate syslog File

Change DNS update options. 

Enable or disable server's capability to dynamically add DNS entries for clients that supply a host name. Determine the maximum time the server should spend attempting to update DNS. 

How to Enable Dynamic DNS Updating for DHCP Clients

Enable or disable duplicate IP address detection. 

Enable or disable the DHCP server's capability to determine that an IP address is not already in use before offering the address to a client. 

How to Customize DHCP Performance Options (DHCP Manager)

How to Customize DHCP Performance Options (Command Line)

Change options for the DHCP server's reading of configuration information. 

Enable or disable the automatic reading of dhcptab at specified intervals, or change the interval between reads.

How to Customize DHCP Performance Options (DHCP Manager)

How to Customize DHCP Performance Options (Command Line)

Change the number of relay agent hops. 

Increase or decrease the number of networks a request can travel through before being dropped by the DHCP daemon. 

How to Customize DHCP Performance Options (DHCP Manager)

How to Customize DHCP Performance Options (Command Line)

Change the length of time an IP address offer is cached. 

Increase or decrease the number of seconds that the DHCP service reserves an offered IP address before offering the address to a new client. 

How to Customize DHCP Performance Options (DHCP Manager)

How to Customize DHCP Performance Options (Command Line)

The following figure shows DHCP Manager's Modify Service Options dialog box.

Figure 15–3 Modify Service Options Dialog Box in DHCP Manager

Dialog box shows the Options tab with many options fields
and check boxes. The context describes the purpose of the dialog box.

Changing DHCP Logging Options

The DHCP service can log DHCP service messages and DHCP transactions to syslog. See the syslogd(1M) and syslog.conf(4) man pages for more information about syslog.

DHCP service messages logged to syslog include the following:

You can increase the amount of information that is reported by using the verbose option for the DHCP daemon. Verbose message output can help you troubleshoot DHCP problems. See How to Generate Verbose DHCP Log Messages (DHCP Manager).

Another useful troubleshooting technique is transaction logging. Transactions provide information about every interchange between a DHCP server or BOOTP relay and clients. DHCP transactions include the following message types:

BOOTP relay transactions include the following message types:

DHCP transaction logging is disabled by default. When enabled, DHCP transaction logging uses the local0 facility in syslog by default. DHCP transaction messages are generated with a syslog severity level of notice. This security level causes DHCP transactions to be logged to the file where other system notices are logged. However, because the local facility is used, the DHCP transaction messages can be logged separately from other notices. To log the transaction messages separately, you must edit the syslog.conf file to specify a separate log file. See the syslog.conf(4) man page for more information about the syslog.conf file.

You can disable or enable transaction logging, and you can specify a different syslog facility, from local0 through local7, as explained in How to Enable and Disable DHCP Transaction Logging (DHCP Manager). In the server system's syslog.conf file, you can also instruct syslogd to store the DHCP transaction messages in a separate file. See How to Log DHCP Transactions to a Separate syslog File for more information.

ProcedureHow to Generate Verbose DHCP Log Messages (DHCP Manager)

  1. In DHCP Manager, choose Modify from the Service menu.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

    The Modify Service Options dialog box opens and displays the Options tab. See Figure 15–3.

  2. Select Verbose Log Messages.

  3. Select Restart Server.

    The Restart Server option is near the bottom of the dialog box.

  4. Click OK.

    The daemon runs in verbose mode for this session and each subsequent session until you reset this option. Verbose mode can reduce daemon efficiency because of the time that is taken to display messages.

ProcedureHow to Generate Verbose DHCP Log Messages (Command Line)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type the following command to set verbose mode:


    # /usr/sbin/dhcpconfig -P VERBOSE=true
    

    The next time the DHCP server starts, the server runs in verbose mode until you turn off verbose mode.

    To turn off verbose mode, type the following command:


    # /usr/sbin/dhcpconfig -P VERBOSE=
    

    This command sets the VERBOSE keyword to no value, which causes the keyword to be removed from the server's configuration file.

    Verbose mode can reduce daemon efficiency because of the time that is taken to display messages.

ProcedureHow to Enable and Disable DHCP Transaction Logging (DHCP Manager)

This procedure enables and disables transaction logging for all subsequent DHCP server sessions.

  1. In DHCP Manager, choose Modify from the Service menu.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select Log Transactions to Syslog Facility.

    To disable transaction logging, deselect this option.

  3. (Optional) Select a local facility from 0 to 7 to use for logging DHCP transactions.

    By default, DHCP transactions are logged to the location where system notices are logged, which depends on how syslogd is configured. If you want the DHCP transactions to be logged to a file separate from other system notices, see How to Log DHCP Transactions to a Separate syslog File.

    Message files can quickly become very large when transaction logging is enabled.

  4. Select Restart Server.

  5. Click OK.

    The daemon logs transactions to the selected syslog facility for this session and each subsequent session until you disable logging.

ProcedureHow to Enable and Disable DHCP Transaction Logging (Command Line)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Choose one of the following steps:

    • To enable DHCP transaction logging, type the following command:


      # /usr/sbin/dhcpconfig -P LOGGING_FACILITY=syslog-local-facility
      

      syslog-local-facility is a number from 0 through 7. If you omit this option, 0 is used.

      By default, DHCP transactions are logged to the location where system notices are logged, which depends on how syslogd is configured. If you want the DHCP transactions to be logged to a file separate from other system notices, see How to Log DHCP Transactions to a Separate syslog File.

      Message files can quickly become very large when transaction logging is enabled.

    • To disable DHCP transaction logging, type the following command:


      # /usr/sbin/dhcpconfig -P LOGGING_FACILITY=
      

      Note that you supply no value for the parameter.

ProcedureHow to Log DHCP Transactions to a Separate syslog File

  1. Become superuser or assume an equivalent role on the DHCP server system.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

    A role that is assigned to the DHCP Management profile might not be sufficient for this task. The role must have permission to edit syslog files.

  2. Edit the /etc/syslog.conf file on the server system to add a line of the following format:


    localn.notice     path-to-logfile
    

    n is the syslog facility number you specified for transaction logging, and path-to-logfile is the complete path to the file to use for logging transactions.

    For example, you might add the following line:

    local0.notice /var/log/dhcpsrvc

    See the syslog.conf(4) man page for more information about the syslog.conf file.

Enabling Dynamic DNS Updates by a DHCP Server

DNS provides name-to-address and address-to-name services for the Internet. Once a DNS mapping is made, a system can be reached through its host name or its IP address. The system is also reachable from outside its domain.

The DHCP service can use DNS in two ways:

You can enable the DHCP service to update the DNS service for DHCP clients that supply their own host names. For the DNS update feature to work, the DNS server, the DHCP server, and the DHCP client must be set up correctly. In addition, the requested host name must not be in use by another system in the domain.

The DHCP server's DNS update feature works if the following statements are true:

ProcedureHow to Enable Dynamic DNS Updating for DHCP Clients


Note –

Be aware that dynamic DNS updates are a security risk.

By default, the Oracle Solaris DNS daemon (in.named) does not allow dynamic updates. Authorization for dynamic DNS updates is granted in the named.conf configuration file on the DNS server system. No other security is provided. You must carefully weigh the convenience of this facility for users against the security risk created when you enable dynamic DNS updates.


  1. On the DNS server, edit the /etc/named.conf file as superuser.

  2. Find the zone section for the appropriate domain in the named.conf file.

  3. Add the DHCP server's IP addresses to the allow-update keyword.

    If the allow-update keyword does not exist, insert the keyword.

    For example, if the DHCP server resides at addresses 10.0.0.1 and 10.0.0.2, a named.conf file for the dhcp.domain.com zone should be modified as follows:


    zone "dhcp.domain.com" in {
                 type master;
                 file "db.dhcp";
                 allow-update { 10.0.0.1; 10.0.0.2; }; 
    };  
     
    zone "10.IN-ADDR.ARPA" in {
                 type master;
                 file "db.10"; 
                 allow-update { 10.0.0.1; 10.0.0.2; };
    }; 

    Note that allow-update for both zones must be enabled to allow the DHCP server to update both A and PTR records on the DNS server.

  4. On the DHCP server, start DHCP Manager.


    # /usr/sadm/admin/bin/dhcpmgr &
    

    See How to Start and Stop DHCP Manager for more detailed information.

  5. Choose Modify from the Service menu.

    The Modify Service Options dialog box opens.

  6. Select Update DNS Host Information Upon Client Request.

  7. Specify the number of seconds to wait for a response from the DNS server before timing out, then click OK.

    The default value of 15 seconds should be adequate. If you have time out problems, you can increase the value later.

  8. Click the Macros tab, and ensure that the correct DNS domain is specified.

    The DNSdmain option must be passed with the correct domain name to any client that expects dynamic DNS update support. By default, DNSdmain is specified in the server macro, which is used as the configuration macro bound to each IP address.

  9. Set up the DHCP client to specify its host name when requesting DHCP service.

    If you use the Oracle Solaris DHCP client, see How to Enable an Oracle Solaris DHCPv4 Client to Request a Specific Host Name. If your client is not a Oracle Solaris DHCP client, see the documentation for your DHCP client for information about how to specify a host name.

Client Host Name Registration

If you let the DHCP server generate host names for the IP addresses that you place in the DHCP service, the DHCP server can register those host names in NIS+, /etc/inet/hosts, or DNS name services. Host name registration cannot be done in NIS because NIS does not provide a protocol to allow programs to update and propagate NIS maps.


Note –

The DHCP server can update DNS with generated host names only if the DNS server and the DHCP server are running on the same system.


If a DHCP client provides its host name and the DNS server is configured to allow dynamic updates from the DHCP server, the DHCP server can update DNS on the client's behalf. Dynamic updates can be done even if the DNS and DHCP servers are running on different systems. See Enabling Dynamic DNS Updates by a DHCP Server for more information about enabling this feature.

The following table summarizes client host name registration for DHCP client systems with the various name services.

Table 15–2 Client Host Name Registration in Name Services
 

Who Registers Host Name 

Name Service 

DHCP-Generated Host Name 

DHCP Client-Supplied Host Name 

NIS 

NIS Administrator 

NIS Administrator 

NIS+ 

DHCP tools 

DHCP tools 

/etc/hosts

DHCP tools 

DHCP tools 

DNS 

DHCP tools, if the DNS server runs on the same system as the DHCP server 

DNS Administrator, if the DNS server runs on a different system 

DHCP server, if configured for dynamic DNS updates 

DNS Administrator, if DHCP server is not configured for dynamic DNS updates 

Oracle Solaris DHCP clients can request particular host names in DHCP requests if configured to do so as described in How to Enable an Oracle Solaris DHCPv4 Client to Request a Specific Host Name. Refer to the vendor documentation for other DHCP clients to determine if the capability is supported.

Customizing Performance Options for the DHCP Server

You can change options that affect the performance of the DHCP server. These options are described in the following table.

Table 15–3 Options Affecting DHCP Server Performance

Server Option 

Description 

Keyword 

Maximum number of BOOTP relay agent hops 

If a request has traveled through more than a given number of BOOTP relay agents, the request is dropped. The default maximum number of relay agent hops is four. This number is likely to be sufficient for most networks. A network might need more than four hops if DHCP requests pass through several BOOTP relay agents before reaching a DHCP server.

RELAY_HOPS=integer

Detect duplicate addresses 

By default, the server pings an IP address before offering the address to a client. A lack of response to the ping verifies that the address is not already in use. You can disable this feature to decrease the time that the server takes to make an offer. However, disabling the feature creates the risk of having duplicate IP addresses in use.

ICMP_VERIFY=TRUE/FALSE

Reload dhcptab automatically at specified intervals

The server can be set to automatically read the dhcptab at the interval, in minutes, that you specify. If your network configuration information does not change frequently, and you do not have multiple DHCP servers, you do not need to reload the dhcptab automatically. Also, note that DHCP Manager gives you the option to have the server reload the dhcptab after you make a change to the data.

RESCAN_INTERVAL=min

Cache offers of IP addresses for specified intervals 

After a server offers an IP address to a client, the offer is cached. While the offer is cached, the server does not offer the address again. You can change the number of seconds for which the offer is cached. The default is 10 seconds. On slow networks, you might need to increase the offer time.

OFFER_CACHE_TIMEOUT=sec

The following procedures describe how to change these options.

ProcedureHow to Customize DHCP Performance Options (DHCP Manager)

  1. In DHCP Manager, choose Modify from the Service menu.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Change the desired options.

    See Table 15–3 for information about the options.

  3. Select Restart Server.

  4. Click OK.

ProcedureHow to Customize DHCP Performance Options (Command Line)

If you change options with this procedure, the changed options are used only after the DHCP server is restarted.

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Modify one or more performance options:


    # /usr/sbin/dhcpconfig -P keyword=value,keyword=value...
    

    keyword=value can be any of the following keywords:

    RELAY_HOPS=integer

    Specifies the maximum number of relay agent hops that can occur before the daemon drops the DHCP or BOOTP datagram.

    ICMP_VERIFY=TRUE/FALSE

    Enables or disables automatic duplicate IP address detection. Setting this keyword to FALSE is not recommended.

    RESCAN_INTERVAL=minutes

    Specifies the interval in minutes that the DHCP server should use to schedule the automatic rereading of the dhcptab information.

    OFFER_CACHE_TIMEOUT=seconds

    Specifies the number of seconds the DHCP server should cache the offers that are extended to discovering DHCP clients. The default setting is 10 seconds.


Example 15–1 Setting DHCP Performance Options

The following is an example of how to specify all the command options.


# dhcpconfig -P RELAY_HOPS=2,ICMP_VERIFY=TRUE,\
RESCAN_INTERVAL=30,OFFER_CACHE_TIMEOUT=20

Adding, Modifying, and Removing DHCP Networks (Task Map)

When you configure a DHCP server, you must also configure at least one network in order to use the DHCP service. You can add more networks at any time.

The following table is a map that describes additional tasks that you can perform when working with DHCP networks after their initial configuration. The task map includes links to procedures for carrying out the tasks.

Task 

Description 

For Instructions 

Enable or disable the DHCP service on server network interfaces 

The default behavior is to monitor all network interfaces for DHCP requests. If you do not want all interfaces to accept DHCP requests, you can remove an interface from the list of monitored interfaces. 

How to Specify Network Interfaces for DHCP Monitoring (DHCP Manager)

Add a new network to the DHCP service. 

Places a network under DHCP management, for the purpose of managing IP addresses on the network. 

How to Add a DHCP Network (DHCP Manager)

How to Add a DHCP Network (dhcpconfig)

Change parameters of a DHCP-managed network. 

Modifies the information that is passed to clients of a particular network. 

How to Modify the Configuration of a DHCP Network (DHCP Manager)

How to Modify the Configuration of a DHCP Network (dhtadm)

Delete a network from the DHCP service. 

Removes a network so that IP addresses on the network are no longer managed by DHCP. 

How to Remove a DHCP Network (DHCP Manager)

How to Remove a DHCP Network (pntadm)

Specifying Network Interfaces for DHCP Monitoring

By default, both dhcpconfig and DHCP Manager's Configuration Wizard configure the DHCP server to monitor all the server system's network interfaces. If you add a new network interface to the server system, the DHCP server automatically monitors the new interface when you boot the system. You can then add any networks to be monitored through the network interface.

However, you can also specify which network interfaces should be monitored, and which interfaces should be ignored. You might want to ignore an interface if you do not want to offer DHCP service on that network.

If you specify that any interface should be ignored, and then install a new interface, the DHCP server ignores the new interface. You must add the new interface to the server's list of monitored interfaces. You can specify interfaces with DHCP Manager or the dhcpconfig utility.

This section includes procedures that enable you to specify which network interfaces DHCP should monitor or ignore. The DHCP Manager procedure uses the Interfaces tab of the DHCP Manager's Modify Service Options dialog box, which is shown in the following figure.

Figure 15–4 Interfaces Tab of Modify Service Options Dialog Box in DHCP Manager

Dialog box lists Monitored and Ignored Interfaces on
left and right with selection arrows between lists. OK, Reset, Cancel, and
Help buttons shown.

ProcedureHow to Specify Network Interfaces for DHCP Monitoring (DHCP Manager)

  1. In DHCP Manager, choose Modify from the Service menu.

    The Modify Service Options dialog box is displayed.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the Interfaces tab.

  3. Select the appropriate network interface.

  4. Click the arrow buttons to move the interface to the appropriate list.

    For example, to ignore an interface, select the interface in the Monitored Interfaces list, and then click the right arrow button. The interface is then shown in the Ignored Interfaces list.

  5. Select Restart Server, and click OK.

    The changes you make persist across reboots.

ProcedureHow to Specify Network Interfaces for DHCP Monitoring (dhcpconfig)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type the following command on the DHCP server system:


    # /usr/sbin/dhcpconfig -P INTERFACES=int,int,...
    

    int, int,... is a list of interfaces to monitor. The interface names must be separated by commas.

    For example, you would use the following command to monitor only ge0 and ge1:


    #/usr/sbin/dhcpconfig -P INTERFACES=ge0,ge1
    

    Interfaces that you want to ignore should be omitted from the dhcpconfig command line.

    The changes you make with this command persist across reboots.

Adding DHCP Networks

When you use DHCP Manager to configure the server, the first network is also configured at the same time. The first network is usually the local network on the server system's primary interface. If you want to configure additional networks, use the DHCP Network Wizard in DHCP Manager.

If you use the dhcpconfig -D command to configure the server, you must separately configure all networks that you want to use the DHCP service. See How to Add a DHCP Network (dhcpconfig) for more information.

The following figure shows the initial dialog box for the DHCP Network Wizard in DHCP Manager.

Figure 15–5 DHCP Manager's Network Wizard

Dialog box shows a Network Address pull-down list and
Subnet Mask field with a right selection arrow. Cancel and Help buttons are
also shown.

When you configure a new network, DHCP Manager creates the following components:

ProcedureHow to Add a DHCP Network (DHCP Manager)

  1. In DHCP Manager, click the Addresses tab.

    Any networks already configured for DHCP service are listed.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Network Wizard from the Edit menu.

  3. Select options, or type requested information. Use the decisions that you made during the planning phase to determine what information to specify.

    Planning is described in Planning DHCP Configuration of Your Remote Networks.

    If you have difficulty with the wizard, click Help in the wizard window. Your web browser displays help for the DHCP Network Wizard.

  4. Click Finish to complete the network configuration when you have finished specifying the requested information.

    The Network Wizard creates an empty network table, which is listed in the left pane of the window.

    The Network Wizard also creates a network macro whose name matches the IP address of the network.

  5. (Optional) Select the Macros tab and select the network macro to view the macro's contents.

    You can confirm that the information that you provided in the wizard has been inserted as values for options in the network macro.

See Also

You must add addresses for the network before the network's IP addresses can be managed under DHCP. See Adding IP Addresses to the DHCP Service for more information.

If you leave the network table empty, the DHCP server can still provide configuration information to clients. See Setting Up DHCP Clients to Receive Information Only (Task Map) for more information.

ProcedureHow to Add a DHCP Network (dhcpconfig)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type the following command on the DHCP server system:


    # /usr/sbin/dhcpconfig -N network-address
    

    network-address is the IP address of the network you want to add to the DHCP service. See the dhcpconfig(1M) man page for suboptions you can use with the -N option.

    If you do not use suboptions, dhcpconfig uses network files to obtain information about the network.

See Also

You must add addresses for the network before the network's IP addresses can be managed under DHCP. See Adding IP Addresses to the DHCP Service for more information.

If you leave the network table empty, the DHCP server can still provide configuration information to clients. See Setting Up DHCP Clients to Receive Information Only (Task Map) for more information.

Modifying DHCP Network Configurations

After you add a network to the DHCP service, you can modify the configuration information that you originally supplied. The configuration information is stored in the network macro used to pass information to clients on the network. You must modify the network macro to change the network configuration.

The following figure shows the Macros tab of DHCP Manager.

Figure 15–6 DHCP Manager's Macros Tab

Macros tab shows list of macros with one macro selected.
Option names and values contained in macro are shown.

ProcedureHow to Modify the Configuration of a DHCP Network (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    All macros that are defined for this DHCP server are listed in the left pane.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the network macro whose name matches the network configuration that you are changing.

    The network macro name is the network IP address.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box displays a table of the options included in the macro.

  4. Select the option that you want to modify.

    The option name and its value are displayed in text fields near the top of the dialog box.

  5. (Optional) Modify the option name, or choose the Select button to display a list of option names.

    The Select Option dialog box displays a list of all DHCP standard options, with a brief description of each option.

  6. (Optional) Select an option name in the Select Option dialog box, and click OK.

    The new option name is displayed in the Option Name field.

  7. Type the new value for the option, and click Modify.

  8. (Optional) You can also add options to the network macro by choosing Select in the dialog box.

    See Modifying DHCP Macros for more general information about modifying macros.

  9. Select Notify DHCP Server of Change, and click OK.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

ProcedureHow to Modify the Configuration of a DHCP Network (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Determine which macro includes information for all clients of the network.

    The network macro's name matches the network IP address.

    If you don't know which macro includes this information, you can display the dhcptab table to list all macros by using the command dhtadm -P.

  3. Type a command of the following format to change the value of the option you want to change:


    # dhtadm -M -m macro-name -e 'symbol=value' -g
    

    See the dhtadm(1M) man page for more information about dhtadm command-line options.


Example 15–2 Using the dhtadm Command to Modify a DHCP Macro

For example, to change the 10.25.62.0 macro's lease time to 57600 seconds and the NIS domain to sem.example.com, you would type the following commands:

# dhtadm -M -m 10.25.62.0 -e 'LeaseTim=57600' -g

# dhtadm -M -m 10.25.62.0 -e 'NISdmain=sem.example.com' -g

The -g option causes the DHCP daemon to reread the dhcptab table and put the changes into effect.


Removing DHCP Networks

DHCP Manager enables you to remove multiple networks at once. You have the option to automatically remove the hosts table entries associated with the DHCP-managed IP addresses on those networks as well. The following figure shows DHCP Manager's Delete Networks dialog box.

Figure 15–7 Delete Networks Dialog Box in DHCP Manager

Dialog box shows two lists, Keep Networks and Delete
Networks, with selection arrows between them. Check box for Delete host table
entries also shown.

The pntadm command requires you to delete each IP address entry from a network before you delete that network. You can delete only one network at a time.

ProcedureHow to Remove a DHCP Network (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Delete Networks from the Edit menu.

    The Delete Networks dialog box opens.

  3. In the Keep Networks list, select the networks that you want to delete.

    Press the Control key while you click with the mouse to select multiple networks. Press the Shift key while you click to select a range of networks.

  4. Click the right arrow button to move the selected networks to the Delete Networks list.

  5. If you want to remove the host table entries for this network's DHCP addresses, select Delete Host Table Entries.

    Note that deleting host table entries does not delete the host registrations at the DNS server for these addresses. Entries are deleted only in the local name service.

  6. Click OK.

ProcedureHow to Remove a DHCP Network (pntadm)

Note that this procedure deletes the network's IP addresses from the DHCP network table before removing the network. The addresses are deleted to ensure that the host names are removed from the hosts file or database.

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Type a command following this format to remove an IP address and its host name from the name service:


    # pntadm -D -y IP-address
    

    For example, to remove IP address 10.25.52.1, you would type the following command:

    # pntadm -D -y 10.25.52.1

    The -y option specifies to delete the host name.

  3. Repeat the pntadm -D -y command for each address in the network.

    You might want to create a script to run the pntadm command if you are deleting many addresses.

  4. After all addresses are deleted, type the following command to delete the network from the DHCP service.


    # pntadm -R network-IP-address
    

    For example, to remove network 10.25.52.0, you would type the following command:

    # pntadm -R 10.25.52.0

    See the pntadm(1M) man page for more information about using the pntadm utility.

Supporting BOOTP Clients With the DHCP Service (Task Map)

To support BOOTP clients on your DHCP server, you must set up your DHCP server to be BOOTP compatible. If you want to specify which BOOTP clients can use your DHCP, you can register BOOTP clients in the DHCP server's network table. Alternatively, you can reserve a number of IP addresses for automatic allocation to BOOTP clients.


Note –

BOOTP addresses are permanently assigned, whether or not you explicitly assign a permanent lease to the address.


The following table describes tasks that you might need to perform to support BOOTP clients. The task map contains links to the procedures used to carry out the tasks.

Task 

Description 

For Instructions 

Set up automatic BOOTP support. 

Provides IP address for any BOOTP client on a DHCP-managed network, or on a network connected by a relay agent to a DHCP-managed network.  

You must reserve a pool of addresses for exclusive use by BOOTP clients. This option might be more useful if the server must support a large number of BOOTP clients. 

How to Set Up Support of Any BOOTP Client (DHCP Manager)

Set up manual BOOTP support. 

Provides IP address for only those BOOTP clients that have been manually registered with the DHCP service.  

This option requires you to bind a client's ID to a particular IP address that has been marked for BOOTP clients. This option is useful for a small number of BOOTP clients, or when you want to restrict the BOOTP clients that can use the DHCP server. 

How to Set Up Support of Registered BOOTP Clients (DHCP Manager)

ProcedureHow to Set Up Support of Any BOOTP Client (DHCP Manager)

  1. In DHCP Manager, select Modify from the Service menu.

    The Modify Service Options dialog box opens.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. In the BOOTP Compatibility section of the dialog box, select Automatic.

  3. Select Restart Server, and click OK.

  4. Select the Addresses tab.

  5. Select addresses that you want to reserve for BOOTP clients.

    Select a range of addresses by clicking the first address, pressing the Shift key, and clicking the last address. Select multiple nonconcurrent addresses by pressing the Control key while clicking each address.

  6. Select Properties from the Edit menu.

    The Modify Multiple Addresses dialog box opens.

  7. In the BOOTP section, select Assign All Addresses Only to BOOTP Clients.

    All other options should be set to Keep Current Settings.

  8. Click OK.

    Any BOOTP client can now obtain an address from this DHCP server.

ProcedureHow to Set Up Support of Registered BOOTP Clients (DHCP Manager)

  1. In DHCP Manager, select Modify from the Service menu.

    The Modify Service Options dialog box opens.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. In the BOOTP Compatibility section of the dialog box, select Manual.

  3. Select Restart Server, and click OK.

  4. Select the Addresses tab.

  5. Select an address that you want to assign to a particular BOOTP client.

  6. Choose Properties from the Edit menu.

    The Address Properties dialog box opens.

  7. In the Address Properties dialog box, select the Lease tab.

  8. In the Client ID field, type the client's identifier.

    For a BOOTP Oracle Solaris client on an Ethernet network, the client ID is a string that is derived from the client's hexadecimal Ethernet address. The client ID includes a prefix that indicates the Address Resolution Protocol (ARP) type for Ethernet (01). For example, a BOOTP client with the Ethernet address 8:0:20:94:12:1e would use the client ID 0108002094121E.


    Tip –

    As superuser on an Oracle Solaris client system, type the following command to obtain the Ethernet address for the interface:

    # ifconfig -a


  9. Select Reserved to reserve the IP address for this client.

  10. Select Assign Only to BOOTP Clients, and click OK.

    In the Addresses tab, BOOTP is displayed in the Status field, and the client ID you specified is listed in the Client ID field.

Working With IP Addresses in the DHCP Service (Task Map)

You can use DHCP Manager or the pntadm command to add IP addresses, modify address properties, and remove addresses from the DHCP service. Before you work with IP addresses, you should refer to Table 15–4 to become familiar with IP address properties. The table provides information for users of DHCP Manager and pntadm.


Note –

Table 15–4 includes examples of using pntadm to specify IP address properties while adding and modifying IP addresses. Refer also to the pntadm(1M) man page for more information about pntadm.


The following task map lists tasks that you must perform to add, modify, or remove IP addresses. The task map also contains links to the procedures used to carry out the tasks.

Task 

Description 

For Instructions 

Add single or multiple IP addresses to the DHCP service. 

Adds IP addresses on networks that are already managed by the DHCP service by using DHCP Manager. 

How to Add a Single IP Address (DHCP Manager)

How to Duplicate an Existing IP Address (DHCP Manager)

How to Add Multiple IP Addresses (DHCP Manager)

How to Add IP Addresses (pntadm)

Change properties of an IP address. 

Changes any of the IP address properties described in Table 15–4.

How to Modify IP Address Properties (DHCP Manager)

How to Modify IP Address Properties (pntadm)

Remove IP addresses from the DHCP service. 

Prevents the use of specified IP addresses by DHCP. 

How to Mark IP Addresses as Unusable (DHCP Manager)

How to Mark IP Addresses as Unusable (pntadm)

How to Delete IP Addresses From DHCP Service (DHCP Manager)

How to Delete IP Addresses From the DHCP Service (pntadm)

Assign a consistent IP address to a DHCP client. 

Sets up a client to receive the same IP address each time the client requests its configuration. 

How to Assign a Consistent IP Address to a DHCP Client (DHCP Manager)

How to Assign a Consistent IP Address to a DHCP Client (pntadm)

The following table lists and describes the properties of IP addresses.

Table 15–4 IP Address Properties

Property 

Description 

How to Specify in pntadm Command

Network address 

The address of the network that contains the IP address that you are working with. 

The network address is displayed in the Networks list within the Addresses tab in DHCP Manager. 

The network address must be the last argument on the pntadm command line used to create, modify, or delete an IP address.

For example, to add an IP address to network 10.21.0.0, you would type:

pntadm -A ip-address options 10.21.0.0

IP address 

The address you are working with, whether you are creating, modifying, or deleting the address. 

The IP address is displayed in the first column of the DHCP Manager's Addresses tab. 

The IP address must accompany the -A, -M, and -D options to the pntadm command.

For example, to modify IP address 10.21.5.12, you would type:

pntadm -M 10.21.5.12 options 10.21.0.0

Client name 

The host name mapped to the IP address in the hosts table. This name can be automatically generated by DHCP Manager when addresses are created. If you create a single address, you can supply the name. 

Specify the client name with the -h option.

For example, to specify client name carrot12 for 10.21.5.12, you would type:

pntadm -M 10.21.5.12 -h carrot12 10.21.0.0

Owned by server 

The DHCP server that manages the IP address and responds to the DHCP client's request for IP address allocation. 

Specify the owning server name with the -s option.

For example to specify server blue2 to own 10.21.5.12, you would type:

pntadm -M 10.21.5.12 -s blue2 10.21.0.0

Configuration macro 

The macro that the DHCP server uses to obtain network configuration options from the dhcptab table. Several macros are created automatically when you configure a server, and when you add networks. See About DHCP Macros for more information about macros. When addresses are created, a server macro is also created. The server macro is assigned as the configuration macro for each address.

Specify the macro name with the -m option.

For example, to assign the server macro blue2 to address 10.21.5.12, you would type:

pntadm -M 10.21.5.12 -m blue2 10.21.0.0

Client ID 

A text string that is unique within the DHCP service.

If the client ID is listed as 00, the address is not allocated to any client. If you specify a client ID when modifying the properties of an IP address, the address is bound exclusively to that client. 

The client ID is determined by the vendor of the DHCP client. If your client is not an Oracle Solaris DHCP client, consult your DHCP client documentation for more information. 

Specify the client ID with the -i option.

For example, to assign client ID 08002094121E to address 10.21.5.12, you would type:

pntadm -M 10.21.5.12 -i 0108002094121E 10.21.0.0

 

For Oracle Solaris DHCP clients, the client ID is derived from the client's hexadecimal hardware address. The client ID includes a prefix that represents the ARP code for the type of network, such as 01 for Ethernet. The ARP codes are assigned by the Internet Assigned Numbers Authority (IANA) in the ARP Parameters section of the Assigned Numbers standard at http://www.iana.com/numbers.html

For example, an Oracle Solaris client with the hexadecimal Ethernet address 8:0:20:94:12:1e uses the client ID 0108002094121E. The client ID is listed in DHCP Manager and pntadm when a client is currently using an address.

Tip: As superuser on the Oracle Solaris client system, type the following command to obtain the Ethernet address for the interface: ifconfig -a

 

Reserved 

The setting that specifies the address is reserved exclusively for the client indicated by the client ID, and the DHCP server cannot reclaim the address. If you choose this option, you manually assign the address to the client.

Specify that the address is reserved, or manual, with the -f option.

For example, to specify that IP address 10.21.5.12 is reserved for a client, you would type:

pntadm -M 10.21.5.12 -f MANUAL 10.21.0.0

Lease type or policy 

The setting that determines how DHCP manages the use of IP addresses by clients. A lease is either dynamic or permanent. See Dynamic and Permanent Lease Types for a complete explanation.

Specify that the address is permanently assigned with the -f option. Addresses are dynamically leased by default.

For example, to specify that IP address 10.21.5.12 has a permanent lease, you would type:

pntadm -M 10.21.5.12 -f PERMANENT 10.21.0.0

Lease expiration date 

The date when the lease expires, applicable only when a dynamic lease is specified. The date is specified in mm/dd/yyyy format.

Specify a lease expiration date with the -e option.

For example, to specify an expiration date of January 1, 2006, you would type: 

pntadm -M 10.21.5.12 -e 01/01/2006 10.21.0.0

BOOTP setting 

The setting that marks the address as reserved for BOOTP clients. See Supporting BOOTP Clients With the DHCP Service (Task Map) for more information about supporting BOOTP clients.

Reserve an address for BOOTP clients with the -f option.

For example, to reserve IP address 10.21.5.12 for BOOTP clients, you would type:

pntadm -M 10.21.5.12 -f BOOTP 10.21.0.0

Unusable setting 

The setting that marks the address to prevent assignment of the address to any client.

Mark an address as unusable with the -f option.

For example, to mark IP address 10.21.5.12 as unusable, you would type:

pntadm -M 10.21.5.12 -f UNUSABLE 10.21.0.0

Adding IP Addresses to the DHCP Service

Before you add IP addresses, you must add the network that owns the addresses to the DHCP service. See Adding DHCP Networks for information about adding networks.

You can add addresses with DHCP Manager or the pntadm command.

On networks that are already managed by the DHCP service, you can add addresses in several ways with DHCP Manager:

The following figure shows the Create Address dialog box. The Duplicate Address dialog box is identical to the Create Address dialog box, except that the text fields display the values for an existing address.

Figure 15–8 Create Address Dialog Box in DHCP Manager

Dialog box shows Address tab, which includes fields IP
Address, Client Name, Comment. Shows pull-down list called Configuration Macro.

The following figure shows the first dialog of the Add Addresses to Network wizard, used to add a range of IP addresses.

Figure 15–9 Add Addresses to Network Wizard in DHCP Manager

The context describes the purpose of the graphic. Shows
Number of IP Addresses and Comment fields, back and forward arrows, Cancel,
and Help buttons.

ProcedureHow to Add a Single IP Address (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the network where the new IP address is to be added.

  3. Choose Create from the Edit menu.

    The Create Address dialog box opens.

  4. Select or type values for the address settings on the Address and Lease tabs.

    Select the Help button to open a web browser to display help for the dialog box. Also, see Table 15–4 for detailed information about the settings.

  5. Click OK.

ProcedureHow to Duplicate an Existing IP Address (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the network where the new IP address is located.

  3. Select the address with properties that you want to duplicate.

  4. Choose Duplicate from the Edit menu.

  5. Specify the new IP address in the IP Address field.

  6. (Optional) Specify a new client name for the address.

    You cannot use the same name that is used by the address that you are duplicating.

  7. (Optional) Modify other option values, if necessary.

    Most other option values should remain the same.

  8. Click OK.

ProcedureHow to Add Multiple IP Addresses (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the network where the new IP addresses are to be added.

  3. Choose Address Wizard from the Edit menu.

    The Add Addresses to Network dialog box prompts you to provide values for the IP address properties. See Table 15–4 for more information about the properties, or select the Help button in the dialog box. Making Decisions for IP Address Management (Task Map) includes more extensive information.

  4. Click the right arrow button as you finish each screen, and click Finish on the last screen.

    The Addresses tab is updated with the new addresses.

ProcedureHow to Add IP Addresses (pntadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Add IP addresses by typing a command of the following format:


    # pntadm -A ip-address options  network-address
    

    Refer to the pntadm(1M) man page for a list of options you can use with pntadm -A. In addition, Table 15–4 shows some sample pntadm commands that specify options.


    Note –

    You can write a script to add multiple addresses with pntadm. See Example 18–1 for an example.


Modifying IP Addresses in the DHCP Service

You can modify any of the address properties described in Table 15–4 by using DHCP Manager or the pntadm -M command. See the pntadm(1M) man page for more information about pntadm -M.

The following figure shows the Address Properties dialog box that you use to modify IP address properties.

Figure 15–10 Address Properties Dialog Box in DHCP Manager

Address tab with fields called IP Address, Client Name,
Owned by Server, and Comment. Also shows Configuration Macro with pull-down
list.

The following figure shows the Modify Multiple Addresses dialog box that you use to modify multiple IP addresses.

Figure 15–11 Modify Multiple Addresses Dialog Box in DHCP Manager

Dialog box shows pull-down lists labeled Managing Server
and Configuration Macro. Shows selections for BOOTP, Unusable addresses, and
Lease Type.

ProcedureHow to Modify IP Address Properties (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the IP address's network.

  3. Select one or more IP addresses to modify.

    If you want to modify more than one address, press the Control key while you click with the mouse to select multiple addresses. You can also press the Shift key while you click to select a block of addresses.

  4. Choose Properties from the Edit menu.

    The Address Properties dialog box or the Modify Multiple Address dialog box opens.

  5. Change the appropriate properties.

    Click the Help button, or refer to Table 15–4 for information about the properties.

  6. Click OK.

ProcedureHow to Modify IP Address Properties (pntadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Modify IP address properties by typing a command of the following format:


    # pntadm -M ip-address options network-address
    

    Many options can be used with the pntadm command, which are documented in the pntadm(1M) man page.

    Table 15–4 shows some sample pntadm commands that specify options.

Removing IP Addresses From the DHCP Service

At times, you might want the DHCP service to stop managing a particular IP address or group of addresses. The method that you use to remove an address from DHCP depends on whether you want the change to be temporary or permanent.

Marking IP Addresses as Unusable by the DHCP Service

You can use the pntadm -M command with the -f UNUSABLE option to mark addresses as unusable.

In DHCP Manager, you use the Address Properties dialog box, shown in Figure 15–10, to mark individual addresses. You use the Modify Multiple Addresses dialog box, show in Figure 15–11, to mark multiple addresses, as described in the following procedure.

ProcedureHow to Mark IP Addresses as Unusable (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the IP address's network.

  3. Select one or more IP addresses to mark as unusable.

    If you want to mark more than one address as unusable, press the Control key while you click with the mouse to select multiple addresses. You can also press the Shift key while you click to select a block of addresses.

  4. Choose Properties from the Edit menu.

    The Address Properties dialog box or the Modify Multiple Address dialog box opens.

  5. If you are modifying one address, select the Lease tab.

  6. Select Address is Unusable.

    If you are editing multiple addresses, select Mark All Addresses Unusable.

  7. Click OK.

ProcedureHow to Mark IP Addresses as Unusable (pntadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Mark IP addresses as unusable by typing a command of the following format:


    # pntadm -M ip-address -f UNUSABLE network-address
    

    For example, to mark address 10.64.3.3 as unusable, type:

    pntadm -M 10.64.3.3 -f UNUSABLE 10.64.3.0

Deleting IP Addresses From the DHCP Service

You should delete IP addresses from the DHCP network tables if you no longer want the address to be managed by DHCP. You can use the pntadm -D command or DHCP Manager's Delete Address dialog box.

The following figure shows the Delete Address dialog box.

Figure 15–12 Delete Address Dialog Box in DHCP Manager

Dialog box shows list of IP addresses to delete and a
check box labeled Delete from hosts table. Shows OK, Cancel, and Help buttons.

ProcedureHow to Delete IP Addresses From DHCP Service (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the IP address's network.

  3. Select one or more IP addresses to delete.

    If you want to delete more than one address, press the Control key while you click with the mouse to select multiple addresses. You can also press the Shift key while you click to select a block of addresses.

  4. Choose Delete from the Edit menu.

    The Delete Address dialog box lists the address that you selected so that you can confirm the deletion.

  5. If you want to delete the host names from the hosts table, select Delete From Hosts Table.

    If the host names were generated by DHCP Manager, you might want to delete the names from the hosts table.

  6. Click OK.

ProcedureHow to Delete IP Addresses From the DHCP Service (pntadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Delete IP addresses by typing a command of the following format:


    # pntadm -D ip-address options network-address
    

    If you include the -y option, the host name is deleted from the name service that maintains the host name.

    For example, to delete address 10.64.3.3 from network 10.64.3.0, and delete the corresponding host name, type:

    pntadm -D 10.64.3.3 -y 10.64.3.0

Assigning a Reserved IP Address to a DHCP Client

The Oracle Solaris DHCP service attempts to provide the same IP address to a client that has previously obtained an address through DHCP. However, sometimes an address has already been reassigned to another client.

Routers, NIS or NIS+ servers, DNS servers, and other hosts that are critical to the network should not be DHCP clients. Hosts that provide services to the network should not rely on the network to obtain their IP addresses. Clients such as print servers or file servers should have consistent IP addresses as well. These clients can receive their network configurations and also be assigned a consistent IP address from the DHCP server.

You can set up the DHCP server to supply the same IP address to a client each time the client requests its configuration. You reserve the IP address for the client by manually assigning the client's ID to the address that you want the client to use. You can set up the reserved address to use either a dynamic lease or a permanent lease. If the client's address uses a dynamic lease, you can easily track the use of the address. A diskless client is an example of a client that should use a reserved address with a dynamic lease. If the client's address uses a permanent lease, you cannot track address use. Once a client obtains a permanent lease, the client does not contact the server again. The client can obtain updated configuration information only by releasing the IP address and restarting the DHCP lease negotiation.

You can use the pntadm -M command or DHCP Manager's Address Properties dialog box to set up lease properties.

The following figure shows the Lease tab of the Address Properties dialog box, which is used to modify the lease.

Figure 15–13 Address Properties Lease Tab in DHCP Manager

Dialog box shows Lease tab, which includes Client ID
field, Reserved check box, and settings for Lease Policy, BOOTP clients, and
Address is unusable.

ProcedureHow to Assign a Consistent IP Address to a DHCP Client (DHCP Manager)

  1. In DHCP Manager, select the Addresses tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the appropriate network.

  3. Double-click the IP address that you want to the client to use.

    The Address Properties window opens.

  4. Select the Lease tab.

  5. In the Client ID field, type the client ID.

    The client ID is derived from the client's hardware address. See the Client ID entry in Table 15–4 for more information.

  6. Select the Reserved option to prevent the IP address from being reclaimed by the server.

  7. In the Lease Policy area of the window, select Dynamic or Permanent assignment.

    Select Dynamic if you want the client to negotiate to renew leases, which enables you to track when the address is used. Because you selected Reserved, the address cannot be reclaimed even when a dynamic lease is assigned. You do not need to specify an expiration date for this lease. The DHCP server calculates the expiration date by using the lease time.

    If you select Permanent, you cannot track the use of the IP address unless you enable transaction logging.

  8. Click OK.

ProcedureHow to Assign a Consistent IP Address to a DHCP Client (pntadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Set the lease flags by typing a command of the following format:


    # pntadm -M ip-address -i client-id -f MANUAL+BOOTP network-address
    

    For example, to enable the Oracle Solaris DHCP client whose MAC address is 08:00:20:94:12:1E to always receive IP address 10.21.5.12, you would type:

    pntadm -M 10.21.5.12 -i 0108002094121E -f MANUAL+BOOTP 10.21.0.0


    Tip –

    Refer to the Client ID entry in Table 15–4 for more information about how to determine client identifiers.


Working With DHCP Macros (Task Map)

DHCP macros are containers of DHCP options. The Oracle Solaris DHCP service uses macros to gather options that should be passed to clients. DHCP Manager and the dhcpconfig utility create a number of macros automatically when you configure the server. See About DHCP Macros for background information about macros. See Chapter 14, Configuring the DHCP Service (Tasks) for information about macros created by default.

You might find that when changes occur on your network, you need to make changes to the configuration information that is passed to clients. To change configuration information, you need to work with DHCP macros. You can view, create, modify, duplicate, and delete DHCP macros.

When you work with macros, you must know about DHCP standard options, which are described in the dhcp_inittab(4) man page.

The following task map lists tasks to help you view, create, modify, and delete DHCP macros. The map also includes links to sections that detail how to accomplish each task.

Task 

Description 

For Instructions 

View DHCP macros. 

Display a list of all the macros that are defined on the DHCP server. 

How to View Macros Defined on a DHCP Server (DHCP Manager)

How to View Macros Defined on a DHCP Server (dhtadm)

Create DHCP macros. 

Create new macros to support DHCP clients. 

How to Create a DHCP Macro (DHCP Manager)

How to Create a DHCP Macro (dhtadm)

Modify values that are passed in macros to DHCP clients. 

Change macros by modifying existing options, adding options to macros, or removing options from macros. 

How to Change Values for Options in a DHCP Macro (DHCP Manager)

How to Change Values for Options in a DHCP Macro (dhtadm)

How to Add Options to a DHCP Macro (DHCP Manager)

How to Add Options to a DHCP Macro (dhtadm)

How to Delete Options From a DHCP Macro (DHCP Manager)

How to Delete Options From a DHCP Macro (dhtadm)

Delete DHCP macros. 

Remove DHCP macros that are no longer used. 

How to Delete a DHCP Macro (DHCP Manager)

How to Delete a DHCP Macro (dhtadm)

The following figure shows the Macros tab in the DHCP Manager window.

Figure 15–14 DHCP Manager's Macros Tab

Macros tab shows list of macros with one macro selected.
Option names and values contained in macro are shown. Find field and Next
button are shown.

ProcedureHow to View Macros Defined on a DHCP Server (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

    The Macros area on the left side of the window displays, in alphabetical order, all the macros defined on the DHCP server. Macros preceded by a folder icon include references to other macros, whereas macros preceded by a document icon do not reference other macros.

  2. To open a macro folder, click the handle icon to the left of the folder icon.

    The macros that are included in the selected macro are listed.

  3. To view the content of a macro, click the macro name.

    Options and their assigned values are displayed.

ProcedureHow to View Macros Defined on a DHCP Server (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Display the macros by typing the following command:


    # dhtadm -P
    

    This command prints to standard output the formatted contents of the dhcptab table, including all macros and symbols defined on the DHCP server.

Modifying DHCP Macros

You might need to modify macros when some aspect of your network changes and one or more DHCP clients need to know about the change. For example, you might add a router or an NIS server, create a new subnet, or change the lease policy.

Before you modify a macro, determine the name of the DHCP option you want to change, add, or delete. The standard DHCP options are listed in the DHCP Manager help and in the dhcp_inittab(4) man page.

You can use the dhtadm -M -m command or DHCP Manager to modify macros. See the dhtadm(1M) man page for more information about dhtadm.

The following figure shows DHCP Manager's Macro Properties dialog box.

Figure 15–15 Macro Properties Dialog Box in DHCP Manager

Dialog box shows list of options and their values. Shows
Select, Add, Modify, up and down, and Delete buttons. Shows check box to notify
server.

ProcedureHow to Change Values for Options in a DHCP Macro (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the macro that you want to change.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box opens.

  4. In the table of Options, select the option that you want to change.

    The option's name and its value are displayed in the Option Name and Option Value fields.

  5. In the Option Value field, select the old value and type the new value for the option.

  6. Click Modify.

    The new value is displayed in the options table.

  7. Select Notify DHCP Server of Change.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  8. Click OK.

ProcedureHow to Change Values for Options in a DHCP Macro (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Change option values by typing a command of the following format:


    # dhtadm -M -m macroname -e 'option=value:option=value' -g
    

    For example, to change the lease time and the Universal Time Offset in the macro bluenote, you would type:

    # dhtadm -M -m bluenote -e 'LeaseTim=43200:UTCOffst=28800' -g

ProcedureHow to Add Options to a DHCP Macro (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the macro that you want to change.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box opens.

  4. In the Option Name field, specify the name of an option by using one of the following methods:

    • Click the Select button next to the Option Name field to select an option to add to the macro.

      The Select Option dialog box displays an alphabetized list of names of standard category options and descriptions. If you want to add an option that is not in the standard category, use the Category list to select a category.

      See About DHCP Macros for more information about macro categories.

    • Type Include if you want to include a reference to an existing macro in the new macro.

  5. Type the value for the option in the Option Value field.

    If you typed Include as the option name, you must specify the name of an existing macro in the Option Value field.

  6. Click Add.

    The option is added to the bottom of the list of options in this macro. To change the option's position in the macro, select the option and click the arrow buttons to move the option up or down in the list.

  7. Select Notify DHCP Server of Change.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  8. Click OK.

ProcedureHow to Add Options to a DHCP Macro (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Add options to a macro by typing a command of the following format:


    # dhtadm -M -m macroname -e 'option=value' -g
    

    For example, to add the ability to negotiate leases in the macro bluenote, you would type the following command:

    # dhtadm -M -m bluenote -e 'LeaseNeg=_NULL_VALUE' -g

    Note that if an option does not require a value, you must use _NULL_VALUE as the value for the option.

ProcedureHow to Delete Options From a DHCP Macro (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the macro that you want to change.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box opens.

  4. Select the option that you want to remove from the macro.

  5. Click Delete.

    The option is removed from the list of options for this macro.

  6. Select Notify DHCP Server of Change.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  7. Click OK.

ProcedureHow to Delete Options From a DHCP Macro (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Delete an option from a macro by typing a command of the following format:


    # dhtadm -M -m macroname -e 'option=' -g
    

    For example, to remove the ability to negotiate leases in the macro bluenote, you would type the following command:

    # dhtadm -M -m bluenote -e 'LeaseNeg=' -g

    If an option is specified with no value, the option is removed from the macro.

Creating DHCP Macros

You might want to add new macros to your DHCP service to support clients with specific needs. You can use the dhtadm -A -m command or DHCP Manager's Create Macro dialog box to add macros. See the dhtadm(1M) man page for more information about the dhtadm command.

The following figure shows DHCP Manager's Create Macro dialog box.

Figure 15–16 Create Macro Dialog Box in DHCP Manager

Dialog box shows Name, Option Name, and Option Value
fields. Shows Select button, empty list of options, and check box to notify
the DHCP server.

ProcedureHow to Create a DHCP Macro (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Create from the Edit menu.

    The Create Macro dialog box opens.

  3. Type a unique name for the macro.

    The name can be up to 128 alphanumeric characters. If you use a name that matches a vendor class identifier, network address, or client ID, the macro is processed automatically for appropriate clients. If you use a different name, the macro is not processed automatically. The macro must be assigned to a specific IP address or included in another macro that is processed automatically. See Macro Processing by the DHCP Server for more detailed information.

  4. Click the Select button, which is next to the Option Name field.

    The Select Option dialog box displays an alphabetized list of names of standard category options and their descriptions. If you want to add an option that is not in the standard category, use the Category list. Select the category that you want from the Category list. See About DHCP Options for more information about option categories.

  5. Select the option to add to the macro, and click OK.

    The Macro Properties dialog box displays the selected option in the Option Name field.

  6. Type the value for the option in the Option Value field, and click Add.

    The option is added to the bottom of the list of options in this macro. To change the option's position in the macro, select the option and click the arrow buttons to move the option up or down in the list.

  7. Repeat Step 5 and Step 6 for each option you want to add to the macro.

  8. Select Notify DHCP Server of Change when you are finished adding options.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  9. Click OK.

ProcedureHow to Create a DHCP Macro (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Create a macro by typing a command of the following format:


    # dhtadm -A -m macroname -d ':option=value:option=value:option=value:' -g
    

    There is no limit to the number of option=value pairs that can be included in the argument to -d. The argument must begin and end with colons, with colons between each option=value pair. The complete string must be enclosed in quotation marks.

    For example, to create the macro bluenote, type the following command:

    # dhtadm -A -m bluenote -d ':Router=10.63.6.121\
    :LeaseNeg=_NULL_VALUE:DNSserv=10.63.28.12:' -g
    

    Note that if an option does not require a value, you must use _NULL_VALUE as the value for the option.

Deleting DHCP Macros

You might want to delete a macro from the DHCP service. For example, if you delete a network from the DHCP service, you can also delete the associated network macro.

You can use the dhtadm -D -m command or DHCP Manager to delete macros.

ProcedureHow to Delete a DHCP Macro (DHCP Manager)

  1. In DHCP Manager, select the Macros tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the macro to delete.

    The Delete Macro dialog box prompts you to confirm that you want to delete the specified macro.

  3. Select Notify DHCP Server of Change.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  4. Click OK.

ProcedureHow to Delete a DHCP Macro (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Delete a macro by typing a command of the following format:


    # dhtadm -D -m macroname -g
    

    For example, to delete the macro bluenote, you would type the following command:

    # dhtadm -D -m bluenote -g

Working With DHCP Options (Task Map)

Options are keywords for network configuration parameters that the DHCP server can pass to clients. In the Oracle Solaris DHCP service, you cannot create, delete, or modify the standard DHCP options. The standard options are defined by the DHCP protocol, so the options cannot change. You can only perform tasks on options that you create for your site. For this reason, when you first set up your DHCP service, the Options tab in DHCP Manager is empty until you create options for your site.

If you create options on the DHCP server, you must also add information about the options on the DHCP client. For the Oracle Solaris DHCP client, you must edit the /etc/dhcp/inittab file to add entries for the new options. See the dhcp_inittab(4) man page for more information about this file.

If you have DHCP clients that are not Oracle Solaris clients, refer to the documentation for those clients for information about adding options or symbols. See About DHCP Options for more information about options in Oracle Solaris DHCP.

You can use either DHCP Manager or the dhtadm command to create, modify, or delete options.


Tip –

Options are called symbols in the DHCP literature. The dhtadm command and its related man page also refer to options as symbols.


The following task map lists tasks that you must perform to create, modify, and delete DHCP options. The task map contains links to procedures for the tasks.

Task 

Description 

For Instructions 

Create DHCP options. 

Add new options for information not covered by a standard DHCP option. 

How to Create DHCP Options (DHCP Manager)

How to Create DHCP Options (dhtadm)

Modifying the Oracle Solaris DHCP Client's Option Information

Modify DHCP options. 

Change properties of DHCP options you have created. 

How to Modify DHCP Option Properties (DHCP Manager)

How to Modify DHCP Option Properties (dhtadm)

Delete DHCP options. 

Remove DHCP options that you have created. 

How to Delete DHCP Options (DHCP Manager)

How to Delete DHCP Options (dhtadm)

Before you create DHCP options, you should be familiar with the option properties listed in the following table.

Table 15–5 DHCP Option Properties

Option Property 

Description 

Category 

The category of an option must be one of the following:

  • Vendor – Options specific to a client's vendor platform, either hardware or software.

  • Site – Options specific to your site.

  • Extend – Newer options that have been added to the DHCP protocol, but not yet implemented as standard options in Oracle Solaris DHCP.

Code 

The code is a unique number that you assign to an option. The same code cannot be used for any other option within its option category. The code must be appropriate for the option category:

  • Vendor – Code values of 1–254 for each vendor class

  • Site – Code values of 128–254

  • Extend – Code values of 77–127

Data type 

The data type specifies what kind of data can be assigned as a value for the option. The valid data types are described in the following list.

  • ASCII – Text string value.

  • BOOLEAN – No value is associated with the Boolean data type. The presence of the option indicates that a condition is true, while the absence of the option indicates that a condition is false. For example, the Hostname option is Boolean. The presence of Hostname in a macro causes the DHCP server to look up the host name associated with the assigned address.

  • IP – One or more IP addresses, in dotted decimal format (xxx.xxx.xxx.xxx).

  • OCTET – Uninterpreted ASCII representation of binary data. For example, a client ID uses the octet data type. Valid characters are 0–9, A–F, and a–f. Two ASCII characters are needed to represent an 8-bit quantity.

  • UNUMBER8, UNUMBER16, UNUMBER32, UNUMBER64, SNUMBER8, SNUMBER16, SNUMBER32, or SNUMBER64 – Numeric value. An initial U or S indicates whether the number is unsigned or signed. The digits at the end indicate how many bits are in the number.

Granularity 

The granularity specifies how many “instances” of the data type are needed to represent a complete option value. For example, a data type of IP and a granularity of 2 would mean that the option value must contain two IP addresses.

Maximum 

The maximum number of values that can be specified for the option. For example, suppose the maximum is 2, the granularity is 2, and the data type is IP. In this case, the option value could contain a maximum of two pairs of IP addresses. 

Vendor client classes 

This option is available only when the option category is Vendor. Vendor client classes identify the client classes with which the Vendor option is associated. The class is an ASCII string that represents the client machine type or operating system. For example, the class string for some models of Sun workstations is SUNW.Sun-Blade-100. This type of option enables you to define configuration parameters that are passed to all clients of the same class, and only clients of that class.

You can specify multiple client classes. Only those DHCP clients with a client class value that matches a class that you specify receive the options scoped by that class. 

The client class is determined by the vendor of the DHCP client. For DHCP clients that are not Oracle Solaris clients, refer to the vendor documentation for the DHCP client for the client class. 

For Oracle Solaris clients, the Vendor client class can be obtained by typing the uname -i command on the client. To specify the Vendor client class, substitute periods for any commas in the string returned by the uname command. For example, if the string SUNW,Sun-Blade-100 is returned by the uname -i command, you should specify the Vendor client class as SUNW.Sun-Blade-100.

Creating DHCP Options

If you need to pass client information for which there is not already an existing option in the DHCP protocol, you can create an option. See the dhcp_inittab(4) man page for a list of all the options that are defined in Oracle Solaris DHCP before you create your own option.

You can use the dhtadm -A -s command or DHCP Manager's Create Option dialog box to create new options.

The following figure shows DHCP Manager's Create Option dialog box.

Figure 15–17 Create Option Dialog Box in DHCP Manager

Dialog box shows fields that define properties of a new
option. Shows Vendor Client Classes area and Notify DHCP server check box.

ProcedureHow to Create DHCP Options (DHCP Manager)

  1. In DHCP Manager, select the Options tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Create from the Edit menu.

    The Create Options dialog box opens.

  3. Type a short descriptive name for the new option.

    The name can contain up to 128 alphanumeric characters and spaces.

  4. Type or select values for each setting in the dialog box.

    Refer to Table 15–5 for information about each setting, or view the DHCP Manager help.

  5. Select Notify DHCP Server of Change if you are finished creating options.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  6. Click OK.

    You can now add the option to macros, and assign a value to the option to pass to clients.

ProcedureHow to Create DHCP Options (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Create a DHCP option by typing a command using the following format:


    # dhtadm -A -s option-name -d 'category,code,data-type,granularity,maximum' -g
    
    option-name

    Is an alphanumeric string of 128 characters of less.

    category

    Is one of the following: Site, Extend, or Vendor=list-of-classes. list-of-classes is a space-separated list of vendor client classes to which the option applies. See Table 15–5 for information about how to determine the vendor client class.

    code

    Is a numeric value that is appropriate to the option category, as explained in Table 15–5.

    data-type

    Is specified by a keyword that indicates the type of data that is passed with the option, as explained in Table 15–5.

    granularity

    Is specified as a nonnegative number, as explained in Table 15–5.

    maximum

    Is a nonnegative number, as explained in Table 15–5.


Example 15–3 Creating a DHCP Option With dhtadm

The following command would create an option called NewOpt, which is a Site category option. The option's code is 130. The option's value can be set to a single 8-bit unsigned integer.

# dhtadm -A -s NewOpt -d 'Site,130,UNUMBER8,1,1' -g

The following command would create an option called NewServ, which is a Vendor category option that applies to clients whose machine type is SUNW,Sun-Blade-100 or SUNW,Sun-Blade-1000. The option's code is 200. The option's value can be set to one IP address.

# dhtadm -A -s NewServ -d 'Vendor=SUNW.Sun-Blade-100 \ 
SUNW.Sun-Blade-1000,200,IP,1,1' -g

Modifying DHCP Options

If you have created options for your DHCP service, you can change the properties for these options. You can use the dhtadm -M -s command or DHCP Manager's Option Properties dialog box to modify options.

Note that you should modify the Oracle Solaris DHCP client's option information to reflect the same modification that you make to the DHCP service. See Modifying the Oracle Solaris DHCP Client's Option Information.

The following figure shows DHCP Manager's Option Properties dialog box.

Figure 15–18 Option Properties Dialog Box in DHCP Manager

Dialog box shows current properties of selected option.
Shows Vendor Client Classes and Notify DHCP server check box.

ProcedureHow to Modify DHCP Option Properties (DHCP Manager)

  1. In DHCP Manager, select the Options tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the option that you want to modify.

  3. Choose Properties from the Edit menu.

    The Option Properties dialog box opens.

  4. Edit the properties as needed.

    See Table 15–5 for information about the properties, or view the DHCP Manager help.

  5. Select Notify DHCP Server of Change when you are finished with options.

    The change is made to the dhcptab table. The DHCP server is signaled to reread the dhcptab table to put the changes into effect.

  6. Click OK.

ProcedureHow to Modify DHCP Option Properties (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Modify an option by typing a command using the following format:


    # dhtadm -M -s option-name -d 'category,code,data-type,granularity,maximum' -g
    
    option-name

    Specifies the name of the option that you want to change.

    category

    Can be Site, Extend, or Vendor=list-of-classes. list-of-classes is a space-separated list of vendor client classes to which the option applies. For example, SUNW.Sun-Blade-100 SUNW.Ultra-80 SUNWi86pc.

    code

    Specifies a numeric value that is appropriate to the option category, as explained in Table 15–5.

    data-type

    Specifies a keyword that indicates the type of data that is passed with the option, as explained in Table 15–5.

    granularity

    Is a nonnegative number, as explained in Table 15–5.

    maximum

    Is a nonnegative number, as explained in as explained in Table 15–5.

    Note that you must specify all of the DHCP option properties with the -d switch, not just the properties that you want to change.


Example 15–4 Modifying a DHCP Option With dhtadm

The following command would modify an option called NewOpt. The option is a Site category option. The option's code is 135. The option's value can be set to a single 8-bit unsigned integer.

# dhtadm -M -s NewOpt -d 'Site,135,UNUMBER8,1,1'

The following command would modify an option called NewServ, which is a Vendor category option. The option now applies to clients whose machine type is SUNW,Sun-Blade-100 or SUNW,i86pc. The option's code is 200. The option's value can be set to one IP address.

# dhtadm -M -s NewServ -d 'Vendor=SUNW.Sun-Blade-100 \
SUNW.i86pc,200,IP,1,1' -g

Deleting DHCP Options

You cannot delete standard DHCP options. However, if you have defined options for your DHCP service, you can delete these options by using DHCP Manager or the dhtadm command.

ProcedureHow to Delete DHCP Options (DHCP Manager)

  1. In DHCP Manager, select the Options tab.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Select the option that you want to delete.

  3. Choose Delete from the Edit menu.

    The Delete Option dialog box opens.

  4. Select Notify DHCP Server of Change if you are finished deleting options.

    This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.

  5. Click OK.

ProcedureHow to Delete DHCP Options (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Delete a DHCP option by typing a command using the following format:


    # dhtadm -D -s option-name -g
    

Modifying the Oracle Solaris DHCP Client's Option Information

If you add a new DHCP option to your DHCP server, you must add a complementary entry to each DHCP client's option information. If you have a DHCP client that is not a Oracle Solaris DHCP client, refer to that client's documentation for information about adding options or symbols.

On an Oracle Solaris DHCP client, you must edit the /etc/dhcp/inittab file and add an entry for each option that you add to the DHCP server. If you later modify the option on the server, you must also modify the entry in the client's /etc/dhcp/inittab file.

Refer to the dhcp_inittab(4) man page for detailed information about the syntax of the /etc/dhcp/inittab file.


Note –

If you added DHCP options to the dhcptags file in a previous Oracle Solaris release, you must add the options to the /etc/dhcp/inittab file. See DHCP Option Information for more information.


Supporting Oracle Solaris Network Installation With the DHCP Service

You can use DHCP to install Oracle Solaris on certain client systems on your network. Only sun4u-based systems and x86 systems that meet the hardware requirements for running Oracle Solaris can use this feature. For information about using DHCP to automatically configure client systems for the network as they boot, see Chapter 2, Preconfiguring System Configuration Information (Tasks), in Oracle Solaris 10 9/10 Installation Guide: Network-Based Installations.

DHCP also supports Oracle Solaris client systems that boot and install remotely from servers across a wide area network (WAN) using HTTP. This method of remote booting and installing is called the WAN boot installation method. Using WAN boot, you can install Oracle Solaris on SPARC based systems over a large public network where the network infrastructure might be untrustworthy. You can use WAN boot with security features to protect data confidentiality and installation image integrity.

Before you can use DHCP for booting and installing client systems remotely using WAN boot, the DHCP server must be configured to supply the following information to clients:

For details about configuring the DHCP server to provide this information, see Chapter 2, Preconfiguring System Configuration Information (Tasks), in Oracle Solaris 10 9/10 Installation Guide: Network-Based Installations. For information about booting and installing client systems with a DHCP server across a WAN, see Chapter 10, WAN Boot (Overview), in Oracle Solaris 10 9/10 Installation Guide: Network-Based Installations.

For information about supporting diskless clients, see Supporting Remote Boot and Diskless Boot Clients (Task Map).

Supporting Remote Boot and Diskless Boot Clients (Task Map)

The Oracle Solaris DHCP service can support Oracle Solaris client systems that mount their operating system files remotely from another machine (the OS server). Such clients are often called diskless clients. Diskless clients can be thought of as persistent remote boot clients. Each time a diskless client boots, the client must obtain the name and IP address of the server that hosts the client's operating system files. The diskless client can then boot remotely from those files.

Each diskless client has its own root partition on the OS server, which is shared to the client host name. The DHCP server must always return the same IP address to a diskless client. That address must remain mapped to the same host name in the name service, such as DNS. When a diskless client receives a consistent IP address, the client uses a consistent host name, and can access its root partition on the OS server.

In addition to providing the IP address and host name, the DHCP server can supply the location of the diskless client's operating system files. However, you must create options and macros to pass the information in a DHCP message packet.

The following task map lists the tasks required to support diskless clients or any other persistent remote boot clients. The task map also provides links to procedures to help you carry out the tasks.

Task 

Description 

For Instructions 

Set up OS services on an Oracle Solaris server. 

Use the smosservice command to create operating system files for clients.

Chapter 7, Managing Diskless Clients (Tasks), in System Administration Guide: Basic Administration

Also, see the smosservice(1M) man page.

Set up the DHCP service to support network boot clients. 

Use DHCP Manager or the dhtadm command to create new Vendor options and macros, which the DHCP server can use to pass booting information to the clients.

If you already created the options for network install clients, you need only to create macros for the Vendor client types of the diskless clients. 

Chapter 2, Preconfiguring System Configuration Information (Tasks), in Oracle Solaris 10 9/10 Installation Guide: Network-Based Installations

Assign reserved IP addresses to the diskless clients. 

Use DHCP Manager to mark address as reserved, or use the pntadm command to mark addresses as MANUAL for diskless clients.

Assigning a Reserved IP Address to a DHCP Client

Set up diskless clients for OS service. 

Use the smdiskless command to add operating system support on the OS server for each client. Specify the IP addresses that you reserved for each client.

Chapter 7, Managing Diskless Clients (Tasks), in System Administration Guide: Basic Administration

Also, see the smdiskless(1M) man page.

Setting Up DHCP Clients to Receive Information Only (Task Map)

In some networks, you might want the DHCP service to provide only configuration information to clients. Client systems that need information, not leases, can use the DHCP client to issue an INFORM message. The INFORM message asks the DHCP server to send the appropriate configuration information to the client.

You can set up the Oracle Solaris DHCP server to support clients that need information only. You need to create an empty network table that corresponds to the network that is hosting the clients. The table must exist so that the DHCP server can respond to clients from that network.

The following task map lists the tasks required to support information-only clients. The task map also includes links to procedures to help you carry out the tasks.

Task 

Description 

For Instructions 

Create an empty network table. 

Use DHCP Manager or the pntadm command to create a network table for the information-only clients' network.

Adding DHCP Networks

Create macros to contain information that is needed by clients. 

Use DHCP Manager or the dhtadm command to create macros to pass the required information to clients.

Creating DHCP Macros

Have the DHCP client issue an INFORM message.

Use the ifconfig int dhcp inform command to make the DHCP client issue an INFORM message.

DHCP Client Startup

ifconfig Command Options Used With the DHCP Client

ifconfig(1M)man page

Converting to a New DHCP Data Store

Oracle Solaris DHCP provides a utility to convert the DHCP configuration data from one data store to another data store. Several reasons might exist for converting to a new data store. For example, you might have more DHCP clients, requiring higher performance or higher capacity from the DHCP service. You also might want to share the DHCP server duties among multiple servers. See Choosing the DHCP Data Store for a comparison of the relative benefits and drawbacks of each type of data store.


Note –

If you upgraded from an Oracle Solaris release that is older than the Solaris 8 7/01 release, you should read this note.

When you run any Oracle Solaris DHCP tool after Oracle Solaris installation, you are prompted to convert to the new data store. The conversion is required because the format of the data stored in both files and NIS+ changed in the Solaris 8 7/01 release. If you do not convert to the new data store, the DHCP server continues to read the old data tables. However, the server can only extend leases for existing clients. You cannot register new DHCP clients or use DHCP management tools with the old data tables.


The conversion utility is also useful for sites that are converting from a Sun provided data store to a third-party data store. The conversion utility looks up entries in the existing data store and adds new entries that contain the same data to the new data store. Data store access is implemented in separate modules for each data store. This modular approach enables the conversion utility to convert DHCP data from any data store format to any other data store format. Each data store must have a module that the DHCP service can use. See Solaris DHCP Service Developer’s Guide for more information about how to write a module to support a third-party data store.

The data store conversion can be accomplished with DHCP Manager through the Data Store Conversion wizard, or with the dhcpconfig -C command.

The initial dialog box of the Data Store Conversion wizard is shown in the following figure.

Figure 15–19 Data Store Conversion Wizard Dialog Box in DHCP Manager

Dialog box lists steps to convert to a new data store.
Shows new data store options. Shows back and forward, Cancel, and Help buttons.

Before the conversion begins, you must specify whether to save the old data store's tables (dhcptab and network tables). The conversion utility then stops the DHCP server, converts the data store, and restarts the server when the conversion has completed successfully. If you did not specify to save the old tables, the utility deletes the tables after determining the conversion is successful. The process of converting can be time-consuming. The conversion runs in the background with a meter to inform you of its progress.

ProcedureHow to Convert the DHCP Data Store (DHCP Manager)

  1. In DHCP Manager, choose Convert Data Store from the Service menu.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

    The Data Store Conversion wizard opens.

  2. Answer the wizard's prompts.

    If you have trouble providing the requested information, click Help to view detailed information about each dialog box.

  3. Review your selections, and then click Finish to convert the data store.

    The DHCP server restarts when the conversion is complete. The server immediately uses the new data store.

ProcedureHow to Convert the DHCP Data Store (dhcpconfig -C)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Convert the data store by typing a command of the following format:


    # /usr/sbin/dhcpconfig -C -r resource -p path
    
    resource

    is the new data store type, such as SUNWbinfiles

    path

    is the path to the data, such as /var/dhcp

    Note that if you want to keep the original data in the old data store after the conversion, specify the -k option. For example, to convert your data store to SUNWbinfiles and save the old data store, you would type:


    # /usr/sbin/dhcpconfig -C -r SUNWbinfiles -p /var/dhcp -k

    See the dhcpconfig(1M) man page for more information about the dhcpconfig utility.

Moving Configuration Data Between DHCP Servers (Task Map)

DHCP Manager and the dhcpconfig utility enable you to move some or all the DHCP configuration data from one Oracle Solaris DHCP server to another server. You can move entire networks and all the IP addresses, macros, and options associated with the networks. Alternatively, you can select specific IP addresses, macros, and options to move. You can also copy macros and options without removing the macros and options from the first server.

You might want to move data if you are going to do any of the following tasks:

The following task map identifies the procedures that you must perform when you move DHCP configuration data. The map includes links to procedures to perform the tasks.

Task 

Description 

For Instructions 

1. Export the data from the first server. 

Select the data that you want to move to another server, and create a file of exported data. 

How to Export Data From a DHCP Server (DHCP Manager)

How to Export Data From a DHCP Server (dhcpconfig -X)

2. Import the data to the second server. 

Copy exported data to another DHCP server's data store. 

How to Import Data on a DHCP Server (DHCP Manager)

How to Import Data on a DHCP Server (dhcpconfig -I)

3. Modify the imported data for the new server environment. 

Change server-specific configuration data to match the new server's information. 

How to Modify Imported DHCP Data (DHCP Manager)

How to Modify Imported DHCP Data (pntadm, dhtadm)

In DHCP Manager, you use the Export Data wizard and the Import Data wizard to move the data from one server to the other server. You then modify macros in the Macros tab. The following figures show the initial dialog boxes for the wizards.

Figure 15–20 Export Data Wizard Dialog Box in DHCP Manager

Dialog box lists steps to export data to a file. Shows
two lists of networks, titled Do Not Export and Export. Shows arrow buttons
between the lists.

Figure 15–21 Import Data Wizard Dialog Box in DHCP Manager

Dialog box lists steps to import data from a file. Shows
Import File field and Overwrite existing data check box.

ProcedureHow to Export Data From a DHCP Server (DHCP Manager)

  1. Start DHCP Manager on the server from which you want to move or copy data.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Export Data from the Service menu.

    The Export Data wizard opens as shown in Figure 15–20.

  3. Answer the wizard's prompts.

    If you have difficulty, click Help for detailed information about the prompts.

  4. Move the export file to a file system that is accessible to the DHCP server that must import the data.

See Also

Import the data as described in How to Import Data on a DHCP Server (DHCP Manager).

ProcedureHow to Export Data From a DHCP Server (dhcpconfig -X)

  1. Log in to the server from which you want to move or copy data.

  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Export the data.

    You can export all of the DHCP data, or specific parts of the data.

    • To export specific addresses, macros, and options, type a command that uses the following format:


      # dhcpconfig -X filename -a network-addresses -m macros -o options
      

      filename is the full path name that you want to use to store the compressed exported data. You specify particular network addresses, DHCP macros, and DHCP options in comma-separated lists. The following example shows how to export specific networks, macros, and options.

      # dhcpconfig -X /var/dhcp/0dhcp1065_data \
      -a 10.63.0.0,10.62.0.0 \
      -m 10.63.0.0,10.62.0.0,SUNW.Sun-Blade-100 -o Sterm
      
    • To export all DHCP data, type a command that uses the ALL keyword.


      # dhcpconfig -X filename -a ALL -m ALL -o ALL
      

      filename is the full path name that you want to use to store the compressed exported data. The keyword ALL can be used with the command options to export all the network addresses, macros, or options. The following example shows how to use the ALL keyword.

      # dhcpconfig -X /var/dhcp/dhcp1065_data -a ALL -m ALL -o ALL
      

    Tip –

    You can omit the export of a particular kind of data by not specifying the dhcpconfig command option for that type of data. For example, if you do not specify the -m option, no DHCP macros are exported.


    See the dhcpconfig(1M) man page for more information about the dhcpconfig command.

  4. Move the export file to a location that is accessible to the server that must import the data.

See Also

Import the data as described in How to Import Data on a DHCP Server (dhcpconfig -I).

ProcedureHow to Import Data on a DHCP Server (DHCP Manager)

  1. Start DHCP Manager on the server to which you want to move data that you previously exported from a DHCP server.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Choose Import Data from the Service menu.

    The Import Data wizard opens, as shown in Figure 15–21.

  3. Answer the wizard's prompts.

    If you have difficulty, click Help for detailed information about the prompts.

  4. Modify the imported data, if necessary.

    See How to Modify Imported DHCP Data (DHCP Manager)

ProcedureHow to Import Data on a DHCP Server (dhcpconfig -I)

  1. Log in to the server to which you want to import the data.

  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Import the data by typing a command of the following format:


    # dhcpconfig -I filename
    

    filename is the name of the file that contains the exported data.

  4. Modify the imported data, if necessary.

    See How to Modify Imported DHCP Data (pntadm, dhtadm).

ProcedureHow to Modify Imported DHCP Data (DHCP Manager)

  1. Start DHCP Manager on the server to which you imported data.

    See How to Start and Stop DHCP Manager for information about DHCP Manager.

  2. Examine imported data for network-specific information that needs modification.

    For example, if you moved networks, you must open the Addresses tab and change the owning server of addresses in the imported networks. You might also need to open the Macros tab to specify the correct domain names for NIS, NIS+ or DNS in some macros.

  3. Open the Addresses, tab and select a network that you imported.

  4. To select all the addresses, click the first address, press and hold the Shift key, and click the last address.

  5. From the Edit menu, choose Properties.

    The Modify Multiple Addresses dialog box opens.

  6. At the Managing Server prompt, select the new server's name.

  7. At the Configuration Macro prompt, select the macro that should be used for all clients on this network, and then click OK.

  8. Open the Macros tab.

  9. Use the Find button to locate the options that are likely to need modified values.

    The Find button is located at the bottom of the window.

    DNSdmain, DNSserv, NISservs, NIS+serv, and NISdmain are examples of options that might need modification on the new server.

  10. Change the options in the appropriate macros.

    See How to Modify DHCP Option Properties (DHCP Manager) for the procedure for changing options.

ProcedureHow to Modify Imported DHCP Data (pntadm, dhtadm)

  1. Log in to the server to which you imported data.

  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Examine the network tables for data that needs to be modified.

    If you moved networks, use the pntadm -P network-address command to print out the network tables for the networks you moved.

  4. Modify IP address information by using the pntadm command.

    You might need to change the owning server and the configuration macro for imported addresses. For example, to change the owning server (10.60.3.4) and macro (dhcpsrv-1060) for address 10.63.0.2, you would use the following command:

    pntadm -M 10.63.0.2 -s 10.60.3.4 -m dhcpsrv-1060 10.60.0.0

    If you have a large number of addresses, you should create a script file that contains commands to modify each address. Execute the script with the pntadm -B command, which runs pntadm in batch mode. See the pntadm(1M) man page.

  5. Examine the dhcptab macros for options with values that need modification.

    Use the dhtadm -P command to print the entire dhcptab table to your screen. Use grep or some other tool to search for options or values that you might want to change.

  6. Modify options in macros, if necessary, by using the dhtadm -M command.

    For example, you might need to modify some macros to specify the correct domain names and servers for NIS, NIS+ or DNS. For example, the following command changes the values of DNSdmain and DNSserv in the macro mymacro:

    dhtadm -M -m mymacro -e 'DNSserv=dnssrv2:DNSdmain=example.net' -g