Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The good: I got tired of my Belkin router switching around IP addresses. So I downloaded DHCPD (Dynamic Host Configuration Protocol Daemon) from the Internet Systems Consortium, http://www.isc.org/sw/dhcp/. It built without a hitch (./configure; make; sudo make install) and runs well. I can tie "static" IPs to our 5 MAC addresses. BTW, the machine is on FC2, so yum dried up.
The ugly: The usual setup has a script /etc/init.d/dhcpd, symlinked into the appropriate runlevels. This makes dhcpd start at boot time, and simplifies administration. That part wasn't set up by "make install". (I have to start (/usr/sbin/)dhcpd manually after a reboot.)
I looked through the directory tree, and see it only in one place: contrib/dhcp.spec looks like a RPM specification, and it supports only Solaris. I could try contrib/solaris.init and maybe adapt it. But I wonder how everyone else does this. Searched LQ and Google, no luck.
Hoping Networking is the right category -- DHCP(D) isn't explicitly listed in the guidelines. Thanks for any advice or other insights!
Hi contusion, thanks for the link. While I like daemontools, I was looking for the /etc/init.d style script, which is the usual way to control services under Fedora Core, Ubuntu, Solaris, and probably a few others.
E.g., dhcp-3.1.0/contrib/solaris.init looks like this (and would get installed as /etc/init.d/dhcpd):
Code:
#!/bin/sh
# Contributed by Brian Murrell
state=$1
set `who -r`
case $state in
'start')
if [ $9 = "2" -o $9 = "3" ]
then
exit
fi
if [ -f @PREFIX@/sbin/dhcpd ]; then
echo "Starting the ISC DHCP server"
@PREFIX@/sbin/dhcpd
fi
;;
'stop')
if [ -f @PREFIX@/etc/dhcpd.pid ]; then
PID=`cat @PREFIX@/etc/dhcpd.pid`
if [ -d /proc/$PID ]; then
echo "Stopping the ISC DHCP server"
kill $PID
fi
fi
;;
esac
In my case it's /usr/sbin/dhcpd and /var/run/dhcpd.pid. And my runlevels might differ.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.