Check to see that the DHCP server is loaded by typing the following: rpm -qa grep dhcp You should see something like the following:
Code:
dhcp-3.0pl1-9
If not, then you will have to install it from the Redhat CD. To do this, get the Redhat CD #2. then mount the CD drive with the following commands:
Code:
mount /dev/cdrom cd /mnt/cdrom/RedHat/RPMS rpm -ivh dhcp*.rpm
Next you need to configure the DHCP server. If you are going to support Microsoft Windows based computers, you need to type the following command:
Quote:
route add -host 255.255.255.255 dev eth0
Next you need to configure your /etc/dhcpd.conf file. Below is an example of one:
Code:
# Sample /etc/dhcpd.conf ddns-update-style ad-hoc; default-lease-time 450000; max-lease-time2592000; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option domain-name-servers 204.127.160.1; option domain-name "att.net"; option netbios-name-servers 192.168.0.50; option netbios-dd-server 192.168.0.50; option netbios-node-type 8; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.10 192.168.0.40; range 192.168.0.51 192.168.0.200; }
This configuration will give out IP addesses from 192.168.0.10-192.168.0.40 or 192.168.0.51-192.168.0.200. If the client doesn't ask for a specific time frame, it will lease the ip address for 32000 seconds. If the client asks for a time frame, the maximum it will allow is 65000 seconds. It also sets up the default gateway of 192.168.0.1, the subnet mask of 255.255.255.0, the broadcast address of 192.168.0.255, and 204.127.160.1 as the DNS server (AT&T's DNS server). Next you need to create a dhcpd.leases file. You will also need to create the following path: /var/state/dhcp. Then create the file with the following command:
Code:
touch /var/state/dhcpd/dhcpd.leases
Run dhcpd in debug mode to make sure it is working properly with the following command: /usr/sbin/dhcpd -d -f. In this mode, you will be able to see the clients requesting an IP address. If everything is ok, then set the dhcpd server to start automatically with the following command: chkconfig dhcpd on. The DHCP leaese are kept in /var/lib/dhcp/dhcpd.leases