Difference between revisions of "Linux Januar 2012/Projekt Gruppe 8/DHCP"
From Teknologisk videncenter
(→Ændringer i /etc/init.d/dhcp) |
(→Konfigurer dhcpd.conf) |
||
Line 24: | Line 24: | ||
# <-- 'Author' 'date' | # <-- 'Author' 'date' | ||
− | option domain-name-server " | + | option domain-name-server "dns ip-address"; |
default-lease-time 600; | default-lease-time 600; | ||
max-lease-time 7200; | max-lease-time 7200; | ||
− | subnet " | + | subnet "network-address" netmask "netmask-address"; { |
− | option subnet-mask " | + | option subnet-mask "netmask-address"; |
− | option broadcast-address " | + | option broadcast-address "broadcast-address": |
− | option routers " | + | option routers "Default gateway address"; |
− | range " | + | range "IP- to IP-address"; |
} | } | ||
</source> | </source> |
Revision as of 14:16, 30 January 2012
Installation af DHCP-server
Følgende skal skrives for at installer DHCP-server på LINUX
sudo apt-get install dhcp3-server
Opsætning af DHCP-server
For at få opsæt DHCP-server, så klienterne får en dynamisk IP-adress, Undermaske, Default gateway, og DNS-server (IPv4)
Åben /etc/dhcp/dhcpd.conf
sudo nano /etc/dhcp/dhcpd.conf
Konfigurer dhcpd.conf
Nedenstående linjer skal tilføjes til dhcpd.conf
# <-- 'Author' 'date'
option domain-name-server "dns ip-address";
default-lease-time 600;
max-lease-time 7200;
subnet "network-address" netmask "netmask-address"; {
option subnet-mask "netmask-address";
option broadcast-address "broadcast-address":
option routers "Default gateway address";
range "IP- to IP-address";
}
Ændringer i /etc/init.d/dhcp
Følgende linje skal tilføjes for at serveren ved, hvilke interface den skal køre DHCP på.
INTERFACES="interface name"