Difference between revisions of "Linux Januar 2012/Projekt Gruppe 8/DHCP"

From Teknologisk videncenter
Jump to: navigation, search
(Ændringer i /etc/init.d/dhcp)
(Kilde)
 
(7 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 "'''dns ip-address'''";
+
option domain-name-server "dns ip-address";
 
default-lease-time 600;
 
default-lease-time 600;
 
max-lease-time 7200;
 
max-lease-time 7200;
  
subnet "'''network-address'''" netmask "'''netmask-address'''"; {
+
subnet "network-address" netmask "netmask-address"; {
option subnet-mask "'''netmask-address'''";
+
option subnet-mask "netmask-address";
option broadcast-address "'''broadcast-address'''":
+
option broadcast-address "broadcast-address":
option routers "'''Default gateway address'''";
+
option routers "Default gateway address";
range "'''IP- to IP-address'''";
+
range "IP- to IP-address";
 
}
 
}
 +
 
</source>
 
</source>
 +
|
 +
|
 +
[[image:dhcp_conf.png]]
 +
|}
  
 
=== Ændringer i /etc/init.d/dhcp ===
 
=== Ændringer i /etc/init.d/dhcp ===
Line 40: Line 47:
 
Følgende linje skal tilføjes for at serveren ved, hvilke interface den skal køre DHCP på.
 
Følgende linje skal tilføjes for at serveren ved, hvilke interface den skal køre DHCP på.
  
 +
{|-
 +
| valign="top" |
 
<source lang=bash>
 
<source lang=bash>
INTERFACES=""'''interface name'''""
+
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";
}

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å.

INTERFACES="interface name"                                                                      .

Init d dhcp.png

Kilde