System Administration Guide: IP Services
Previous Next

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 task map lists tasks that you can perform when working with DHCP networks. 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.

How 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.

How 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:

  • A network table in the data store. The new network is shown in the network list within the Addresses tab of DHCP Manager.

  • A network macro that contains information needed by clients that reside on this network. The network macro's name matches the IP address of the network. The network macro is added to the dhcptab table in the data store.

How 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.

How 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.

How 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.

How 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.

How 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.

How 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.

Previous Next