orphan
[debian/elilo] / examples / netboot / dhcpd-pxe.conf
1 #
2 # Enable proxyDHCP operation.
3 #
4 dhcpd-operation normal;
5
6 #
7 # BootServer is turned on
8 #
9 bootserver-operation on;
10
11 ddns-update-style ad-hoc;
12
13 #
14 # if this dhcpd server is not "master"
15 #
16 not authoritative;
17
18 #-------------------------------------------------------------
19 # For each of the 3 servers (builtin) define the DHCPD option
20 # tags we are interested in.
21 #-------------------------------------------------------------
22
23 #
24 # Define DHCPD request option tags
25 #
26
27 #
28 # This option is used to determine the client boot-time binary runtime
29 # environment.
30 #
31 option client-architecture code 93 =
32         unsigned integer 16;
33
34 #
35 # Now go to the DHCPD proxy option tags
36 #
37 option space proxy;
38
39 option proxy.boot-prompt code 10 =
40         { unsigned integer 8, text };
41
42 option proxy.boot-menu code 9 = array of
43         { unsigned integer 16, unsigned integer 8, text };
44
45 option proxy.boot-servers code 8 = array of
46         { unsigned integer 16, unsigned integer 8, array of ip-address };
47
48 option proxy.discovery-control code 6 = unsigned integer 8;
49
50 #
51 # Now go to the PXE Bootserver options
52 #
53 option space bs;
54
55 option bs.boot-item code 71 =
56         { unsigned integer 16, unsigned integer 16 };
57
58 #-------------------------------------------------------------
59 # Actual configuration
60 #-------------------------------------------------------------
61
62 subnet 192.168.2.0 netmask 255.255.255.0 {
63 #
64 # In this section define regular DHCPD options
65 #
66
67         #
68         # Here we show settings with fixed addresses, but dynamic 
69         # allocation is possible as well
70         #
71         host test1 {
72                 hardware ethernet 00:d0:b7:c7:fb:f8;
73                 fixed-address 192.168.2.10;
74         }
75         host test2 {
76                 hardware ethernet 00:d0:b7:aa:f0:e3;
77                 fixed-address 192.168.2.11;
78         }
79
80         #
81         # Now we look at options for every possible type of requests
82         #
83
84
85         #
86         #
87         # If requets was received by the ProxyDHCPD
88         if proxy {
89
90                 #
91                 # Provide proxyDHCP information for Intel ia64
92                 # architecture machines.
93                 # 
94                 if option client-architecture = 00:02 {
95                         #
96                         # Notify of PXE aware server
97                         #
98                         option vendor-class-identifier "PXEClient";
99         
100                         #
101                         # Force unicast
102                         #
103                         option proxy.discovery-control 3;
104
105                         #
106                         # Print a nice boot menu
107                         #
108                         # ServerTypes:
109                         # 14 -> means Redhat install 
110                         # 13 -> means Redhat Boot 
111                         # 23 & 26 are length of string following. 
112                         #
113                         option proxy.boot-menu
114                         14 23 "Remote Redhat/ia64 boot",
115                         13 26 "Remote Redhat/ia64 install";
116
117                         #
118                         # list of possible bootservers for a ServerType
119                         #
120                         # Currently not possible to define more than one type
121                         #
122                         option proxy.boot-servers
123                         14 1 192.168.2.32;
124
125                         #
126                         # A boot prompt
127                         # 30 is timeout in seconds
128                         #
129                         option proxy.boot-prompt
130                         30 "Press <F8> or <M> for menu. Press <Esc> to local boot.";
131
132                         #
133                         #
134                         vendor-option-space proxy;
135                 }
136         } else if bootserver {
137
138                 if option client-architecture = 00:02 {
139                         #
140                         # Now analyze bootserver request option tags
141                         #
142
143
144                         # ELILO Layering:
145                         #       Layer 0: bootloader binary (elilo.efi)
146                         #       Layer 1: elilo configuration file (elilo.conf)
147                         #       Layer 2: Linux/ia64 kernel
148
149                         if substring(option bs.boot-item, 2, 2) = 00:00 {
150
151                                 filename "/tftpboot/elilo.efi";
152         
153                                 #
154                                 # identify reply layer & server type
155                                 #
156                                 option bs.boot-item 14 0;
157
158                         } else if substring(option bs.boot-item, 2, 2) = 00:01 {
159
160                                 filename "/tftpboot/elilo.conf";
161
162                                 #
163                                 # identify reply layer & server type
164                                 #
165                                 option bs.boot-item 14 1;
166
167                         } else if substring(option bs.boot-item, 2, 3) = 00:02 {
168
169                                 filename "/tftpboot/vmlinux";
170
171                                 #
172                                 # identify reply layer & server type
173                                 #
174                                 option bs.boot-item 14 2;
175                         }
176                         #
177                         #
178                         vendor-option-space bs;
179
180                         option vendor-class-identifier "PXEClient";
181                 }
182         } else {
183                 #
184                 # notify of PXE aware DHCPD server
185                 #
186                 option vendor-class-identifier "PXEClient";
187         }
188 }