Section pour les IP dynamiques pour nectaris
darcs-hash:20051002000000-d1718-6878b3114c2301771f13a2c5e6134ca0419b09f7.gz
This commit is contained in:
parent
4361c8217a
commit
2ffc7d6a63
1 changed files with 19 additions and 1 deletions
|
@ -28,10 +28,26 @@ class dhcp(gen_config) :
|
||||||
else :
|
else :
|
||||||
DHCPD_CONF='/etc/dhcpd.conf'
|
DHCPD_CONF='/etc/dhcpd.conf'
|
||||||
|
|
||||||
# Options g-Aénérales-b
|
# Options générales
|
||||||
if hostname == 'rouge' :
|
if hostname == 'rouge' :
|
||||||
base_conf = """option option-252 code 252 = text ;
|
base_conf = """option option-252 code 252 = text ;
|
||||||
option option-119 code 119 = text ;
|
option option-119 code 119 = text ;
|
||||||
|
"""
|
||||||
|
elif hostname == 'nectaris' :
|
||||||
|
# On rajoute les IP dynamiques
|
||||||
|
base_conf = """shared-network "wifi" {
|
||||||
|
subnet 10.231.144.0 netmask 255.255.248.0 {
|
||||||
|
default-lease-time 86400;
|
||||||
|
option subnet-mask 255.255.248.0;
|
||||||
|
option broadcast-address 10.231.151.255;
|
||||||
|
option routers 10.231.148.1;
|
||||||
|
option domain-name-servers 10.231.148.1;
|
||||||
|
option domain-name "ens-cachan.fr";
|
||||||
|
option option-119 "ens-cachan.fr";
|
||||||
|
option netbios-node-type 2;
|
||||||
|
|
||||||
|
range dynamic-bootp 10.231.149.1 10.231.149.254;
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
else :
|
else :
|
||||||
base_conf = ''
|
base_conf = ''
|
||||||
|
@ -135,6 +151,8 @@ subnet %(network)s netmask %(netmask)s {
|
||||||
d['HOSTs'] = hosts[net]
|
d['HOSTs'] = hosts[net]
|
||||||
|
|
||||||
fd.write(self.base_dhcp % d)
|
fd.write(self.base_dhcp % d)
|
||||||
|
if hostname == 'nectaris' :
|
||||||
|
fd.write("}") # On ferme le shared-network
|
||||||
|
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue