Difference between revisions of "Cluster der kan alt/Install DHCP server"
From Teknologisk videncenter
m (added Category:Cluster using HotCat) |
(→Configure dhcpd.conf) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
<source lang=cli> | <source lang=cli> | ||
− | sudo apt-get install | + | sudo apt-get install isc-dhcp-server |
</source> | </source> | ||
Line 10: | Line 10: | ||
Ether the dhcp.conf | Ether the dhcp.conf | ||
<source lang=cli> | <source lang=cli> | ||
− | nano /etc/dhcp/dhcpd.conf | + | sudo nano /etc/dhcp/dhcpd.conf |
</source> | </source> | ||
− | + | replace the context af the dhcp.conf file with this. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now | |
<source lang=cli> | <source lang=cli> | ||
− | + | default-lease-time 3100; # 51 minutes. | |
− | + | max-lease-time 604800; # 1 week | |
− | + | ||
− | + | ||
− | |||
− | |||
− | default-lease-time 3100; # 51 minutes. | ||
− | max-lease-time 604800; | ||
− | |||
− | |||
subnet 10.0.0.0 netmask 255.255.255.0 { | subnet 10.0.0.0 netmask 255.255.255.0 { | ||
+ | range 10.0.0.11 10.0.0.20; | ||
option routers 10.0.0.1; | option routers 10.0.0.1; | ||
option subnet-mask 255.255.255.0; | option subnet-mask 255.255.255.0; | ||
option broadcast-address 10.0.0.255; | option broadcast-address 10.0.0.255; | ||
+ | option domain-name-servers 10.0.0.1; | ||
+ | option domain-name "dka.local"; | ||
next-server 10.0.0.1; | next-server 10.0.0.1; | ||
filename "pxelinux.0"; | filename "pxelinux.0"; | ||
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
host node1 { | host node1 { | ||
− | hardware ethernet | + | hardware ethernet 20:CF:30:F1:0B:4D; |
− | + | fixed-address 10.0.0.11; | |
− | fixed-address 10.0.0. | ||
} | } | ||
− | |||
host node2 { | host node2 { | ||
− | hardware ethernet | + | hardware ethernet 20:CF:30:F0:C6:55; |
− | + | fixed-address 10.0.0.12; | |
− | fixed-address 10.0.0. | ||
} | } | ||
host node3 { | host node3 { | ||
− | hardware ethernet | + | hardware ethernet 20:CF:30:F1:0B:F4; |
− | + | fixed-address 10.0.0.13; | |
− | fixed-address 10.0.0. | ||
} | } | ||
− | |||
host node4 { | host node4 { | ||
− | hardware ethernet | + | hardware ethernet 20:CF:30:F0:C8:6D; |
− | + | fixed-address 10.0.0.14; | |
− | fixed-address 10.0.0. | ||
} | } | ||
− | + | ||
Latest revision as of 09:50, 30 October 2014
Install DHCP server
Install DHCP server by download and install the DHCP package
sudo apt-get install isc-dhcp-server
Configure dhcpd.conf
Ether the dhcp.conf
sudo nano /etc/dhcp/dhcpd.conf
replace the context af the dhcp.conf file with this. You have to enter the nodes MAC-addresses. This can be added later on, but if you already know the MAC-addresses on the nodes type them in now
default-lease-time 3100; # 51 minutes.
max-lease-time 604800; # 1 week
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.11 10.0.0.20;
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option domain-name-servers 10.0.0.1;
option domain-name "dka.local";
next-server 10.0.0.1;
filename "pxelinux.0";
}
host node1 {
hardware ethernet 20:CF:30:F1:0B:4D;
fixed-address 10.0.0.11;
}
host node2 {
hardware ethernet 20:CF:30:F0:C6:55;
fixed-address 10.0.0.12;
}
host node3 {
hardware ethernet 20:CF:30:F1:0B:F4;
fixed-address 10.0.0.13;
}
host node4 {
hardware ethernet 20:CF:30:F0:C8:6D;
fixed-address 10.0.0.14;
}