Click to See Complete Forum and Search --> : Running DHCPd on startup
Jeepsta
12-03-2000, 08:23 PM
I just finished with the configuration of my server running Mandrake 7.2. I followed the tutorial at www.fandelem.com/nhf.html (http://www.fandelem.com/nhf.html) and added the command to start dhcpd when the server starts but it doesnt run. I copied the file to /usr/bin and just have dhcpd in the rc.local file to start it. Is this the correct way to start this or is there something I am missing???
On another note...if the server were to crash would we need to restart the clients in order to obtain a good IP or is it fine like it is?
Thanx,
Zach
------------------
Its a jeep thing... You wouldn't understand.
EscapeCharacter
12-03-2000, 09:23 PM
sounds like you did it right.
as for the server crashing, why would that happen?
------------------
I like source it never *****es about dependencies
--Escchr 2000
Jeepsta
12-03-2000, 09:38 PM
The problem is that when i start the server the dhcpd server doesnt seem to like running. I guess I will use it as it is right now b/c it finally working.
In order to keep the DHCPd server happy i have to start it and then not touch it. This means that I am logged in. Does this pose a threat to the computer?? Or is it fine as is?
Thanx
Zach
------------------
Its a jeep thing... You wouldn't understand.
Fandelem
12-03-2000, 09:57 PM
"added the command to start dhcpd when the server starts but it doesn't run"
1. what is the error message bud? check /var/log/messages and cut and paste the error message.
"I copied the file to /usr/bin and just have dhcpd in the rc.local file to start it. Is this the correct way to start this?"
2. yes it is. good job :}
"if the server were to crash would we need to restart the clients in order to obtain a good IP?"
3. a couple things happen here. while the server was up, any IP address that was given, will be good for the LEASE time set in your dhcpd.conf file, regardless if your DHCP server goes down. As long as you bring up the DHCP server before that lease time expires (it keeps a dhcp.lease file that keeps track of this stuff) then you will be fine and no one will notice a thing.
regards,
~kyle
Jeepsta
12-04-2000, 12:33 PM
Well I checked the logs and it says "Bad Descriptor 0" I think that this is the problem but I dont know what it means. I changed the command to read #Start DHCPd Server
dhcpd -d and when i restarted it came into debug mode and is working just fine. I guess this is ok to do right?? However I cant log in on any virtual terminal, but I dont really need to right now. I will need to in the future so I am gonna need to figure out how to get this running right.
As far as crashing....we were dropped by RR this morning and I was forced to shut everything down to get it all straight. DHCPd worked like a charm. No client had any probs.
Thanx for the help,
Zach
------------------
Its a jeep thing... You wouldn't understand.
[This message has been edited by Jeepsta (edited 04 December 2000).]
Fandelem
12-04-2000, 12:57 PM
Does a login prompt come up? Or does it hang on the boot sequence after dhcp starts? If it is hanging, try adding a & to the end of the line, the whole thing would read: dhcpd -d & and it should work great. (the & makes it run in background mode, causing the rc.local file to continue and bringing you to a login prompt)
glad it works,
~kyle
Jeepsta
12-04-2000, 01:17 PM
How am I supposed to get to a point where I can edit the rc.local file when I cant get to a login promt?
Thanx,
Zach
------------------
Its a jeep thing... You wouldn't understand.
Fandelem
12-04-2000, 06:26 PM
kinda lengthy, but here it goes:
1.reboot your computer (ctrl+alt+del usually does a "graceful" shutdown)
2.when the LILO: prompt comes up, type linux single
3. it will go into "single user mode" - this is one reason why you should never let your linux server (pysically) be allowed by anyone who you don't trust - it bypasses all passwords and gives you a root shell.
4. once the shell prompt comes up, type pico /etc/rc.d/rc.local
5. make the change as I talked about above (adding the &)
6. type reboot and then just type linux at the LILO: prompt (or whatever you have setup to boot linux up *normally*.
regards,
~kyle
Jeepsta
12-04-2000, 08:01 PM
Thanx for the explaination...I was a little confused on the way to fix it. I will try it later when the clients arent in need of it.
On a side note-->ctrl+alt+del does not do a graceful shutdown in this situation. It says something about not being able to shut down b/c there is no user logged in. The only option that I know of is the power switch.
Thanx,
Zach
------------------
Its a jeep thing... You wouldn't understand.
Jeepsta
12-04-2000, 10:40 PM
Thanx for all the help Kyle. Its running strong now.
zach
------------------
Its a jeep thing... You wouldn't understand.