1*0Sstevel@tonic-gate<!--
2*0Sstevel@tonic-gate  -- ident	"%Z%%M%	%I%	%E% SMI"
3*0Sstevel@tonic-gate  --
4*0Sstevel@tonic-gate    CDDL HEADER START
5*0Sstevel@tonic-gate
6*0Sstevel@tonic-gate    The contents of this file are subject to the terms of the
7*0Sstevel@tonic-gate    Common Development and Distribution License, Version 1.0 only
8*0Sstevel@tonic-gate    (the "License").  You may not use this file except in compliance
9*0Sstevel@tonic-gate    with the License.
10*0Sstevel@tonic-gate
11*0Sstevel@tonic-gate    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12*0Sstevel@tonic-gate    or http://www.opensolaris.org/os/licensing.
13*0Sstevel@tonic-gate    See the License for the specific language governing permissions
14*0Sstevel@tonic-gate    and limitations under the License.
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate    When distributing Covered Code, include this CDDL HEADER in each
17*0Sstevel@tonic-gate    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18*0Sstevel@tonic-gate    If applicable, add the following below this CDDL HEADER, with the
19*0Sstevel@tonic-gate    fields enclosed by brackets "[]" replaced with your own identifying
20*0Sstevel@tonic-gate    information: Portions Copyright [yyyy] [name of copyright owner]
21*0Sstevel@tonic-gate
22*0Sstevel@tonic-gate    CDDL HEADER END
23*0Sstevel@tonic-gate
24*0Sstevel@tonic-gate -- Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
25*0Sstevel@tonic-gate  -- Use is subject to license terms.
26*0Sstevel@tonic-gate  -->
27*0Sstevel@tonic-gate<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
28*0Sstevel@tonic-gate<html>
29*0Sstevel@tonic-gate
30*0Sstevel@tonic-gate<head>
31*0Sstevel@tonic-gate<title>DHCP Manager Help: About Macros and Options</title>
32*0Sstevel@tonic-gate<meta NAME="AUTHOR" CONTENT="smorgan">
33*0Sstevel@tonic-gate<meta NAME="KEYWORDS" CONTENT="DHCP">
34*0Sstevel@tonic-gate
35*0Sstevel@tonic-gate</head>
36*0Sstevel@tonic-gate<body bgcolor="#FFFFFF">
37*0Sstevel@tonic-gate
38*0Sstevel@tonic-gate<a name="top"></a>
39*0Sstevel@tonic-gate
40*0Sstevel@tonic-gate<table border=0 cellspacing=0 cellpadding=0 width=645>
41*0Sstevel@tonic-gate
42*0Sstevel@tonic-gate<!-- Start navigation banner -->
43*0Sstevel@tonic-gate
44*0Sstevel@tonic-gate<tr><td colspan=4  WIDTH="615" align="center" valign="top"><IMG SRC="art/bannersmc.gif" WIDTH=615 BORDER=0 ALT="DHCP Manager Help">
45*0Sstevel@tonic-gate
46*0Sstevel@tonic-gate	</td>
47*0Sstevel@tonic-gate	</tr>
48*0Sstevel@tonic-gate
49*0Sstevel@tonic-gate<!-- End navigation banner -->
50*0Sstevel@tonic-gate
51*0Sstevel@tonic-gate
52*0Sstevel@tonic-gate<tr>
53*0Sstevel@tonic-gate
54*0Sstevel@tonic-gate<!-- Start contents block -->
55*0Sstevel@tonic-gate
56*0Sstevel@tonic-gate	<td colspan=1 valign="top" width=105>
57*0Sstevel@tonic-gate	<P>&nbsp;</P>
58*0Sstevel@tonic-gate	<A HREF="dhcp_main_top.html"><STRONG>Overview</STRONG></A><BR>
59*0Sstevel@tonic-gate	&nbsp;&nbsp;<A HREF="dhcp_solaris_about.html">Solaris DHCP</A><BR>
60*0Sstevel@tonic-gate	<IMG SRC="art/tip2.gif" WIDTH=12 HEIGHT=10 BORDER=0 ALT="">About Macros<BR>
61*0Sstevel@tonic-gate	&nbsp;&nbsp;<A HREF="dhcp_main_hlp.html">Getting Help</A><P>
62*0Sstevel@tonic-gate	<A HREF="dhcp_relay_ref.html"><STRONG>Servers and Relays</STRONG></A><P>
63*0Sstevel@tonic-gate	<A HREF="dhcp_net_ref.html"><STRONG>Networks</STRONG></A><P>
64*0Sstevel@tonic-gate	<A HREF="dhcp_addr_ref.html"><STRONG>Addresses</STRONG></A><P>
65*0Sstevel@tonic-gate	<A HREF="dhcp_macro_ref.html"><STRONG>Macros</STRONG></A><P>
66*0Sstevel@tonic-gate	<A HREF="dhcp_option_ref.html"><STRONG>Options</STRONG></A><P>
67*0Sstevel@tonic-gate	<A HREF="dhcp_main_how.html"><STRONG>How To..</STRONG></A><P>
68*0Sstevel@tonic-gate	<A HREF="dhcp_main_idx.html"><STRONG>Index</STRONG></A>
69*0Sstevel@tonic-gate
70*0Sstevel@tonic-gate		</td>
71*0Sstevel@tonic-gate
72*0Sstevel@tonic-gate<!-- End contents block -->
73*0Sstevel@tonic-gate
74*0Sstevel@tonic-gate<!-- Start column rule -->
75*0Sstevel@tonic-gate
76*0Sstevel@tonic-gate	<td colspan=1 width=5 bgcolor="#CCCCCC">&nbsp;</td>
77*0Sstevel@tonic-gate
78*0Sstevel@tonic-gate<!-- End column spacer -->
79*0Sstevel@tonic-gate
80*0Sstevel@tonic-gate<!-- Start column spacer -->
81*0Sstevel@tonic-gate
82*0Sstevel@tonic-gate	<td colspan=1 width=10 bgcolor="#FFFFFF">&nbsp;</td>
83*0Sstevel@tonic-gate
84*0Sstevel@tonic-gate<!-- End column spacer -->
85*0Sstevel@tonic-gate
86*0Sstevel@tonic-gate
87*0Sstevel@tonic-gate
88*0Sstevel@tonic-gate<!-- Start topic block -->
89*0Sstevel@tonic-gate
90*0Sstevel@tonic-gate<td colspan=1 valign="top" bgcolor="#ffffff" width=495>
91*0Sstevel@tonic-gate
92*0Sstevel@tonic-gate
93*0Sstevel@tonic-gate
94*0Sstevel@tonic-gate<P>&nbsp;</P>
95*0Sstevel@tonic-gate
96*0Sstevel@tonic-gate<h1>About Macros and Options</H1>
97*0Sstevel@tonic-gate
98*0Sstevel@tonic-gate
99*0Sstevel@tonic-gateIn a DHCP environment, <em>macros</em> are containers for <em>option values</em> that are
100*0Sstevel@tonic-gatepassed as configuration parameters from the DHCP server to the DHCP client. For example,
101*0Sstevel@tonic-gateyou might define a macro that contains options specifying a DNS server and print server
102*0Sstevel@tonic-gateto be used by all clients using IP addresses owned by a particular DHCP server.<p>
103*0Sstevel@tonic-gate
104*0Sstevel@tonic-gate<em>Options</em> specify the format in which option values are
105*0Sstevel@tonic-gatedefined in the DHCP server's <tt>dhcptab</tt> (in which all DHCP
106*0Sstevel@tonic-gateoptions and macros are stored). For example, option category, data type, vendor, and granularity all determine the <em>shape</em> of the options
107*0Sstevel@tonic-gatecontained in your macros. Creating and modifying options is described
108*0Sstevel@tonic-gatefurther in the help pages for <a href="dhcp_option_create.html">Create Option</a> and
109*0Sstevel@tonic-gate<a href="dhcp_option_mod.html">Modify Option</a>.<p>
110*0Sstevel@tonic-gate
111*0Sstevel@tonic-gate<h1>
112*0Sstevel@tonic-gate         Macro Processing
113*0Sstevel@tonic-gate      </h1>
114*0Sstevel@tonic-gate      <p>
115*0Sstevel@tonic-gate         Remember the following points when naming DHCP macros and adding
116*0Sstevel@tonic-gate         options to macros:
117*0Sstevel@tonic-gate      </p>
118*0Sstevel@tonic-gate      <ol>
119*0Sstevel@tonic-gate         <li>
120*0Sstevel@tonic-gate            <strong>Automatic processing</strong> occurs for Client Class,
121*0Sstevel@tonic-gate            Network, and Client ID category macros when the macro category
122*0Sstevel@tonic-gate            matches the client's class, network address, or client
123*0Sstevel@tonic-gate            identifier.
124*0Sstevel@tonic-gate            <br>
125*0Sstevel@tonic-gate         </li>
126*0Sstevel@tonic-gate         <li>
127*0Sstevel@tonic-gate            <strong>Macro categories</strong> determine the order in which
128*0Sstevel@tonic-gate            macros are processed automatically.
129*0Sstevel@tonic-gate             <br>
130*0Sstevel@tonic-gate         </li>
131*0Sstevel@tonic-gate         <li>
132*0Sstevel@tonic-gate            <strong>Macro names</strong> determine macro categories, with the
133*0Sstevel@tonic-gate            exception of IP address macros, which are categorized by their
134*0Sstevel@tonic-gate            assignment to an IP address.<br>
135*0Sstevel@tonic-gate
136*0Sstevel@tonic-gate             <p>
137*0Sstevel@tonic-gate               For most macros, make your macro names <strong>match the names
138*0Sstevel@tonic-gate               of the resources or devices</strong> to which you want the
139*0Sstevel@tonic-gate               macros to apply. For example:
140*0Sstevel@tonic-gate            </p>
141*0Sstevel@tonic-gate            <br>
142*0Sstevel@tonic-gate            <table cellpadding="4" cellspacing="4" border="1">
143*0Sstevel@tonic-gate               <tr>
144*0Sstevel@tonic-gate                  <td bgcolor="#CCCFFF" valign="middle" align="left">
145*0Sstevel@tonic-gate                     <p>
146*0Sstevel@tonic-gate                        For Clients...
147*0Sstevel@tonic-gate                     </p>
148*0Sstevel@tonic-gate                  </td>
149*0Sstevel@tonic-gate                  <td bgcolor="#CCCFFF" valign="middle" align="left">
150*0Sstevel@tonic-gate                     <p>
151*0Sstevel@tonic-gate                        Name Your Macro
152*0Sstevel@tonic-gate                     </p>
153*0Sstevel@tonic-gate                  </td>
154*0Sstevel@tonic-gate               </tr>
155*0Sstevel@tonic-gate               <tr>
156*0Sstevel@tonic-gate                  <td valign="top">
157*0Sstevel@tonic-gate                     <p>
158*0Sstevel@tonic-gate                        Of a particular client class
159*0Sstevel@tonic-gate                     </p>
160*0Sstevel@tonic-gate                  </td>
161*0Sstevel@tonic-gate                  <td valign="top">
162*0Sstevel@tonic-gate                     <p>
163*0Sstevel@tonic-gate                        Same name as the DHCP client's client class. The
164*0Sstevel@tonic-gate                        client class is determined by the client vendor. For
165*0Sstevel@tonic-gate                        example, the client class name for a Sun Blade <sup><font
166*0Sstevel@tonic-gate                        size="-2"> TM</font></sup> 150 client is SUNW,Sun-Blade-100 so
167*0Sstevel@tonic-gate                        you must name your macro <tt> SUNW.Sun-Blade-100</tt> . On
168*0Sstevel@tonic-gate                        Solaris DHCP client systems, you
169*0Sstevel@tonic-gate                        can determine the client class by typing the command
170*0Sstevel@tonic-gate                        <tt> uname -i</tt> on the client machine. Note that
171*0Sstevel@tonic-gate                        macro names cannot contain commas; if a comma appears
172*0Sstevel@tonic-gate                        in the client class, replace it with a period in the
173*0Sstevel@tonic-gate                        macro name.
174*0Sstevel@tonic-gate                     </p>
175*0Sstevel@tonic-gate                  </td>
176*0Sstevel@tonic-gate               </tr>
177*0Sstevel@tonic-gate               <tr>
178*0Sstevel@tonic-gate                  <td valign="top">
179*0Sstevel@tonic-gate                     <p>
180*0Sstevel@tonic-gate                        On a particular network
181*0Sstevel@tonic-gate                     </p>
182*0Sstevel@tonic-gate                  </td>
183*0Sstevel@tonic-gate                  <td valign="top">
184*0Sstevel@tonic-gate                     <p>
185*0Sstevel@tonic-gate                        Same as the IP address of the network through which the
186*0Sstevel@tonic-gate                        client is connecting; for example, name your macro <tt>
187*0Sstevel@tonic-gate                        10.0.0.0</tt>.
188*0Sstevel@tonic-gate                     </p>
189*0Sstevel@tonic-gate                  </td>
190*0Sstevel@tonic-gate               </tr>
191*0Sstevel@tonic-gate               <tr>
192*0Sstevel@tonic-gate                  <td valign="top">
193*0Sstevel@tonic-gate                     <p>
194*0Sstevel@tonic-gate                        Using a particular IP Address
195*0Sstevel@tonic-gate                     </p>
196*0Sstevel@tonic-gate                  </td>
197*0Sstevel@tonic-gate                  <td valign="top">
198*0Sstevel@tonic-gate                     <p>
199*0Sstevel@tonic-gate                        Any name, but using the DHCP server's hostname or IP
200*0Sstevel@tonic-gate                        address is recommended; for example, name your macro
201*0Sstevel@tonic-gate                        <tt> shiva</tt> or <tt> 125.53.224.45</tt> . This kind
202*0Sstevel@tonic-gate                        of macro is valuable for use as a configuration macro
203*0Sstevel@tonic-gate                        for all clients obtaining configuration information
204*0Sstevel@tonic-gate                        from this DHCP server.
205*0Sstevel@tonic-gate                     </p>
206*0Sstevel@tonic-gate                  </td>
207*0Sstevel@tonic-gate               </tr>
208*0Sstevel@tonic-gate               <tr>
209*0Sstevel@tonic-gate                  <td valign="top">
210*0Sstevel@tonic-gate                     <p>
211*0Sstevel@tonic-gate                        Identified by a particular client ID
212*0Sstevel@tonic-gate                     </p>
213*0Sstevel@tonic-gate                  </td>
214*0Sstevel@tonic-gate                  <td valign="top">
215*0Sstevel@tonic-gate                     <p>
216*0Sstevel@tonic-gate                        Same as the unique client identifier; for example,
217*0Sstevel@tonic-gate                        name your macro <tt> 010800201112B7</tt> .
218*0Sstevel@tonic-gate                     </p>
219*0Sstevel@tonic-gate                  </td>
220*0Sstevel@tonic-gate               </tr>
221*0Sstevel@tonic-gate            </table>
222*0Sstevel@tonic-gate            <br>
223*0Sstevel@tonic-gate         </li>
224*0Sstevel@tonic-gate         <li>
225*0Sstevel@tonic-gate            <strong>Order is important.</strong> The order in which macros are
226*0Sstevel@tonic-gate            processed is significant. If an option is contained in more than
227*0Sstevel@tonic-gate            one macro, the option value passed to the client is the value
228*0Sstevel@tonic-gate            assigned in the macro processed last. Macros are processed in the
229*0Sstevel@tonic-gate            order shown in the illustration.<br>
230*0Sstevel@tonic-gate            <br>
231*0Sstevel@tonic-gate
232*0Sstevel@tonic-gate            <p>
233*0Sstevel@tonic-gate               <img src="art/macroflow.gif"  alt="order of macro processing" vspace="0" hspace="0" border="0"
234*0Sstevel@tonic-gate               height="225" width="400">
235*0Sstevel@tonic-gate            </p>
236*0Sstevel@tonic-gate            <p>
237*0Sstevel@tonic-gate               As shown in the illustration, macro processing progresses from
238*0Sstevel@tonic-gate               the general to the specific.
239*0Sstevel@tonic-gate            </p>
240*0Sstevel@tonic-gate            <ul type="disc">
241*0Sstevel@tonic-gate               <li>
242*0Sstevel@tonic-gate                  <p>
243*0Sstevel@tonic-gate                     Client Class macros are processed first.<br>
244*0Sstevel@tonic-gate                  </p>
245*0Sstevel@tonic-gate               </li>
246*0Sstevel@tonic-gate               <li>
247*0Sstevel@tonic-gate                  <p>
248*0Sstevel@tonic-gate                     Network macros are processed second, superseding any
249*0Sstevel@tonic-gate                     competing settings in Client Class macros.<br>
250*0Sstevel@tonic-gate                  </p>
251*0Sstevel@tonic-gate               </li>
252*0Sstevel@tonic-gate               <li>
253*0Sstevel@tonic-gate                  <p>
254*0Sstevel@tonic-gate                     IP Address macros are processed third, superseding any
255*0Sstevel@tonic-gate                     competing settings in previous macros.<br>
256*0Sstevel@tonic-gate                  </p>
257*0Sstevel@tonic-gate               </li>
258*0Sstevel@tonic-gate               <li>
259*0Sstevel@tonic-gate                  <p>
260*0Sstevel@tonic-gate                     Client ID macros are processed last, superseding any
261*0Sstevel@tonic-gate                     competing settings in all previous macros.<br>
262*0Sstevel@tonic-gate                  </p>
263*0Sstevel@tonic-gate               </li>
264*0Sstevel@tonic-gate            </ul>
265*0Sstevel@tonic-gate          </li>
266*0Sstevel@tonic-gate         <li>
267*0Sstevel@tonic-gate			<p>
268*0Sstevel@tonic-gate            <strong>Macros can include other macros.</strong> Regardless of a
269*0Sstevel@tonic-gate            macro's category, it can include other macros so that, for example,
270*0Sstevel@tonic-gate            a client class macro could be called from an IP Address macro.<br>
271*0Sstevel@tonic-gate            <br>
272*0Sstevel@tonic-gate         </li>
273*0Sstevel@tonic-gate      </ol>
274*0Sstevel@tonic-gate      <p>
275*0Sstevel@tonic-gate276*0Sstevel@tonic-gate      </p>
277*0Sstevel@tonic-gate      <br>
278*0Sstevel@tonic-gate	&nbsp;&nbsp;&nbsp;<A HREF="#top"><small>return to top</small></A>
279*0Sstevel@tonic-gate
280*0Sstevel@tonic-gate<p>&nbsp;</p>
281*0Sstevel@tonic-gate
282*0Sstevel@tonic-gate
283*0Sstevel@tonic-gate<!-- Don't go past this line! -->
284*0Sstevel@tonic-gate
285*0Sstevel@tonic-gate	</td>
286*0Sstevel@tonic-gate
287*0Sstevel@tonic-gate<!-- End topic block -->
288*0Sstevel@tonic-gate
289*0Sstevel@tonic-gate</tr>
290*0Sstevel@tonic-gate
291*0Sstevel@tonic-gate</table>
292*0Sstevel@tonic-gate
293*0Sstevel@tonic-gate<!-- End topic table -->
294*0Sstevel@tonic-gate
295*0Sstevel@tonic-gate</body>
296*0Sstevel@tonic-gate</html>
297