System Administration Guide, Volume 3

Macro Processing by the DHCP Server

When a macro is processed by the server, the network options and values defined in the macro are placed in a DHCP message to a client. Some macros are processed automatically by the server for clients of a particular type.

In order for a macro to be processed automatically, it must be named according to one of the categories shown in the following table.

Table 8-3 Macro Categories for Automatic Processing

Macro Category 

Description 

Client class 

The macro name matches a class of client, indicated by the client machine type and/or operating system. For example, if a server has a macro named SUNW.Ultra-1, any client that is a SUNW,Ultra-1 machine automatically receives the values in the SUNW.Ultra-1 macro.

Network address 

The macro name matches a DHCP-managed network IP address. For example, if a server has a macro named 125.53.224.0, any client connected to the 125.53.224.0 network automatically receives the values in the 125.53.224.0 macro.

Client ID 

The macro name matches some unique identifier for the client, usually derived from an Ethernet or MAC address. For example, if a server has a macro named 08002011DF32, the client having the client ID 08002011DF32 (derived from the Ethernet address 8:0:20:11:DF:32) automatically receives the values in a macro named 08002011DF32.

A macro with a name that does not use one of the categories listed in Table 8-3 can be processed only if one of the following is true:


Note -

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.


Order of Macro Processing

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, from the more general to the specific. The macros are processed in the following order:

  1. Client class macros - the most general category

  2. Network address macros - more specific than Client class

  3. Macros mapped to IP addresses - more specific than Network address

  4. Client ID macros - the most specific category

A macro that is included in another macro is processed as part of the containing macro.

If the same option is included in more than one macro, the value set 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 contained the lease time option with a value of 24 hours, and a Client ID macro contained the lease time option with a value of 8 hours, the client would receive a lease time of 8 hours.