Difference between revisions of "Set up a dhcp server"

From Linuxintro
imported>ThorstenStaerk
(Created page with "To set up a dhcp server find out your distribution and proceed accordingly: = SUSE = This is an example that works with SUSE Linux 11.4. We use br0 as network card to offer ...")
 
imported>ThorstenStaerk
Line 14: Line 14:
 
  option domain-name-servers 192.168.0.1, 192.168.0.5;
 
  option domain-name-servers 192.168.0.1, 192.168.0.5;
 
  option domain-name "mydomain.net";
 
  option domain-name "mydomain.net";
 
+
 
  subnet 192.168.0.0 netmask 255.255.255.0 {
 
  subnet 192.168.0.0 netmask 255.255.255.0 {
 
     range 192.168.0.10 192.168.0.100;
 
     range 192.168.0.10 192.168.0.100;

Revision as of 20:58, 2 July 2012

To set up a dhcp server find out your distribution and proceed accordingly:

SUSE

This is an example that works with SUSE Linux 11.4. We use br0 as network card to offer the dhcp service, 192.168.0.0/24 as network where to take the IP addresses from, 192.168.0.1 and 192.168.0.5 as name servers and 192.168.0.5 as gateway.

  • install the dhcp server software:
yast -i dhcpd
  • edit /etc/dhcpd.conf, enter the following:
ddns-update-style interim;
authoritative; 
default-lease-time 600;
max-lease-time 3600;
option broadcast-address 192.168.0.255;
option routers 192.168.0.5;
option domain-name-servers 192.168.0.1, 192.168.0.5;
option domain-name "mydomain.net";

subnet 192.168.0.0 netmask 255.255.255.0 {
   range 192.168.0.10 192.168.0.100;
}
  • edit /etc/sysconfig/dhcp, set
DHCPD_INTERFACE=br0
  • start the dhcp daemon:
/etc/init.d/dhcpd start