Click to See Complete Forum and Search --> : Setting Up DCHP Server via Command Line - But no DHCP files found on 'puter..??


DJGimmik
09-06-2003, 06:38 PM
Aight...some of you may remember me posting a week or two ago about wanting to throw together a DHCP server from an old bank computer, and basically installing my own linux combination (distro - whatever)...basically doing a 'Linux From Scratch' approach. Well, it was getting very tiring/frustrating that a handful of the files would not compile (and i spent almost a week working on this - just for the record). So I broke down and just tried installing RH8 - text line, then I tried Mandrake 9.0 text line (i tried GUI with Mandrake, but it got hung up towards the end - but the command line still works).

Neither one of these installs contains the DHCP files required to run DHCP. I tried copying a handful of files over from my current RH8 server and adjusting them as needed, but it still would not work.

How was I able to get all the DHCP files installed on my current server, but not once on my lil project box with either distros?? (unless anyone knows the answer - don't worry about this one, 'cause it's semi-rhetorical .. but if ya know, please share!) :D

My main question is this: Is there a way to build all the necessary DHCP files from scratch? (or copied from another computer, downloaded, whatever) and still get this thing to run?? I mean, I know the basics of writing the dhcpd.conf file - obviously (cause i have DHCP runnin' off of a RH8 machine right now - along with SMB).

Any help / advice with this would be greatly appreciated! I spend several hours last night (till about 5am this morning) workin' on that dumb computer - mostly just installing RH/Mandrake. BTW- what's the shorthand for Mandrake? (MDK ?) lol just curious...

The Linux Kid
09-06-2003, 06:47 PM
Try www.rpmfind.net type dhcpd into the search box and download an rpm for your distro. Make sure that you don't download dhcpcd as that is the DHCP client. dhcpd is the server.

Hope that helps,

The Linux Kid

DJGimmik
09-06-2003, 10:12 PM
Thank you very much Linux Kid! I got the RPM installed, yadda yadda, and even got a response when i ran the: " /etc/init.d/dhcpd start " command....too bad the command gave me an error "on line 3"

The following is what was displayed on the screen after initiating the start command:

Starting dhcpd: /etc/dhcpd.conf line 3: expecting a parameter or declaration.
ddns-update-style
^

Configuration file errors encountered -- exiting
exiting.

Here is my dhcpd.conf file:

# A simple /etc/dhcpd.conf file.

ddns-update-style ad-hoc;

default-lease-time 720;
max-lease-time 86400;

subnet 192.168.0.0 netmask 255.255.255.0 {

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name "gimmikweb.home";

range 192.168.0.11 192.168.0.20;
}

I used pieces of examples from that big "SAMBA UNLEASHED" book (a good couple years old by now I believe). I'll keep working on this lil problem (and most likely reinstall RH8 on that PC) - if you can help me fix this one, that'd be great!

BTW - I'm guessing that it might have something to do with DNS - based on the error...dunno tho (no, i'm not trying to do anything more than just run the DHCP).

Thanks again!

Gertrude
09-07-2003, 02:52 PM
This is part of mine, you should be able to just copy and paste this into yours and it should work. Just comment out what you have now, and change your DNS server to what your ISP uses.

ddns-update-style none;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.250;
option domain-name-servers 68.168.224.162, 68.168.224.165;
option domain-name "Cows.Moo.BeeF";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 6000;
max-lease-time 7200;
}

DJGimmik
09-08-2003, 09:26 PM
Gertrude - Thank you very much for the xtra .conf file to look at / use :) Tho, I did not need it, it's still appreciated.

I went ahead and re-installed RH8 like I said (tried to supply a gui - but the PC wouldn't recognize the video port or something *shrugs*). Anyway....this time around when installing everything (via text mode), I cam across, i think it was: dhcpd-devel or something like that. Anywho...I went ahead and installed that package, and towards the end of the install the setup program checks dependencies of all the files you selected to install - well sure enough this file i chose (dhcpd-devel .. whatever) required, you guessed it "dhcpd" - so there it went. Don't know how I missed all this before, don't know why it worked this time around...but it did. DHCP is finally up and running.

Just as a side note; that lil PC i installed this on, is
a "whiney lil b**tch" ;) seriously...the whining from
it is horrible (it's just at the right pitch to be obnoxious
if there is nothing else on in the room :(