[CentOS] DHCP static hosts and subnet configuration

John jses27 at gmail.com
Thu Oct 16 06:02:22 UTC 2008

>This I am not sure can be done with dhcpd. However you can specify NIC to
> fixed static addys and the nic harware address in the dhcp.conf file.

>How does that work?

JohnStanley Writes:
This is what I am talking about at the end of the ".conf" file below. That
is what you are trying or wantting to accomplish?  This is actualy a
confiuration I use. In all respect I have a question for you.... Are you
wantting to try this solution because you cant access another subnet? If now
you are then you need to have a look at your routing tables in your routers
or vlan configuration on your switches. That's just question or two I could
be wrong.

subnet netmask {
# Default gateway router
	option routers;
	option subnet-mask;

	option nis-domain		"domain_name here";
	option domain-name		"domain_name here";
	option domain-name-servers;

# My GMT Time Offset EST!
	option time-offset		-5;	
#	option ntp-servers;
#	option netbios-name-servers;
# Selects point-to-point node (default is hybrid). Don't change this unless
# you understand Netbios very well
#	option netbios-node-type 2;

# Dhcpd server will give out addresses between 128 and 254. 255 is Broadcast
don't forget.
	range dynamic-bootp;
	default-lease-time 21600;
	max-lease-time 43200;

# Next here is the kickstarts getting pulled in.
# machine_name_here:/kickstarts/ks.cfg is the nfs share 
# For a kickstart confgiuration file
#	filename "/kickstarts/ks.cfg";
#	next-server;

# I'm handing out fixed addresses and host names for the following mac

host machine_name here {
	hardware ethernet 00:80:5f:1d:57:47;

# This one here has the Option Host Name to add.

host machine_name_here { 
	hardware ethernet 00:50:8b:d3:f9:ed; 
	option host-name "client_name_here";
host machine_name_here { 
	hardware ethernet 00:50:8b:e1:5d:dc; 
	option host-name "host_name_here";
        option subnet-mask;

More information about the CentOS mailing list