System Administration Guide, Volume 3

Adding, Modifying, and Removing DHCP Networks

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.

This section describes:

The following task map lists tasks you need to perform when working with DHCP networks and the procedures used to carry them out.

Table 11-3 Working with DHCP Networks Task Map

Tasks... 

Description 

For Instructions, Go To 

Enable or disable DHCP service on server network interfaces 

The default behavior is to monitor all network interfaces for DHCP requests, but you can change this. 

"How to Set Up DHCP to Ignore a Network Interface"

"How to Set Up DHCP to Monitor a Network Interface"

Add a new network to the DHCP service 

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

"How to Add a DHCP Network (DHCP Manager)"

Change parameters of a DHCP-managed network 

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

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

"How to Modify a DHCP Network (Command Line)"

Delete a network from the DHCP service 

Remove 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 (Command Line)"

Monitoring and Ignoring Network Interfaces for DHCP Service

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 that will be monitored through the network interface.

However, DHCP Manager also allows you to specify which network interfaces the DHCP service should monitor and which it should ignore. 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 unless you add it to the list of monitored interfaces in DHCP Manager.

The dhcpconfig utility does not allow you to ignore a network interface.

This section includes procedures for ignoring a network interface and monitoring a new network interface using DHCP Manager's Modify Service Options dialog box, which is shown in the following figure.

Figure 11-4 Interfaces Tab of Modify Services Options Dialog Box

Graphic

How to Set Up DHCP to Ignore a Network Interface

  1. Choose Modify from the Service menu.

    The Modify Service Options dialog box is displayed.

  2. Select the Interfaces tab.

  3. In the Monitored Interfaces list, select the network interface that should not receive DHCP service.

  4. Click the right arrow button to move the network interface listing to the Ignored Interfaces list.

  5. Click OK.

How to Set Up DHCP to Monitor a Network Interface

  1. Choose Modify from the Service menu.

    The Modify Service Options dialog box is displayed.

  2. Select the Interfaces tab.

  3. In the Ignored Interfaces list, select the network interface that should receive DHCP service.

  4. Click the left arrow button to move the network interface listing to the Monitored Interfaces list.

  5. Click OK.

Adding DHCP Networks

The first network, usually the local one on the primary interface, is configured when you configure the server with the DHCP Configuration Wizard. This section describes the procedures for placing additional networks under DHCP management using DHCP Manager's Network Wizard.


Note -

For information about adding networks using command lines, see "Configuring Networks Using dhcpconfig".


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

Figure 11-5 DHCP Manager's Network Wizard

Graphic

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

Adding a new network with commands requires you to know the labels of the standard DHCP options, or tokens, used to pass information to the clients. See the dhcptab(4) manual page for information about the standard DHCP options.

How to Add a DHCP Network (DHCP Manager)

  1. Click the Addresses tab in DHCP Manager.

  2. Choose Network Wizard from the Edit menu.

  3. Select options or type requested information based on the decisions you made during the planning phase.

    Planning is described in "Planning for Remote Network Configuration".

    If you have difficulty with the wizard, click Help in the wizard window to open your web browser and display help for the DHCP Network Wizard.

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

    The Network Wizard creates a network macro whose name matches the IP address of the network. If you click the Macros tab and select the network macro, you can confirm that the information you provided in the wizard has been inserted as values for options contained in the macro.

    The Network Wizard creates an empty network table, which is listed in the left pane of the window. You must add addresses for the network before the network's IP addresses can be managed under DHCP.

Modifying DHCP Network Configuration

After you add a network to the DHCP service, you can modify the configuration information you originally supplied only by modifying the network macro used to pass information to the clients on the network.

The following figure shows the Macros tab of the DHCP Manager.

Figure 11-6 DHCP Manager's Macros Tab

Graphic

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

  1. Select the Macros tab.

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

  2. Select the network macro matching the network whose configuration you want to change.

    The network macro name is the network IP address.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box opens, displaying a table of the options included in the macro.

  4. Select the option you want to modify.

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

  5. Type the new value for the option and click Modify.

    You can also add options here by clicking Select in the dialog box. See "Modifying DHCP Macros" for more general information about modifying macros.

  6. Select Notify DHCP Server of Change and click OK.

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

How to Modify a DHCP Network (Command Line)

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

    The network macro's name should match the network IP address.

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

  2. 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'
    

    For example, to change the 172.25.62.0 macro's lease time to 57600 seconds and NIS domain to sem.west.com, type the following:


    # dhtadm -M -m 172.25.62.0 -e 'LeaseTim=57600'
    # dhtadm -M -m 172.25.62.0 -e 'NISdmain=sem.west.com'
    
  3. Type the following command as root to make the DHCP daemon reread dhcptab:


    # pkill -HUP in.dhcpd
    

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 11-7 Delete Networks Dialog Box

Graphic

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

How to Remove a DHCP Network (DHCP Manager)

  1. Select the Addresses tab.

  2. Choose Delete Networks from the Edit menu.

    The Delete Networks dialog box opens.

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

    Press the Control key while clicking with the mouse to select multiple networks, or press the Shift key while clicking 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 the DHCP-managed addresses on this network, select Delete Host Table Entries.

  6. Click OK.

How to Remove a DHCP Network (Command Line)

Note that this procedure deletes the addresses on the network before removing the network. This ensures that the hostnames are removed from the hosts file.

  1. Become superuser on the server system.

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


    # pntadm -D -yIP-address
    

    For example, to remove address 172.25.52.1, type the following:


    # pntadm -D -y 172.25.52.1
    

    The -y option specifies to delete the hostname.

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

    You might want to create a script to do this is you are deleting many addresses.

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


    # pntadm -R network-IP-address
    

    For example, to remove network 172.25.52.0, type the following:


    # pntadm -R 172.25.52.0