[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 192.168.0.0 netmask 255.255.255.0 {
# Default gateway router
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain_name here";
option domain-name "domain_name here";
option domain-name-servers 192.168.0.100;
# My GMT Time Offset EST!
option time-offset -5;
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# 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 192.168.0.128 192.168.0.254;
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 10.2.7.3;
}
# I'm handing out fixed addresses and host names for the following mac
addresses.
host machine_name here {
hardware ethernet 00:80:5f:1d:57:47;
fixed-address 192.168.0.2;
}
# This one here has the Option Host Name to add.
host machine_name_here {
hardware ethernet 00:50:8b:d3:f9:ed;
fixed-address 192.168.0.30;
option host-name "client_name_here";
}
host machine_name_here {
hardware ethernet 00:50:8b:e1:5d:dc;
fixed-address 192.168.0.31;
option host-name "host_name_here";
option subnet-mask 255.255.255.0;
}
More information about the CentOS
mailing list