Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Administering DHCP (Task) Working With IP Addresses in the DHCP Service (Task Map) How to Mark Addresses Unusable (pntadm)  Previous   Contents   Next 
   
 

Deleting IP Addresses from DHCP Service

You should delete IP addresses from the DHCP service database 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 10-12 Delete Address Dialog Box

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

  1. Select the Addresses tab.

  2. Select the IP address's network.

  3. Select one or more IP addresses you want 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 you selected so 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.

How to Delete IP Addresses from DHCP Service (pntadm)

  1. Become superuser or a user assigned to the DHCP Management profile.

  2. Type a command of the following format:

    # pntadm -D ip-address

    If you include the -y option, the host name is deleted from the name service in which it is maintained.

Setting Up DHCP Clients for a Consistent IP Address

The Solaris DHCP service attempts to provide the same IP address to a client that has previously obtained an address through DHCP. However, it is not always possible when a dynamic lease is used.

Routers, NIS/NIS+, DNS servers, and other hosts critical to the network should not use DHCP because they should not rely on the network to obtain their IP addresses. Clients such as print or file servers should have consistent IP addresses as well, but can be set up to receive their network configurations through DHCP.

You can set up a client to receive the same IP address each time it requests its configuration if you reserve, or manually assign, the client's ID to the address you want it to use. You can set up the reserved address to use a dynamic lease to make it easy to track the use of the address, or a permanent lease if you do not need to track address use. However, you might not want to use permanent leases because once a client obtains a permanent lease, it does not contact the server again and cannot obtain updated configuration information unless it releases the IP address and restarts the DHCP lease negotiation. A diskless client is an example of a client that should use a reserved address with a dynamic lease.

You can use the pntadm -M command or DHCP Manager's Address Properties dialog box.

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

Figure 10-13 Address Properties Lease Tab

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

  1. Determine the client ID for the client you want to have a permanent IP address.

    See the entry for client ID in Table 10-2 for information about how to determine the client ID.

  2. Select the Addresses tab in DHCP Manager.

  3. Select the appropriate network.

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

    The Address Properties window opens.

  5. Select the Lease tab.

  6. In the Client ID field, type the client ID you determined from the client's hardware address.

    See the Client ID entry in Table 10-2 for more information.

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

  8. 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, and thus be able to track when the address is used. Because you selected Reserved, the address cannot be reclaimed even when it uses a dynamic lease. You do not need to enter an expiration date for this lease. The DHCP server calculates the expiration date based on the lease time.

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

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

  1. Become superuser or a user assigned to the DHCP Management profile.

  2. Type a command of the following format:

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

    Refer to the Client ID entry in Table 10-2 for more information about how to determine client identifiers.

Working With DHCP Macros (Task Map)

DHCP macros are containers of DHCP options. The Solaris DHCP service uses macros to gather together options that should be passed to clients. DHCP Manager and dhcpconfig create a number of macros automatically when you configure the server. See "About Macros" for background information about macros, and Chapter 9, Configuring DHCP Service (Task) 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 passed to clients. To do this, 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 man page.

The following task map lists tasks to help you view, create, modify, and delete DHCP macros.

Task

Description

Instructions

View DHCP macros.

Display a list of all the macros 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 passed in macros to DHCP clients.

Change macros by modifying existing options, adding options to macros, 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 10-14 DHCP Manager's Macros Tab

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

  1. Select the Macros tab.

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

  2. To open a macro folder, click the open/close widget to the left of the folder icon.

    The macros included in the selected macro are listed.

  3. To view the contents of a macro, click the macro name and look at the area on the right side of the window.

    Options and their assigned values are displayed.

 
 
 
  Previous   Contents   Next