If you’re ever trying to get dhcp to work in Linux, and the package you installed also installed a service file named dhcp at /etc/init.d/dhcp, ignore it.
You start the service not by invoking that script (which will apparently fail every time); you do so by running /usr/bin/dhcpd. Why? I don’t have any earthly idea.
Anyway, I hope to spare someone this anguish that I now know far too well. Skip the silliness and just start dhcpd.
tcpdump Primerlsof Primerfind and xargstr Command
What flavor of linux?
Does the script produce any output? Are there logs in /var/log/syslog or /var/log/messages?
What output do you get if you run “sh -x /etc/init.d/dhcp”?
And.. umm… my fuzzy recollection suggests that /etc/init.d/dhcp may well be intented to start a dhcp client - is there possibly an /etc/init.d/dhcpd or etc/init.d/dhcp3d script as well?
Comment by Zhasper — 4/5/2006 @ 2:33 am
Flavors were both Gentoo and Fedora.
The script produced no output that I could find, other than saying “failed”.
I never tried that command.
Well, my understanding was that dhcpcd was the dhcp client, but only one script was installed in /etc/init.d/ and it was dhcp. There were no additional dhcp* scripts in there, like for the server side. That’s what tripped me out.
The command to start the daemon was /usr/bin/dhcpd.
Comment by Daniel — 4/5/2006 @ 8:39 am
After having had overnight to stew on this, I want to semi-apologize for my original question.
Someone, possibly you, had a rant on their blog a while back about people asking questions such as mine in response to posts such as yours, and how annoying it is. If you’d wanted help, or a solution, you’d have asked for it - you were just venting, and suggestions such as mine are just annoying..
I should have been more clear in my original post. dhcpd is one of my own personal bugbears - every time I try to set it up, there always seems to be some little inexplicable thing that stops it from working until, magically, it just starts, and I’m never really sure why. I was actually asking for my own reference, in case it helps me next time I have to set it up, not intending to offer suggestions to you..
You’re right though, dhcpcd is the client daemon :)
Comment by Zhasper — 4/5/2006 @ 5:11 pm
Nonesense about being offensive; I knew from your previous comments here that you were sort of problem solving and trying to help. No worries.
Plus, it’s often important to ask questions when answering them. Especially for those who don’t understand the basics of looking at logs, error messages, etc. I don’t usually fall into that category, but still — asking questions is a good technique when done right (you did it right).
Anyway, no harm done. I enjoy your posts here and you should drop me an email if you want to chat more anytime.
Comment by Daniel — 4/5/2006 @ 5:41 pm