starting dhcp server

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

starting dhcp server

Postby area47 » Tue Jan 22, 2013 4:24 am

Hi guys, Long time Linux noob, short time user.

I'm using webmin (yeah, I'm a windows user) to configure dhcp server. when I try to start it this is the error I am presented with;

Failed to start dhcpd :
sh: /etc/rc.d/dhcpd: No such file or directory

Is this the executable? In the module configuration can I just point to where it is? If so, how would I go about finding it? I don't want to start randomly moving and coping files.
area47
 
Posts: 7
Joined: Sat Jan 19, 2013 5:32 am

Re: starting dhcp server

Postby pepedog » Tue Jan 22, 2013 9:34 am

Probably it's this
systemctl start dhcpd
If you don't actually need dhcpd you might consider dnsmasq. I'm a convert
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: starting dhcp server

Postby area47 » Tue Jan 22, 2013 10:20 pm

Thank you pepedog for responding.

If I were to copy that command, where would I paste it so that every time I reboot it would start the dhcp server. Please, please keep in mind I'm using Webmin, the only reason I've been able to get this far.

Thank you
area47
 
Posts: 7
Joined: Sat Jan 19, 2013 5:32 am

Re: starting dhcp server

Postby pepedog » Tue Jan 22, 2013 10:45 pm

This command will start it on boot
systemctl enable dhcpd
Guess what you type to disable on boot?

Although dnsmasq is easier to setup
https://wiki.archlinux.org/index.php/Dnsmasq
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: starting dhcp server

Postby area47 » Wed Jan 23, 2013 6:57 am

Hi,

I appreciate your rah rah for DNSMasq but it has taken me close to a month and 3 or 4 re-installs to get to this point and the thought of having to start over again is very depressing, especially when it seems I'm so close.

I tried your command and was greeted by the same result as in my first post. I have searched for over an hour for dhcpd file, (I'm assuming it's a file) and these are my results.

/etc/dhcpd.conf
/usr/sbin/dhcpd
/usr/share/man/man8/dhcpd.8.gz

The first one I created through webmin
The second one when I open it in an editor contains this; ELF
The third one, even if that was it, I have no idea what to do with it.

I feel the need to say this is very frustrating.
area47
 
Posts: 7
Joined: Sat Jan 19, 2013 5:32 am

Re: starting dhcp server

Postby pepedog » Wed Jan 23, 2013 10:14 am

Best start from basics
What are you trying to achieve?
What extra interfaces do you have, ethernet or wireless?
What ranges do you want allocated?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: starting dhcp server

Postby area47 » Wed Jan 23, 2013 7:56 pm

There is no webmin module for DNSMasq so I have no hope in hell of getting anything useful out DNSMasq.

I want an IP server for a private network

$this->bbcode_second_pass_code('', '
# dhcp.worx dhcpd.conf file

subnet 192.168.10.10 netmask 255.255.255.0 {
deny client-updates;
allow unknown-clients;
max-lease-time 432000;
default-lease-time 259200;
authoritative;
server-name "dhcp.worx";
range 192.168.10.10 192.168.10.40;
}
# All the things of this world.
host brewbox {
hardware ethernet 00:25:90:79:90:52;
fixed-address 192.168.10.35;
}
# Stills and animation creation.
host anamatic {
hardware ethernet 6C:62:6D:6F:3F:BD;
}
# Administration . . . .
host admin {
hardware ethernet F8:0F:41:41:B9:D1;
}
')

I would gladly walk through mordor in bare feet to get what ever /etc/rc.d/dhcpd is
area47
 
Posts: 7
Joined: Sat Jan 19, 2013 5:32 am

Re: starting dhcp server

Postby pepedog » Wed Jan 23, 2013 8:33 pm

In webmin
Other
Command shell
/usr/bin/systemctl enable dhcpd4

I thought you had to state in config which interface (eg eth0) gave out addresses?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: starting dhcp server

Postby area47 » Wed Jan 23, 2013 11:33 pm

Found this potentially helpful page though, I don't understand half of it:

http://tldp.org/HOWTO/DHCP/x369.html#AEN422 ("Starting the server" is near the bottom)

$this->bbcode_second_pass_quote('', 'I') thought you had to state in config which interface (eg eth0) gave out addresses?


My understanding also, and the webmin blank is filled in (eth0) though the sample from the above page link does not have it either.

Also, as suggested on the above page link when I /usr/sbin/dhcpd I get;

$this->bbcode_second_pass_quote('', '
')/etc/dhcpd.conf line 3: subnet 192.168.10.10 netmask 255.255.255.0: bad subnet number/mask combination.
subnet 192.168.10.10 netmask 255.255.255.0
^
Configuration file errors encountered -- exiting


Something seems to have a problem with the last zero, not sure what's more appropriate this :x or :roll:
area47
 
Posts: 7
Joined: Sat Jan 19, 2013 5:32 am

Re: starting dhcp server

Postby pepedog » Thu Jan 24, 2013 12:04 am

I'm not going to debug further, it will spoil your fun
Curley bracket in wrong place
You forgot some fixed ip addresses
$this->bbcode_second_pass_code('', '# dhcp.worx dhcpd.conf file

subnet 192.168.10.10 netmask 255.255.255.0 {
deny client-updates;
allow unknown-clients;
max-lease-time 432000;
default-lease-time 259200;
authoritative;
server-name "dhcp.worx";
range 192.168.10.10 192.168.10.40;

# All the things of this world.
host brewbox {
hardware ethernet 00:25:90:79:90:52;
fixed-address 192.168.10.35;
}
# Stills and animation creation.
host anamatic {
hardware ethernet 6C:62:6D:6F:3F:BD;
fixed-address 192.168.10.youforgotaddress;
}
# Administration . . . .
host admin {
hardware ethernet F8:0F:41:41:B9:D1;
fixed-address 192.168.10.youforgotaddress;
}
}')
I tell ye now, dnsmasq so easy
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 2 guests