starting dhcp failed
I am novice at linux...I installed VMware work station and then install centos 6.4. Now I followed this tutorial to configure DHCP Server on my OS http://tecadmin.net/configuring-dhcp...centos-redhat/
but when start dhcp I see this : Starting dhcpd:[FAILED] This is my /etc/dhcp/dhcpd.conf option domain-name "center.local"; option domain-name-servers master.center.local; default-lease-time 600; max-lease-time 7200; authoritative; log-facility local7; subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; option subnet-mask 255.255.255.0; option domain-search "center.local"; option domain-name-servers 192.168.1.100; option time-offset -18000; # Eastern Standard Time range 192.168.1.100 192.168.1.120; } host station1 { option host-name "centos-1.center.local"; hardware ethernet 00:11:1A:2B:3C:AB; fixed-address 192.168.1.101; } so what is wrong?Any suggestion? Thanks for your help and sorry for my bad English grammar :) |
Look in /var/log/messages for messages from dhcpd. The specific complaint should be there.
|
This is the output of /var/log/message
Jan 22 12:54:39 localhost named-sdb[39467]: managed-keys-zone ./IN: Unable to fetch DNSKEY set '.': SERVFAIL Jan 22 13:24:16 localhost dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1 Jan 22 13:24:16 localhost dhcpd: Copyright 2004-2010 Internet Systems Consortium. Jan 22 13:24:16 localhost dhcpd: All rights reserved. Jan 22 13:24:16 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/ Jan 22 13:24:16 localhost dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Jan 22 13:24:16 localhost dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1 Jan 22 13:24:16 localhost dhcpd: Copyright 2004-2010 Internet Systems Consortium. Jan 22 13:24:16 localhost dhcpd: All rights reserved. Jan 22 13:24:16 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/ Jan 22 13:24:16 localhost dhcpd: Can't chown new lease file: Operation not permitted Jan 22 13:24:16 localhost dhcpd: Jan 22 13:24:16 localhost dhcpd: This version of ISC DHCP is based on the release available Jan 22 13:24:16 localhost dhcpd: on ftp.isc.org. Features have been added and other changes Jan 22 13:24:16 localhost dhcpd: have been made to the base software release in order to make Jan 22 13:24:16 localhost dhcpd: it work better with this distribution. Jan 22 13:24:16 localhost dhcpd: Jan 22 13:24:16 localhost dhcpd: Please report for this software via the CentOS Bugs Database: Jan 22 13:24:16 localhost dhcpd: http://bugs.centos.org/ Jan 22 13:24:16 localhost dhcpd: Jan 22 13:24:16 localhost dhcpd: exiting. |
I think you should really install Centos 6.6. I've heard that 6.4 is not supported and there might be all sorts of unexpected problems with it. I'd suggest you do a fresh installation.
|
in doing dhcp the most common thing is to set wrong or forget to the dhcargs wrong. i would double check that and make sure you got that right.
secondly, you did not copy and paste your file did you? if so the second most common mistake is putting a : instead of a ;. it is very hard to spot the difference. ...nevermind, it is right here. Can't chown new lease file: Operation not permitted you need to be able to create a dhcpd.leases file and it cannot probably by selinux or hte file does not exist. look where your dhpcd.leases file shoudl be and do something like touch [location]/dhcpd.leases you need to create that file. it probably is /var/lib/dhcpd/dhcpd.leases. |
What does "ls -la /var/lib/dhcpd" show?
|
and reinstall with 6.6
or if you get outside access to the net from within the VM you have to create a bridge first in the VMware player for Cent to use then upgrade to 6.6 you will need to MANUALLY point the repo files to point to the historical archive the DEFAULT settings for the location is NOW DEAD you have to manually set them to "the vault " update to the very last update for 6.4 then upgrade the os to 6.6 -- a lot of work It is much easier to install using CentOS 6.6 |
Quote:
FWIW, Scientific Linux works the opposite. You have to tell the updater to advance to a new point release. (Scientific Linux does continue to provide security updates for the older point releases.) |
This is the content of my /var/lib/dhcpd/
There id dhcpd.lease So what is wrong? Any suggestion? [root@localhost lib]# cd /var/lib/dhcpd/ [root@localhost dhcpd]# ls -la total 8 drwxr-xr-x. 2 dhcpd dhcpd 4096 Jan 24 01:55 . drwxr-xr-x. 34 root root 4096 Jan 22 08:57 .. -rw-r--r--. 1 dhcpd dhcpd 0 Oct 16 07:42 dhcpd6.leases -rw-r--r--. 1 dhcpd dhcpd 0 Oct 16 07:42 dhcpd.leases -rw-r--r--. 1 root root 0 Jan 22 12:40 dhcpd.leases.1421959200 -rw-r--r--. 1 root root 0 Jan 22 13:24 dhcpd.leases.1421961856 -rw-r--r--. 1 root root 0 Jan 24 01:55 dhcpd.leases.1422093315 |
i would chmod 755 your file dhcpd.leases and see if that works. in your error it says that there is a problem with that/those files but mine are set similarily.
secondly in looking closer at your log file there is a dns issue too. i would try using a known working dns that doesnt have an issue like your isps, googles or nortons. Jan 22 12:54:39 localhost named-sdb[39467]: managed-keys-zone ./IN: Unable to fetch DNSKEY set '.': SERVFAIL |
I solved this problem by disabling selinux.
This happened to me after upgrading my dhcp server from centos 6.4 to 6.6. After update the Selinux status was enforcing. I made it disabled and dhcp server restarted automaticaly at startup. |
All times are GMT -5. The time now is 10:33 PM. |