1. Install dhcp server
Notes:
1. On client system /var/lib/dhclient/dhclient-eth0.leases file contains dhcp lease information. On server /var/lib/dhcpd/dhcpd.leases contains the lease information for all clients.
2. NTP details can be given outside the subnet options to make globally available. For more information use ‘man dhcpd.conf’ command.
yum –y install dhcp2. Copy the sample configuration file to /etc
cp -v /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf3. Edit the dhcp configuration file /etc/dhcpd.conf as our network details. Also do the following
# range dynamic-bootp 192.168.0.128 192.168.0.254; (comment this line and add as below)4. Start dhcp server
range 192.168.1.150 192.168.1.200;
note: If we dont want specific ip assignments for the hosts (reservation), comment that lines.
service dhcpd start5. If we want to configure reservations for a system do as following in the /etc/dhcpd.conf file
chkconfig dhcpd on
host xp1 {6. Restart the service to make the changes to effect
hardware ethernet 00:0C:29:0C:55:83;
fixed-address 192.168.1.170;
}
note : Optional 'option-*' are supported between host { } block
service dhcpd restart7. Done!!
Notes:
1. On client system /var/lib/dhclient/dhclient-eth0.leases file contains dhcp lease information. On server /var/lib/dhcpd/dhcpd.leases contains the lease information for all clients.
2. NTP details can be given outside the subnet options to make globally available. For more information use ‘man dhcpd.conf’ command.
No comments:
Post a Comment