Difference between revisions of "Cluster der kan alt/DHCP server"
From Teknologisk videncenter
(Created page with "== Installation af DHCP-server == Følgende skal skrives for at installer DHCP-server på LINUX <source lang=bash> sudo apt-get install dhcp3-server </source>") |
m (→Konfigurer dhcpd.conf) |
||
(21 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== Installation af DHCP-server == | == Installation af DHCP-server == | ||
− | Følgende skal skrives for at installer DHCP-server | + | Følgende skal skrives for at installer DHCP-server |
− | <source lang= | + | <source lang=cli> |
sudo apt-get install dhcp3-server | sudo apt-get install dhcp3-server | ||
</source> | </source> | ||
+ | |||
+ | === Konfigurer dhcpd.conf === | ||
+ | Nedenstående linjer skal tilføjes til dhcpd.conf - nano /etc/dhcp/dhcpd.conf.'''Udkommenter alt andet!''' | ||
+ | |||
+ | {|- | ||
+ | | valign="top" | | ||
+ | <source lang=cli> | ||
+ | |||
+ | ddns-update-style none; | ||
+ | authoritative; | ||
+ | |||
+ | option domain-name "dka.local"; | ||
+ | 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; | ||
+ | next-server 10.0.0.1; | ||
+ | filename "pxelinux.0"; | ||
+ | |||
+ | # 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; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | host node1 { | ||
+ | hardware ethernet 20:cf:30:f1:0b:4d; | ||
+ | server-name "node1.dka.local"; | ||
+ | fixed-address 10.0.0.10; | ||
+ | } | ||
+ | |||
+ | host node2 { | ||
+ | hardware ethernet 20:cf:30:f0:c6:55; | ||
+ | server-name "node2.dka.local"; | ||
+ | fixed-address 10.0.0.11; | ||
+ | } | ||
+ | |||
+ | host node3 { | ||
+ | hardware ethernet 20:cf:30:f1:0b:4f; | ||
+ | server-name "node3.dka.local"; | ||
+ | fixed-address 10.0.0.12; | ||
+ | } | ||
+ | |||
+ | host node4 { | ||
+ | hardware ethernet 20:cf:30:f0:c8:6d; | ||
+ | server-name "node4.dka.local"; | ||
+ | fixed-address 10.0.0.13; | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </source> | ||
+ | {{Source cli}} | ||
+ | [[Category:Cluster]][[Category:Ubuntu]] |
Latest revision as of 09:36, 19 November 2012
Installation af DHCP-server
Følgende skal skrives for at installer DHCP-server
sudo apt-get install dhcp3-server
Konfigurer dhcpd.conf
Nedenstående linjer skal tilføjes til dhcpd.conf - nano /etc/dhcp/dhcpd.conf.Udkommenter alt andet!
ddns-update-style none;
authoritative;
option domain-name "dka.local";
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;
next-server 10.0.0.1;
filename "pxelinux.0";
# 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;
}
host node1 {
hardware ethernet 20:cf:30:f1:0b:4d;
server-name "node1.dka.local";
fixed-address 10.0.0.10;
}
host node2 {
hardware ethernet 20:cf:30:f0:c6:55;
server-name "node2.dka.local";
fixed-address 10.0.0.11;
}
host node3 {
hardware ethernet 20:cf:30:f1:0b:4f;
server-name "node3.dka.local";
fixed-address 10.0.0.12;
}
host node4 {
hardware ethernet 20:cf:30:f0:c8:6d;
server-name "node4.dka.local";
fixed-address 10.0.0.13;
}
} |