I have dhcp3-server installed and configured, but I have to manually start the service every time the computer restarts. How can I make it start automatically on startup? I don't see a dhcp*.conf in /etc/init
, and I have the correct interface specified in /etc/default/dhcp3-server
2 Answers
If andrewsomething is right you may want to check if the service is added to the system bootup run this
sudo update-rc.d dhcp3-server defaults
I think I originally asked this question about Ubuntu 10.04 LTS and it was fixed at some point (I think 10.04.4), but after upgrading to 12.04 LTS I started having this same issue again! I found a fix for it and just wanted to post an update with what I had to do.
The trick was to edit the init file. Change the "start on..." line. Add the following to the end of the line:
and net-device-up IFACE=<your DHCP server IP>
So my my "start on" line looks like this now:
start on runlevel [2345] and net-device-up IFACFE=eth1
The problem was that the dhcp server was trying to start before eth1 was ready. This makes it wait until eth1 is up and ready before trying to start the dhcp server.
sudo service dhcp3-server start
? If you're asked to check syslog, what does it say?