File: dhcpd-pxe.conf

package info (click to toggle)
elilo 3.2-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,356 kB
  • ctags: 2,507
  • sloc: ansic: 9,556; sh: 639; asm: 532; makefile: 196
file content (188 lines) | stat: -rw-r--r-- 3,746 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#
# Enable proxyDHCP operation.
#
dhcpd-operation normal;

#
# BootServer is turned on
#
bootserver-operation on;

ddns-update-style ad-hoc;

#
# if this dhcpd server is not "master"
#
not authoritative;

#-------------------------------------------------------------
# For each of the 3 servers (builtin) define the DHCPD option
# tags we are interested in.
#-------------------------------------------------------------

#
# Define DHCPD request option tags
#

#
# This option is used to determine the client boot-time binary runtime
# environment.
#
option client-architecture code 93 =
	unsigned integer 16;

#
# Now go to the DHCPD proxy option tags
#
option space proxy;

option proxy.boot-prompt code 10 =
	{ unsigned integer 8, text };

option proxy.boot-menu code 9 = array of
	{ unsigned integer 16, unsigned integer 8, text };

option proxy.boot-servers code 8 = array of
	{ unsigned integer 16, unsigned integer 8, array of ip-address };

option proxy.discovery-control code 6 = unsigned integer 8;

#
# Now go to the PXE Bootserver options
#
option space bs;

option bs.boot-item code 71 =
	{ unsigned integer 16, unsigned integer 16 };

#-------------------------------------------------------------
# Actual configuration
#-------------------------------------------------------------

subnet 192.168.2.0 netmask 255.255.255.0 {
#
# In this section define regular DHCPD options
#

	#
	# Here we show settings with fixed addresses, but dynamic 
	# allocation is possible as well
	#
	host test1 {
		hardware ethernet 00:d0:b7:c7:fb:f8;
		fixed-address 192.168.2.10;
	}
	host test2 {
		hardware ethernet 00:d0:b7:aa:f0:e3;
		fixed-address 192.168.2.11;
	}

	#
	# Now we look at options for every possible type of requests
	#


	#
	#
	# If requets was received by the ProxyDHCPD
	if proxy {

		#
		# Provide proxyDHCP information for Intel ia64
		# architecture machines.
		# 
		if option client-architecture = 00:02 {
			#
			# Notify of PXE aware server
			#
			option vendor-class-identifier "PXEClient";
	
			#
			# Force unicast
			#
			option proxy.discovery-control 3;

			#
			# Print a nice boot menu
			#
			# ServerTypes:
			# 14 -> means Redhat install 
			# 13 -> means Redhat Boot 
			# 23 & 26 are length of string following. 
			#
			option proxy.boot-menu
			14 23 "Remote Redhat/ia64 boot",
			13 26 "Remote Redhat/ia64 install";

			#
			# list of possible bootservers for a ServerType
			#
			# Currently not possible to define more than one type
			#
			option proxy.boot-servers
			14 1 192.168.2.32;

			#
			# A boot prompt
			# 30 is timeout in seconds
			#
			option proxy.boot-prompt
			30 "Press <F8> or <M> for menu. Press <Esc> to local boot.";

			#
			#
			vendor-option-space proxy;
		}
	} else if bootserver {

		if option client-architecture = 00:02 {
			#
			# Now analyze bootserver request option tags
			#


			# ELILO Layering:
			#	Layer 0: bootloader binary (elilo.efi)
			#	Layer 1: elilo configuration file (elilo.conf)
			#	Layer 2: Linux/ia64 kernel

			if substring(option bs.boot-item, 2, 2) = 00:00 {

				filename "/tftpboot/elilo.efi";
	
				#
				# identify reply layer & server type
				#
				option bs.boot-item 14 0;

			} else if substring(option bs.boot-item, 2, 2) = 00:01 {

				filename "/tftpboot/elilo.conf";

				#
				# identify reply layer & server type
				#
				option bs.boot-item 14 1;

			} else if substring(option bs.boot-item, 2, 3) = 00:02 {

				filename "/tftpboot/vmlinux";

				#
				# identify reply layer & server type
				#
				option bs.boot-item 14 2;
			}
			#
			#
			vendor-option-space bs;

			option vendor-class-identifier "PXEClient";
		}
	} else {
		#
		# notify of PXE aware DHCPD server
		#
		option vendor-class-identifier "PXEClient";
	}
}