41 |
41 |
option wpad-url "http://wpad.%%global_domain_wpad_dhcp/wpad.dat\n";
|
42 |
42 |
%end if
|
43 |
43 |
|
|
44 |
#ToIP
|
|
45 |
%if %%global_verif_modele_telip_dhcp == "oui"
|
|
46 |
## Vérification des id vendor dans le fichier des baux
|
|
47 |
set vendor-string = option vendor-class-identifier;
|
|
48 |
%end if
|
|
49 |
%if not %%is_empty(%%global_modele_telip_dhcp)
|
|
50 |
## définition des espaces d'option Tel.IP
|
|
51 |
%for %%i_modele in %%global_modele_telip_dhcp
|
|
52 |
option space %%i_modele code width 1 length width 1 hash size 3;
|
|
53 |
%set %%optprio = %%i_modele +'.vendor-priority'
|
|
54 |
%set %%optvlan = %%i_modele +'.vendor-vlan-id'
|
|
55 |
option %%optprio code %%i_modele.global_option_vendor_priority_dhcp = unsigned integer 8;
|
|
56 |
option %%optvlan code %%i_modele.global_option_vendor_vlanid_dhcp = unsigned integer 16;
|
|
57 |
#
|
|
58 |
%end for
|
|
59 |
%end if
|
|
60 |
|
44 |
61 |
#ddns-update-style none;
|
45 |
62 |
authoritative;
|
46 |
63 |
|
... | ... | |
82 |
99 |
%if %%subnet.adresse_ip_wins_secondaire_dhcp not in %%subnets[(%%str(%%subnet), %%subnet.adresse_netmask_dhcp)]['wins']
|
83 |
100 |
%silent %%subnets[(%%str(%%subnet), %%subnet.adresse_netmask_dhcp)].setdefault('wins', []).append(%%subnet.adresse_ip_wins_secondaire_dhcp)
|
84 |
101 |
%end if
|
|
102 |
|
|
103 |
%silent %%subnets[(%%str(%%subnet), %%subnet.adresse_netmask_dhcp)].setdefault('priority', []).append(%%subnet.vendor_priority_dhcp)
|
|
104 |
%silent %%subnets[(%%str(%%subnet), %%subnet.adresse_netmask_dhcp)].setdefault('vlanid', []).append(%%subnet.vendor_vlanid_dhcp)
|
|
105 |
|
85 |
106 |
%end for
|
86 |
107 |
%for %%subnet in %%subnets
|
87 |
108 |
subnet %%subnet[0] netmask %%subnet[1] {
|
... | ... | |
131 |
152 |
filename "%%chemin_fichier_pxe";
|
132 |
153 |
%end if
|
133 |
154 |
|
|
155 |
|
|
156 |
## définition des espaces d'option Tel.IP
|
|
157 |
%set %%vlanid = [v for v in %%subnets[%%subnet]['vlanid'] if v != None]
|
|
158 |
%if not %%len(%%vlanid) == 0
|
|
159 |
%if not %%is_empty(%%global_modele_telip_dhcp)
|
|
160 |
%for %%i_modele in %%global_modele_telip_dhcp
|
|
161 |
%set %%optprio = %%i_modele +'.vendor-priority'
|
|
162 |
%set %%optvlan = %%i_modele +'.vendor-vlan-id'
|
|
163 |
class "vendor-class-%%i_modele" {
|
|
164 |
match if option vendor-class-identifier="%%i_modele.global_vendor_identifier_dhcp";
|
|
165 |
vendor-option-space %%i_modele;
|
|
166 |
%set %%priority = [p for p in %%subnets[%%subnet]['priority'] if p != None]
|
|
167 |
%if not %%len(%%priority) == 0
|
|
168 |
option %%optprio %%custom_join(%%priority, ' ');
|
|
169 |
%end if
|
|
170 |
%set %%vlanid = [l for l in %%subnets[%%subnet]['vlanid'] if l != None]
|
|
171 |
%if not %%len(%%vlanid) == 0
|
|
172 |
option %%optvlan %%custom_join(%%vlanid, ' ');
|
|
173 |
%end if
|
|
174 |
}
|
|
175 |
%end for
|
|
176 |
%end if
|
|
177 |
%end if
|
|
178 |
|
134 |
179 |
%set %%nb_ranges = %%len(%%subnets[%%subnet]['ranges'])
|
135 |
180 |
%for %%range_ip in %%subnets[%%subnet]['ranges']
|
136 |
181 |
%if %%nb_ranges > 1
|
... | ... | |
164 |
209 |
deny unknown-clients;
|
165 |
210 |
%end if
|
166 |
211 |
%end if
|
|
212 |
|
|
213 |
|
167 |
214 |
%end for
|
168 |
215 |
}
|
169 |
216 |
|