3.13 DHCP server configuration

 <  Day Day Up  >  

Dynamic Host Configuration Protocol (DHCP) can be used for automatically assigning IP addresses and other information to the hosts in the network. The configuration contains only one file. However, starting the dhcpd server in the enterprise network with one dhcpd server already running can result in some confusion or damage if the clients configured to use dhcp suddenly receive other addresses.

So be sure to have your server in a separate network, or use statical IP configuration for all nodes and servers that you do not want to serve. Clients usually take the first address offer they get, and often it is the wrong one.

Example 3-25. /etc/dhcpd.conf
 not authoritative; ddns-update-style ad-hoc; default-lease-time 60000; max-lease-time 720000; option myoption code 129 = text ; # dynamically assigned adress range # every client can get one subnet 192.168.100.0 netmask 255.255.255.0 { range 192.168.100.211 192.168.100.212; option routers 192.168.100.60; option nameservers 192.168.100.110; option domain residency.local; # statically assigned adresses, only clients # with designated MAC adress will get it group {         next-server 192.168.100.110;        host lpar1 {              fixed-address 192.168.100.77;              hardware ethernet 00:02:55:3A:06:8C;             filename "install";        }        host lpar2 {              fixed-address 192.168.100.78;              hardware ethernet 00:02:55:6f:1f:e3;             filename "yaboot";             option root-path "/tftpboot/"; }        host lpar3 {             fixed-address 192.168.100.79;             hardware ethernet 00:02:55:3a:06:19;            filename "yaboot";        } } } 

After editing /etc/dhcpd.conf, we start our dhcpd server:

 # /etc/init.d/dhcpd start 

Check /var/log/messages:

Example 3-26. /ect/var/log/messages excerpt:
 .... dhcpd: Internet Software Consortium DHCP Server V3.0.1rc9 Oct 22 15:40:50 p630sles dhcpd: Copyright 1995-2001 Internet Software Consortium. Oct 22 15:40:50 p630sles dhcpd: All rights reserved. Oct 22 15:40:50 p630sles dhcpd: For info, please visit http://www.isc.org/products/DHCP Oct 22 15:40:50 p630sles dhcpd: Wrote 0 deleted host decls to leases file. Oct 22 15:40:50 p630sles dhcpd: Wrote 0 new dynamic host decls to leases file. Oct 22 15:40:50 p630sles dhcpd: Wrote 0 leases to leases file. Oct 22 15:40:50 p630sles dhcpd: Listening on LPF/eth0/00:02:55:4f:60:8a/CSM Oct 22 15:40:50 p630sles dhcpd: Sending on   LPF/eth0/00:02:55:4f:60:8a/CSM Oct 22 15:40:50 p630sles dhcpd: Sending on   Socket/fallback/fallback-net .... 

If you have left the dynamically assigned address range in the dhcpd.conf file, then every client configured to be a dhcpd client will get an address from this range. For network installations or network boot, we strongly recommend that you use statically assigned addresses in order to prevent installing servers or clients you do not intend.

 <  Day Day Up  >  


Quintero - Deploying Linux on IBM E-Server Pseries Clusters
Quintero - Deploying Linux on IBM E-Server Pseries Clusters
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net