Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Administering DHCP (Task) Working With DHCP Macros (Task Map) How to View Macros Defined on a DHCP Server (DHCP Manager)  Previous   Contents   Next 
   
 

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

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

  2. Type the following command:

    # dhtadm -P 

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

Modifying DHCP Macros

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

When you modify a macro, you must know the name of the DHCP option that corresponds to the parameter you want to change, add, or delete. The standard DHCP options are listed in the DHCP Manager help and in the dhcp_inittab man page.

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

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

Figure 10-15 Macro Properties Dialog Box

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

  1. Select the Macros tab.

  2. Select the macro 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 you want to change.

    The option's name and 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 to put the change into effect immediately after you click OK.

  8. Click OK.

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

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

  2. Type a command of the following format:

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

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

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

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

  1. Select the Macros tab.

  2. Select the macro 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:

    1. Click the Select button next to the Option Name field and select the option you want 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 the category you want.

      See "About Macros" for more information about macro categories.

    2. 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 displayed for this macro. If you want to change the option's position in the list, select the option and click the arrow keys next to the list to move the option up or down.

  7. Select Notify DHCP Server of Change.

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

  8. Click OK.

How to Add Options to a DHCP Macro (dhtadm)

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

  2. Type a command of the following format:

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

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

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

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

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

  1. Select the Macros tab.

  2. Select the macro you want to change.

  3. Choose Properties from the Edit menu.

    The Macro Properties dialog box opens.

  4. Select the option 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 to put the change into effect immediately after you click OK.

  7. Click OK.

 
 
 
  Previous   Contents   Next