WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dnsmasq not providing dhcp  (Read 7588 times)

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
dnsmasq not providing dhcp
« on: August 11, 2011, 01:58:17 PM »
'I've tried to install dnsmasq on my TC but I can't find how to verify if its running, I don't see it in the process list  I copied the dnsmasq.conf.sample file to dnsmasq.conf in the same directory (/usr/local/etc/) and only added a line to provide an IP to one client by mac id "dhcp-host=00:0e:2e:0d:44:be,pc1,10.0.0.95,infinite". All I wanted is to have a DHCP server so I don't depend on the router to provide ip addresses to my systems.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: dnsmasq not providing dhcp
« Reply #1 on: August 11, 2011, 02:12:17 PM »
Quote
All I wanted is to have a DHCP server so I don't depend on the router to provide ip addresses to my systems.

If that is all you need, then the busybox DHCP server (udhcpd) included in the base is sufficient. A good example is provided by Jason.

If you still prefer DNSMasq, please elaborate on how you are running it.
« Last Edit: August 11, 2011, 02:13:49 PM by danielibarnes »

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #2 on: August 11, 2011, 02:43:49 PM »
I installed it with the onboot option...then created the conf file and rebooted.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: dnsmasq not providing dhcp
« Reply #3 on: August 11, 2011, 02:50:39 PM »
You also need to add the config file to /opt/.filetool.lst, and add a startup line to /opt/bootlocal.sh.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: dnsmasq not providing dhcp
« Reply #4 on: August 11, 2011, 03:08:04 PM »
For dnsmasq, the startup line is simply:

/usr/local/sbin/dnsmasq&
« Last Edit: August 11, 2011, 03:24:14 PM by danielibarnes »

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #5 on: August 11, 2011, 03:15:49 PM »
also from y understanding udhcp does not support the static IP setting for a specific MAC.

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #6 on: August 11, 2011, 03:27:56 PM »
When i rebooted the system the dnsmasq.conf disappeared from the /usr/local/etc/ directory.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: dnsmasq not providing dhcp
« Reply #7 on: August 11, 2011, 03:31:53 PM »
Hi rdsgi
You need to add the line  usr/local/etc/dnsmasq.conf  to your  /opt/.filetool.lst  file.

     [EDIT]: The line should not have a leading backslash, fixed. Sorry about that.
« Last Edit: August 11, 2011, 04:17:50 PM by Rich »

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #8 on: August 11, 2011, 04:28:28 PM »
ok now the process is up and the file stop disappearing.  but I still can't get it to set the ip on the client. How do I verify the config is good. I read about a chkconf command but it didn't work.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: dnsmasq not providing dhcp
« Reply #9 on: August 11, 2011, 04:35:07 PM »
there is dhcpcd extension in case udhcpcd fails btw

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #10 on: August 11, 2011, 04:49:09 PM »
I'm working with dnsmasq because it lets me assign a static IP to a specific MAC address  via the dhcp-host=11.22.33.44.55.66,xxx.xxx.xxx.xxx option if dhcpd ext lets me do that then point me to it...

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: dnsmasq not providing dhcp
« Reply #11 on: August 11, 2011, 06:12:04 PM »
Quote
How do I verify the config is good.
Dnsmasq can output to the syslog or run in the foreground to monitor for DHCP events.

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #12 on: August 11, 2011, 06:31:37 PM »
how can I set that up...is the syslog written by default or those the conf file need a parameter for that.  or how dose it run in foreground.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: dnsmasq not providing dhcp
« Reply #13 on: August 11, 2011, 06:57:09 PM »
Here is the man page for dnsmasq. The "-k" option keeps it in the foreground. The "-d" option states, "Debug mode: don't fork to the background, don't write a pid file, don't change user id, generate a complete cache dump on receipt on SIGUSR1, log to stderr as well as syslog, don't fork new processes to handle TCP queries."

It logs to syslog by default, at least for me.

I think your syntax is incorrect, you stated:

dhcp-host=00:0e:2e:0d:44:be,pc1,10.0.0.95,infinite

when it should be

dhcp-host=00:0e:2e:0d:44:be,10.0.0.95,pc1,infinite

From the man page:

--dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]

Offline rdsgi

  • Newbie
  • *
  • Posts: 9
Re: dnsmasq not providing dhcp
« Reply #14 on: August 17, 2011, 11:48:26 PM »
sorry I haven't been back but I was traveling.  I can't find the syslog file anywhere. where should it be. do I have to install or start a service???