DHCP Manager Help

 

Overview
  Solaris DHCP
About Macros
  Getting Help

Servers and Relays

Networks

Addresses

Macros

Options

How To..

Index

   

 

About Macros and Options

In a DHCP environment, macros are containers for option values that are passed as configuration parameters from the DHCP server to the DHCP client. For example, you might define a macro that contains options specifying a DNS server and print server to be used by all clients using IP addresses owned by a particular DHCP server.

Options specify the format in which option values are defined in the DHCP server's dhcptab (in which all DHCP options and macros are stored). For example, option category, data type, vendor, and granularity all determine the shape of the options contained in your macros. Creating and modifying options is described further in the help pages for Create Option and Modify Option.

Macro Processing

Remember the following points when naming DHCP macros and adding options to macros:

  1. Automatic processing occurs for Client Class, Network, and Client ID category macros when the macro category matches the client's class, network address, or client identifier.
  2. Macro categories determine the order in which macros are processed automatically.
  3. Macro names determine macro categories, with the exception of IP address macros, which are categorized by their assignment to an IP address.

    For most macros, make your macro names match the names of the resources or devices to which you want the macros to apply. For example:


    For Clients...

    Name Your Macro

    Of a particular client class

    Same name as the DHCP client's client class. The client class is determined by the client vendor. For example, the client class name for a Sun Blade TM 150 client is SUNW,Sun-Blade-100 so you must name your macro SUNW.Sun-Blade-100 . On Solaris DHCP client systems, you can determine the client class by typing the command uname -i on the client machine. Note that macro names cannot contain commas; if a comma appears in the client class, replace it with a period in the macro name.

    On a particular network

    Same as the IP address of the network through which the client is connecting; for example, name your macro 10.0.0.0.

    Using a particular IP Address

    Any name, but using the DHCP server's hostname or IP address is recommended; for example, name your macro shiva or 125.53.224.45 . This kind of macro is valuable for use as a configuration macro for all clients obtaining configuration information from this DHCP server.

    Identified by a particular client ID

    Same as the unique client identifier; for example, name your macro 010800201112B7 .


  4. Order is important. The order in which macros are processed is significant. If an option is contained in more than one macro, the option value passed to the client is the value assigned in the macro processed last. Macros are processed in the order shown in the illustration.

    order of macro processing

    As shown in the illustration, macro processing progresses from the general to the specific.

    • Client Class macros are processed first.

    • Network macros are processed second, superseding any competing settings in Client Class macros.

    • IP Address macros are processed third, superseding any competing settings in previous macros.

    • Client ID macros are processed last, superseding any competing settings in all previous macros.

  5. Macros can include other macros. Regardless of a macro's category, it can include other macros so that, for example, a client class macro could be called from an IP Address macro.

 


   return to top