In the Oracle Solaris DHCP service, a macro is a collection of network configuration options and the values that you assign to them. Macros are created to group options together to be passed to specific clients or types of clients. For example, a macro intended for all clients of a particular subnet might contain option/value pairs for subnet mask, router IP address, broadcast address, NIS+ domain, and lease time.
When the DHCP server processes a macro, it places the network options and values defined in the macro in a DHCP message to a client. The server processes some macros automatically for clients of a particular type.
For the server to process a macro automatically, the name of the macro must comply with one of the categories shown in the following table.
Table 12–3 DHCP Macro Categories for Automatic Processing
A macro with a name that does not use one of the categories listed in Table 12–3 can be processed only if one of the following is true:
The macro is mapped to an IP address.
The macro is included in another macro that is processed automatically.
The macro is included in another macro that is mapped to an IP address.
When you configure a server, a macro that is named to match the server's name is created by default. This server macro is not processed automatically for any client because it is not named with one of the name types that cause automatic processing. When you later create IP addresses on the server, the IP addresses are mapped to use the server macro by default.
When a DHCP client requests DHCP services, the DHCP server determines which macros match the client. The server processes the macros, using the macro categories to determine the order of processing. The most general category is processed first, and the most specific category is processed last. The macros are processed in the following order:
Client class macros – The most general category
Network address macros – More specific than Client class
Macros mapped to IP addresses – More specific than Network address
Client ID macros – The most specific category, pertaining to one client
A macro that is included in another macro is processed as part of the container macro.
If the same option is included in more than one macro, the value for that option in the macro with the most specific category is used because it is processed last. For example, if a Network address macro contains the lease time option with a value of 24 hours, and a Client ID macro contains the lease time option with a value of 8 hours, the client receives a lease time of 8 hours.
The sum total of the values assigned to all the options in a macro must not exceed 255 bytes, including the option codes and length information. This limit is dictated by the DHCP protocol.
The macros that are most likely to be impacted by this limit are macros that are used to pass paths to files on Oracle Solaris installation servers. Generally, you should pass the minimum amount of vendor information needed. You should use short path names in options that require path names. If you create symbolic links to long paths, you can pass the shorter link names.