Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed dhcp3-server in ubuntu server 11.04

apt-get install dhcp3-server

However, an error message during installation:

Traitement des actions différées (« triggers ») pour « man-db »...
Traitement des actions différées (« triggers ») pour « ureadahead »...
Paramétrage de isc-dhcp-server (4.1.1-P1-15ubuntu9.1) ...
Generating /etc/default/isc-dhcp-server...
* Starting ISC DHCP server dhcpd                                           
* check syslog for diagnostics                                   [fail]
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Paramétrage de dhcp3-server (4.1.1-P1-15ubuntu9.1) ...

tail -f /var/log/syslog says:

Sep  2 03:29:20 srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Sep  2 03:29:20 srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Sep  2 03:29:20 srv dhcpd: All rights reserved.
Sep  2 03:29:20 srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Sep  2 03:29:20 srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Sep  2 03:29:20 srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Sep  2 03:29:20 srv dhcpd: All rights reserved.
Sep  2 03:29:20 srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Sep  2 03:29:20 srv dhcpd: Wrote 0 leases to leases file.
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: No subnet declaration for eth0 (192.168.1.1).
Sep  2 03:29:20 srv dhcpd: ** Ignoring requests on eth0.  If this is not what
Sep  2 03:29:20 srv dhcpd:    you want, please write a subnet declaration
Sep  2 03:29:20 srv dhcpd:    in your dhcpd.conf file for the network segment
Sep  2 03:29:20 srv dhcpd:    to which interface eth0 is attached. **
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: Not configured to listen on any interfaces!
Sep  2 03:29:23 srv kernel: [ 1625.286737] type=1400 audit(1314930563.298:18)            apparmor="STATUS" operation="profile_replace" name="/usr/sbin/dhcpd" pid=2045     comm="apparmor_parser"

when I want access to the file /etc/dhcp3/dhcpd.conf I can not find it but the package dhcp-server is installed.

  root@srv:/etc/dhcp3#ls -l
  total 4 drwxr-xr-x 2 root root 4096 2011-09-01 06:42 dhclient-enter-hooks.d
share|improve this question
    
Does the file exist, and are you running as a user that has access to it? Run ls -l /etc/dhcp3/dhcpd.conf. –  Shane Madden Sep 2 '11 at 4:18
    
root@srv:/etc/dhcp3# ls -l total 4 drwxr-xr-x 2 root root 4096 2011-09-01 06:42 dhclient-enter-hooks.d –  tmedtcom Sep 2 '11 at 4:21
    
ls -l total 20 -rw-r--r-- 1 root root 1716 2011-04-19 15:53 dhclient.conf drwxr-xr-x 2 root root 4096 2011-09-01 06:41 dhclient-enter-hooks.d drwxr-xr-x 2 root root 4096 2011-09-01 06:41 dhclient-exit-hooks.d -rw-r--r-- 1 root root 3602 2011-08-11 16:47 dhcpd.conf -rw-r--r-- 1 root root 3606 2011-09-02 02:59 dhcpd.conf.save –  tmedtcom Sep 2 '11 at 4:22
    
but the directory is not DHCP this is DHCP3 : –  tmedtcom Sep 2 '11 at 4:28
    
root@srv:/etc/dhcp3# ls -l total 4 drwxr-xr-x 2 root root 4096 2011-09-01 06:42 dhclient-enter-hooks.d –  tmedtcom Sep 2 '11 at 4:28
show 1 more comment

4 Answers

Your dhcpd is complaining, that it did not find configuration for any network, so it has noting to do. Therefore, instead of wasting memory and CPU cycles of your box, it quit.

You need to create configuration file for the daemon. I'm not familiar with Ubuntu, but usually dhcpd package includes an example file. Run updatedb and then locate dhcpd.conf to find this example file (could be named dhcpd.conf.sample). If you do not find it, there's man dhcpd.conf or examples in the net, e.g. here: Ch08:_Configuring_the_DHCP_Server">http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:Ch08:_Configuring_the_DHCP_Server

share|improve this answer
    
I tried as you said, but even the DHCPD service in "/ etc / init.d /" does not exist! are there other solutions?? –  tmedtcom Sep 3 '11 at 18:27
    
invoke-rc.d: initscript isc-dhcp-server -- find isc-dhcp-server (use locate isc-dhcp-server) and see what the script calls. Do the required files exist? Are the permissions correct? I do not know Ubuntu's packet manager, but it should be able to verify that the package was correctly installed and has no files missing. Check that. –  Paweł Brodacki Sep 4 '11 at 9:55
add comment

Looks like the file doesn't exist - but it's definitely installed by the package.

Try a dpkg -i --force-confmiss /var/cache/apt/archives/dhcp3-server*.deb?

Once you've got your config file back in place, you'll need to configure the DHCP server via that file before it'll successfully start; the error that you saw on the initial install is normal and to be expected.

share|improve this answer
    
pkg -i --force-confmiss /var/cache/apt/archives/dhcp3-server_4.1.1-P1-15ubuntu9.1_all.deb Sélection du paquet dhcp3-server précédemment désélectionné. (Lecture de la base de données... 167634 fichiers et répertoires déjà installés.) Dépaquetage de dhcp3-server (à partir de .../dhcp3-server_4.1.1-P1-15ubuntu9.1_all.deb) ... Paramétrage de dhcp3-server (4.1.1-P1-15ubuntu9.1) ... ###same thing in / etc/dhcp3 / no dhcpd.conf file. and service dhcpd / etc / init.d / –  tmedtcom Sep 3 '11 at 18:33
add comment

Try removing dhcp3-server first

# apt-get remove dhcp3-server && apt-get purge dhcp3-server

Then re-install dhcp3-server after running an update of your repository

# apt-get update && apt-get install dhcp3-server

If this doesn't work I can share you my dhcpd.conf and you can add it onto /etc/dhcp3

share|improve this answer
    
idem , I tried that too:-( –  tmedtcom Sep 4 '11 at 21:01
add comment
up vote 0 down vote accepted

I tried with debian Squeez is the same problem, after some research I found this information:

dhcp3-server package has become a transitional dummy package which depends on the "new" package isc-dhcp-server (which is version 4 of the ISC DHCP server, hence the transition). Forcing the relocation of dhcp3-server has no effect on files belonging to isc-dhcp-server, the latter need to reinstall if necessary.

According http://packages.debian.org/squeeze/i386/isc-dhcp-server/filelist, the init script of it is / etc / init.d / isc-dhcp-server, and its configuration file / etc / dhcp / dhcpd.conf.

Filelist of package isc-dhcp-server in lenny of architecture i386 :

/etc/dhcp/dhcpd.conf /etc/init.d/isc-dhcp-server /usr/sbin/dhcpd /usr/share/doc/isc-dhcp-server/NEWS.Debian.gz /usr/share/doc/isc-dhcp-server/README.Debian /usr/share/doc/isc-dhcp-server/changelog.Debian.gz /usr/share/doc/isc-dhcp-server/copyright /usr/share/doc/isc-dhcp-server/examples/dhcpd.conf /usr/share/lintian/overrides/isc-dhcp-server /usr/share/man/man5/dhcpd.conf.5.gz /usr/share/man/man5/dhcpd.leases.5.gz /usr/share/man/man8/dhcpd.8.gz

I was made ​​to test the configuration of dhcpd.conf in / etc / dhcp / re and gives you the result.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.