source: trunk/sara_cmt/templates/lisa/dhcpd.cmt @ 14109

Last change on this file since 14109 was 14109, checked in by bas, 12 years ago

added some comments for switch network

File size: 9.1 KB
Line 
1# This file is automagicly generated by SARA CMT
2#
3#               SARA - Computing and Networking Services
4# Date        : Fri, 13 Aug 2010
5# Version     : {{ version }}
6# Generated   : {% now "r" %}
7#
8# Description : This is an ISC DHCP v3 configuration file.
9#
10# SVN:
11#       {{ svn_id }}
12#       {{ svn_url }}
13#
14{% load cmts_extras %}
15{% noblanklines %}
16
17{% store /etc/dhcp/dhcpd.conf as output %}
18
19{% epilogue %}
20/etc/init.d/isc-dhcp-server restart
21{% endepilogue %}
22
23{% use network with 'name=lisa consoles' as net_lisa_consoles %}
24{% use network with 'name=icua' as net_icua %}
25{% use network with 'name=lisa admin' as net_lisa_admin %}
26{% use network with 'name=lisa switches' as net_lisa_switches %}
27{% use network with 'name=cua' as net_cua %}
28{% use interface with 'network__name=cua' as ifaces_cua %}
29{% use interface with 'network__name=lisa switches' as ifaces_lisa_switches %}
30{% use interface with 'network__name=lisa admin' as ifaces_lisa_admin %}
31{% use interface with 'network__name=lisa extern' as ifaces_lisa_extern %}
32{% use interface with 'network__name=lisa consoles' as ifaces_lisa_consoles %}
33{% use interface with 'network__name=icua' as ifaces_icua %}
34
35{% endnoblanklines %}
36
37# general options
38authoritative;
39ddns-update-style none;
40
41# RB 3/3/09: Added for kvm switch BOOTP
42#
43always-broadcast on;
44always-reply-rfc1048 on;
45
46# The "host-checking" option is only used by Curtis Zinzilieta's DHCP patch.
47# The patch adds functionality to the server for removing specified host
48# addresses from ranges of available ip addresses at startup.  This addresses
49# the issue where a fixed-address reserved for a specific machine gets
50# assigned to a different machine.
51#
52# If you are running a version of dhcpd with this patch, then you will want
53# the "host-checking" option below to be uncommented.  If you are not running
54# the patched dhcpd, you should leave it commented out.  You can find the patch
55# and the matched DHCP v3.0 source code here:  http://systemimager.org/download/
56#host-checking true;
57# Imageserver
58option option-140 code 140 = text;
59option sali-imgsrv code 224 = ip-address;
60
61# log_server_port
62option option-141 code 141 = unsigned integer 32;
63
64# ssh_download_url
65option option-142 code 142 = string;
66
67# flamethrower_directory_portbase
68option option-143 code 143 = string;
69
70# tmpfs_staging
71option option-144 code 144 = string;
72
73# Sara: option-155 for master script name
74#       option-156 for starting telnetd
75option option-155 code 155 = string;
76option option-156 code 156 = string;
77
78# next-server is your network boot server
79#next-server 10.0.43.45;
80
81# log-servers
82#option log-servers 10.0.43.45;
83
84# option-141 is the port number your log server uses
85#option option-141 514;
86
87# set lease time to infinite (-1)
88default-lease-time -1;
89max-lease-time -1;
90
91# Console/Drac network
92#
93subnet {{net_lisa_consoles.netaddress}} netmask {{net_lisa_consoles.netmask}} {
94  option domain-name-servers 192.168.136.2;
95  option routers 192.168.136.1;
96}
97
98# Console/icua network for LDAP servers
99#
100subnet {{net_icua.netaddress}} netmask {{net_icua.netmask}} {
101  option domain-name-servers 192.168.221.10;
102  option routers 192.168.221.1;
103}
104
105# Admin network
106#
107subnet {{net_lisa_admin.netaddress}} netmask {{net_lisa_admin.netmask}} {
108  #option domain-name-servers 192.168.16.3;
109  option domain-name-servers 192.168.145.37, 192.168.144.50;
110  option domain-name "irc.sara.nl";
111
112  # option-140 is the IP address of your SystemImager image server
113  option sali-imgsrv 192.168.144.50;
114  next-server 192.168.144.50;
115
116  # option-143 specifies the Flamethrower directory port.
117  # The default is "9000".
118  #option option-143 "9000";
119
120  # Uncomment one of the two following lines.  The first, if you need to
121  # boot i386 clients, or the second for booting ia64 clients.
122  filename "pxelinux.0";   # i386
123
124  #
125  # option-144 tells your autoinstallclient to spool the image into a tmpfs
126  # prior to laying it down on disk.  It is not certain that this is always
127  # a good thing to do.  And if you're feeling gutsy and want to try it, be
128  # sure that your (memory + swap) is at least twice the size of your image
129  # or your image transfer will fail when the tmpfs filesystem gets full!!!
130  # If unsure, say "no".
131  #
132  option option-144 "n";
133
134  # RB: 24 Juni 2004
135  #
136  # option-156, set this to:
137  # - telnetd   to start a small telnetd before executing master script
138
139  option option-156 "telnetd";
140}
141
142# Switches network, Bas van der Vlies, 21-Feb-2012 (not needed anymore)
143# administration is done by Network engineers
144#
145subnet {{net_lisa_switches.netaddress}} netmask {{net_lisa_switches.netmask}} {
146  option domain-name-servers 192.168.168.2 ;
147  option routers 192.168.168.1;
148
149  # option-140 is the IP address of your SystemImager image server
150  # option option-140 "192.168.136.2";
151
152  # option-143 specifies the Flamethrower directory port.
153  # The default is "9000".
154  # option option-143 "9000";
155
156  #
157  # option-144 tells your autoinstallclient to spool the image into a tmpfs
158  # prior to laying it down on disk.  It is not certain that this is always
159  # a good thing to do.  And if you're feeling gutsy and want to try it, be
160  # sure that your (memory + swap) is at least twice the size of your image
161  # or your image transfer will fail when the tmpfs filesystem gets full!!!
162  # If unsure, say "no".
163  #
164  # option option-144 "n";
165
166  # RB: 24 Juni 2004
167  #
168  # option-156, set this to:
169  # - telnetd   to start a small telnetd before executing master script
170  # option option-156 "telnetd";
171}
172
173# Cua network
174#
175subnet {{net_cua.netaddress}} netmask {{net_cua.netmask}} {
176  #option domain-name-servers 192.168.16.3;
177  option domain-name-servers 145.100.5.30, 145.100.5.45;
178  option routers 145.100.5.65;
179
180  # The IP address of your SystemImager image server
181  option sali-imgsrv 145.100.5.67;
182  next-server 145.100.5.67;
183
184  # Uncomment one of the two following lines.  The first, if you need to
185  # boot i386 clients, or the second for booting ia64 clients.
186  filename "pxelinux.0";   # i386
187
188  #
189  # option-144 tells your autoinstallclient to spool the image into a tmpfs
190  # prior to laying it down on disk.  It is not certain that this is always
191  # a good thing to do.  And if you're feeling gutsy and want to try it, be
192  # sure that your (memory + swap) is at least twice the size of your image
193  # or your image transfer will fail when the tmpfs filesystem gets full!!!
194  # If unsure, say "no".
195  #
196  option option-144 "n";
197
198}
199
200group { # Start Cua network
201        option domain-name "{{net_cua.domain}}";
202
203    {% noblanklines %}
204    {% for iface in ifaces_cua %}
205    {% if iface.hwaddress != None %}
206    host {{iface.fqdn}} {
207        hardware ethernet {{iface.hwaddress}};
208        fixed-address {{iface.ip}};
209        option host-name "{{iface.fqdn}}";
210    }
211    {% endif %}
212    {% endfor %}
213    {% endnoblanklines %}
214
215} # End cua network
216
217group { # Start switches
218        option domain-name "{{net_lisa_switches.domain}}";
219        option option-155 "rc_dell";
220
221    {% noblanklines %}
222    {% for iface in ifaces_lisa_switches %}
223    {% if iface.hwaddress != None %}
224    host {{iface.fqdn}} {
225        filename "";
226        hardware ethernet {{iface.hwaddress}};
227        fixed-address {{iface.ip}};
228        option host-name "{{iface.fqdn}}";
229    }
230    {% endif %}
231    {% endfor %}
232    {% endnoblanklines %}
233} # End switches
234
235group { # Start Admin network (boot) & not extern
236        option domain-name "{{net_lisa_admin.domain}}";
237        option option-155 "rc_dell_ng";
238        option routers 192.168.144.1;
239
240    {% noblanklines %}
241    {% for iface in ifaces_lisa_admin %}
242    {% if iface.hwaddress != None %}
243        {% if 'externe service' not in iface.host.roles %}
244    host {{iface.fqdn}} {
245        hardware ethernet {{iface.hwaddress}};
246        fixed-address {{iface.ip}};
247        option host-name "{{iface.fqdn}}";
248    }
249        {% endif %}
250    {% endif %}
251    {% endfor %}
252    {% endnoblanklines %}
253} # End admin network (boot)
254
255group { # Start Admin network (boot) & extern
256        option domain-name "{{net_lisa_admin.domain}}";
257        option option-155 "rc_dell_ng";
258
259    {% noblanklines %}
260    {% for iface in ifaces_lisa_admin %}
261    {% if iface.hwaddress != None %}
262        {% if 'externe service' in iface.host.roles %}
263    host {{iface.fqdn}} {
264        hardware ethernet {{iface.hwaddress}};
265        fixed-address {{iface.ip}};
266        option host-name "{{iface.fqdn}}";
267    }
268        {% endif %}
269    {% endif %}
270    {% endfor %}
271    {% endnoblanklines %}
272} # End admin network (boot)
273
274group { # Start Console/Drac network
275        option domain-name "{{net_lisa_consoles.domain}}";
276
277    {% noblanklines %}
278    {% for iface in ifaces_lisa_consoles %}
279    {% if iface.hwaddress != None %}
280    host {{iface.fqdn}} {
281        hardware ethernet {{iface.hwaddress}};
282        fixed-address {{iface.ip}};
283        option host-name "{{iface.fqdn}}";
284    }
285    {% endif %}
286    {% endfor %}
287    {% endnoblanklines %}
288} # End Console/Drac network
289
290group { # Start Console/icua network
291        option domain-name "{{icua.domain}}";
292
293    {% noblanklines %}
294    {% for iface in ifaces_icua %}
295    {% if iface.hwaddress != None %}
296    host {{iface.fqdn}} {
297        filename "";
298        hardware ethernet {{iface.hwaddress}};
299        fixed-address {{iface.ip}};
300        option host-name "{{iface.fqdn}}";
301    }
302    {% endif %}
303    {% endfor %}
304    {% endnoblanklines %}
305} # End Console/icua network
Note: See TracBrowser for help on using the repository browser.