Difference between revisions of "Linux Januar 2012/Projekt Gruppe 8/DHCP"
From Teknologisk videncenter
(→Opsætning af DHCP-server) |
(→Kilde) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
Nedenstående linjer skal tilføjes til dhcpd.conf | Nedenstående linjer skal tilføjes til dhcpd.conf | ||
+ | {|- | ||
+ | | valign="top" | | ||
<source lang=bash> | <source lang=bash> | ||
− | # <-- '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> | ||
+ | | | ||
+ | | | ||
+ | [[image:dhcp_conf.png]] | ||
+ | |} | ||
+ | |||
+ | === Ændringer i /etc/init.d/dhcp === | ||
+ | |||
+ | Følgende linje skal tilføjes for at serveren ved, hvilke interface den skal køre DHCP på. | ||
+ | |||
+ | {|- | ||
+ | | valign="top" | | ||
+ | <source lang=bash> | ||
+ | INTERFACES="interface name" . | ||
</source> | </source> | ||
+ | | | ||
+ | | | ||
+ | [[image:init_d_dhcp.png]] | ||
+ | |} | ||
+ | |||
+ | === Kilde === | ||
+ | |||
+ | *https://help.ubuntu.com/11.04/serverguide/C/dhcp.html | ||
+ | *http://www.ubuntugeek.com/how-to-install-and-configure-dhcp-server-in-ubuntu-server.html | ||
+ | *Rasmus Elmholt |
Latest revision as of 14:29, 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" .
|