Nectaris donne aussi des IP dynamiques
darcs-hash:20051103103219-d1718-a162774241f5c046eddf6f1f3c081cee8b273d23.gz
This commit is contained in:
parent
7eb88b5e13
commit
0a3b4bcef8
1 changed files with 18 additions and 0 deletions
|
@ -32,6 +32,22 @@ class dhcp(gen_config) :
|
|||
if hostname == 'rouge' :
|
||||
base_conf = """option option-252 code 252 = 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 :
|
||||
base_conf = ''
|
||||
|
@ -134,6 +150,8 @@ subnet %(network)s netmask %(netmask)s {
|
|||
d['HOSTs'] = hosts[net]
|
||||
|
||||
fd.write(self.base_dhcp % d)
|
||||
if hostname == 'nectaris' :
|
||||
fd.write("}") # On ferme le shared-network
|
||||
|
||||
fd.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue