Difference between revisions of "Cluster der kan alt/DHCP server"

From Teknologisk videncenter
Jump to: navigation, search
(Konfigurer dhcpd.conf)
(Konfigurer dhcpd.conf)
Line 13: Line 13:
 
| valign="top" |
 
| valign="top" |
 
<source lang=bash>
 
<source lang=bash>
# <-- 'Author' 'date'                                                                                                        .
+
 
+
ddns-update-style none;
option domain-name-server "10.0.0.1";
+
authoritative;
default-lease-time 600;
+
max-lease-time 7200;
+
option domain-name "dka.dk";
 
+
option domain-name-servers 10.0.0.1;
subnet "10.0.0.0" netmask "255.255.255.0"; {
+
option subnet-mask "255.255.255.0";
+
default-lease-time 3100; # 51 minutes.
option broadcast-address "10.0.0.255":
+
max-lease-time 604800; # 1 week
option routers "10.0.0.1";
+
range "10.0.0.10 - 10.0.0.254";
+
 +
subnet 10.0.0.0 netmask 255.255.255.0 {
 +
option routers 10.0.0.1;
 +
option subnet-mask 255.255.255.0;
 +
option broadcast-address 10.0.0.255;
 +
 +
# The latest input from layer-9 required us to shift the dynamic
 +
# range from the top half of the subnet down to the bottom half.
 +
# This pool clause will elicit NAKs for the old leases while the
 +
# clients migrate.  Remember to remove this once they've all booted
 +
# once or expired.
 +
pool {
 +
range 10.0.0.1 10.0.0.20;
 +
deny all clients;
 +
}
 +
pool {
 +
range 10.0.0.21 10.0.0.254;
 +
}
 
}
 
}
  

Revision as of 14:26, 18 April 2012

Installation af DHCP-server

Følgende skal skrives for at installer DHCP-server på LINUX

sudo apt-get install dhcp3-server

Konfigurer dhcpd.conf

Nedenstående linjer skal tilføjes til dhcpd.conf

 
ddns-update-style none;
authoritative;
 
option domain-name "dka.dk";
option domain-name-servers 10.0.0.1;
 
default-lease-time 3100;	# 51 minutes.
max-lease-time 604800;		# 1 week
 
 
subnet 10.0.0.0 netmask 255.255.255.0 {
	option routers 10.0.0.1;
	option subnet-mask 255.255.255.0;
	option broadcast-address 10.0.0.255;
 
	# The latest input from layer-9 required us to shift the dynamic
	# range from the top half of the subnet down to the bottom half.
	# This pool clause will elicit NAKs for the old leases while the
	# clients migrate.  Remember to remove this once they've all booted
	# once or expired.
	pool {
		range 10.0.0.1 10.0.0.20;
		deny all clients;
	}
	pool {
		range 10.0.0.21 10.0.0.254;
	}
}