When you configure DHCP service on your network, you configure and start the first DHCP server. Other servers can be added later, and may access the same data from a shared location if the data store supports shared data. This chapter includes procedures to enable you to configure the DHCP server and place networks and their associated IP addresses under DHCP management. It also explains how to unconfigure a server.
This chapter also provides instructions for procedures that use both DHCP Manager and the dhcpconfig utility in separate sections. This chapter contains the following information:
Configuring and Unconfiguring a DHCP Server Using DHCP Manager
Configuring and Unconfiguring a DHCP Server Using dhcpconfig Commands
This section includes procedures to help you configure and unconfigure a DHCP server with DHCP Manager. Note that you must be running an X Window system such as CDE to use DHCP Manager.
When you run DHCP Manager on a server not configured for DHCP, the following screen is displayed to allow you to specify whether you want to configure a DHCP server or a BOOTP relay agent.
When you configure a DHCP server, DHCP Manager starts the DHCP Configuration Wizard, which prompts you for information needed to configure the server. The initial screen of the wizard is shown in the following figure.
When you finish answering the wizard prompts, DHCP Manager creates the items listed in the following table.
Table 9–1 Items Created During DHCP Server Configuration
Select the system you want to use as a DHCP server.
Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).
Make decisions about your data store, lease policy, and router information.
Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).
Become superuser on the server system.
Type the following command:
#/usr/sadm/admin/bin/dhcpmgr & |
Choose the option Configure as DHCP Server.
This starts the DHCP Configuration Wizard, which helps you configure your server.
Select options or type requested information based on the decisions you made in the planning phase.
If you have difficulty, click Help in the wizard window to open your web browser and display help for the DHCP Configuration Wizard.
Click Finish to complete the server configuration when you have finished entering the requested information.
At the Start Address Wizard window, click Yes to configure addresses for the server.
The Address Wizard enables you to specify which addresses to place under the control of DHCP.
Answer the prompts based on decisions made in the planning phase.
See Making Decisions for IP Address Management (Task Map) for more information. If you have difficulty, click Help in the wizard window to open your web browser and display help for the Add Addresses Wizard.
Review your selections, and click Finish to add the addresses to the network table.
The network table is updated with records for each address in the range you specified.
You can add more networks to the DHCP server with the Network Wizard, as explained in Adding DHCP Networks.
When you configure a BOOTP relay agent, DHCP Manager takes the following actions:
Prompts you for IP addresses of the DHCP server to which requests should be relayed.
Edits /etc/inet/dhcpsvc.conf, to specify the options needed for BOOTP relay service.
The following figure shows the screen displayed when you choose to configure a BOOTP relay agent.
Select the system you want to use as a BOOTP relay agent.
Become superuser on the server system.
Type the following command:
#/usr/sadm/admin/bin/dhcpmgr & |
If the system has not been configured as a DHCP server or BOOTP relay agent, the DHCP Configuration Wizard starts. If the system has already been configured as a DHCP server, you cannot configure it as a BOOTP relay agent unless you unconfigure the server first. See Unconfiguring DHCP Servers and BOOTP Relay Agents.
Select Configure as BOOTP Relay.
The Configure BOOTP Relay dialog box opens.
Type the IP address or host name of one or more DHCP servers that are configured to handle BOOTP or DHCP requests received by this BOOTP relay agent, and click Add.
Click OK to exit the dialog box.
Notice that the DHCP Manager offers only the File menu to exit the application and the Service menu to manage the server. Other menu options are disabled because they are useful only on a DHCP server.
When you unconfigure a DHCP server or BOOTP relay agent, DHCP Manager takes the following actions:
Stops the DHCP daemon (in.dhpcd) process
Removes the /etc/inet/dhcpsvc.conf file, which records information about daemon startup and the data store location
The following figure shows the screen that is displayed when you choose to unconfigure a DHCP server.
When you unconfigure a DHCP server you must decide what to do with the dhcptab table and the DHCP network tables. If the data is shared among servers, you should not remove the dhcptab and DHCP network tables because this would render DHCP unusable across your network. Data can be shared through NIS+ or on exported local file systems. The file /etc/inet/dhcpsvc.conf records the data store used and its location.
You can unconfigure a DHCP server but leave the data intact by not selecting any of the options to remove data. If you unconfigure the server and leave the data intact, you disable the DHCP server.
If you want another DHCP server to take ownership of the IP addresses belonging to the server you are unconfiguring, you must move the DHCP data to the other DHCP server before you unconfigure the current server. See Moving Configuration Data Between DHCP Servers (Task Map) for more information.
If you are certain you want to remove the data, you can select an option
to remove the dhcptab and network tables. If you had generated
client names for the DHCP addresses, you can also elect to remove those entries
from the hosts table (whether in DNS, /etc/inet/hosts
,
or NIS+).
Before you unconfigure a BOOTP relay agent, be sure that no clients rely on this agent to forward requests to a DHCP server.
Type the following command:
#/usr/sadm/admin/bin/dhcpmgr & |
From the Service menu, choose Unconfigure.
The Unconfigure Service dialog box is displayed. If the server is a BOOTP relay agent, the dialog box enables you to confirm your intention to unconfigure the relay agent. If the server is a DHCP server, you must decide what to do with the DHCP data and make selections in the dialog box. See Figure 9–4.
(Optional) Select options to remove data.
If the server uses shared data (through NIS+ or files shared through NFS), do not select any options to remove the data. If the server does not use shared data, select one or both options to remove the data.
See DHCP Data on an Unconfigured Server for more information about removing data.
Click OK to confirm.
This section includes procedures to help you configure and unconfigure a DHCP server or BOOTP relay agent by using dhcpconfig with command-line options.
Select the system you want to use as a DHCP server.
Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).
Make decisions about your data store, lease policy, and router information.
Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).
Become superuser or a user assigned to the DHCP Management profile.
Type a command of the following format:
#/usr/sbin/dhcpconfig -D -r datastore -p location |
datastore is one of SUNWfiles, SUNWbinfiles, or SUNWnisplus.
location is the data-store-dependent location where you want to store the DHCP data. For SUNWfiles and SUNWbinfiles, this must be a UNIX absolute path name. For SUNWnisplus, this must be a fully specified NIS+ directory.
The dhcpconfig utility uses the server machine's system and network files to determine values used to configure the DHCP server. See the dhcpconfig man page for information about additional options to the dhcpconfig command that enable you to override the default values.
Add one or more networks to the DHCP service.
See How to Add a DHCP Network (dhcpconfig) for the procedure to add a network.
Select the system you want to use as a BOOTP relay agent.
Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).
Become superuser or a user assigned to the DHCP Management profile.
Type the following command:
# /usr/sbin/dhcpconfig -R addresses |
addresses are the comma-separated IP addresses of DHCP servers to which you want requests to be forwarded.
Become superuser or a user assigned to the DHCP Management profile.
Type the following on the system that acts as DHCP server or BOOTP relay agent:
# /usr/sbin/dhcpconfig -U |
If the server does not use shared data (through NIS+ or text files shared through NFS), you can also use the -x option to remove the dhcptab and network tables. If the server uses shared data, do not use the -x option. The -h option can be used to remove host names from the host table. See the dhcpconfig man page for more information about dhcpconfig options.
See DHCP Data on an Unconfigured Server for more information about removing data.
When you install the Solaris operating environment from CD-ROM, you are prompted to use DHCP to configure network interfaces. If you select yes, the DHCP client software is enabled on your system during Solaris installation. You do not need to do anything else on the Solaris client to use DHCP.
If a client system is already running the Solaris operating environment and not using DHCP, you must unconfigure the system and issue some commands to set up the system to use DHCP when it boots.
If your client is not a Solaris client, consult the client documentation for configuration instructions.
This procedure is necessary only if DHCP was not enabled during Solaris installation.
Become superuser on the client system.
If this system uses preconfiguration instead of interactive configuration, edit the sysidcfg file to add the dhcp subkey to the network_interface keyword.
For example, network_interface=le0 {dhcp}. See the sysidcfg(4) man page for more information.
Unconfigure and shut down the system by typing the following command:
# sys-unconfig |
See the sys-unconfig(1M) man page for more information about what configuration information is removed by this command.
Reboot the system after it has completely shut down.
You are prompted for system configuration information by sysidtool programs when the system reboots. See the sysidtool(1M) man page for more information.
When prompted to use DHCP to configure network interfaces, specify Yes.
If you preconfigured the system by using a sysidcfg file, insert the network_interface keyword, and specify dhcp as a dependent keyword. For example, network_interface=le0 {dhcp}.
If you use a sysidcfg file to preconfigure the client, remove the dhcp subkey from the network_interface keyword.
Unconfigure and shut down the system by typing the following command:
# sys-unconfig |
See the sys-unconfig(1M) man page for more information about which configuration information is removed by this command.
Reboot the system after it has completely shut down.
Because you unconfigured the system, you will be prompted for configuration information by sysidtool programs when the system reboots. See the sysidtool(1M) man page for more information.
When prompted to use DHCP to configure network interfaces, specify No.
If you use sysidcfg to specify configuration, you will not be prompted.