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

From Teknologisk videncenter
Jump to: navigation, search
(Konfigurer dhcpd.conf)
(Konfigurer dhcpd.conf)
Line 24: Line 24:
 
| valign="top" |
 
| 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";
Line 36: Line 36:
 
range "IP- to IP-address";
 
range "IP- to IP-address";
 
}
 
}
 +
 +
</source>
 
|
 
|
 
|
 
|
[[/image:dhcp_conf.png]]
+
[[image:dhcp_conf.png]]
</source>
 
  
 
=== Ændringer i /etc/init.d/dhcp ===
 
=== Ændringer i /etc/init.d/dhcp ===

Revision as of 14:21, 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"