[Dnsmasq-discuss] Dnsmasq not answering DHCP requests

richardvoigt at gmail.com richardvoigt at gmail.com
Sun Feb 7 07:07:06 GMT 2010


On Sat, Feb 6, 2010 at 4:21 PM, Robert Pollai <rap.nospam2 at gmx.net> wrote:
> Hi Richard,
>
>> This sounds as if some other DNS and DHCP server programs are running.
>> Or perhaps dnsmasq is running and owns the ports, but is reading from
>> a different configuration file (path can be specified on the
>> command-line, there's also a compiled-in default).
>
> I verified that when I stop dnsmasq, the ports disappear from netstat -l. When I start dnsmasq they come back. So it looks like dnsmasq has them.
>
> I start it via the following command in a script:
>
> /volume1/@appstore/dnsmasq/bin/dnsmasq -C /volume1/@appstore/dnsmasq/etc/dnsmasq.conf
>
> For testing purposes I now added logging:
>
> /volume1/@appstore/dnsmasq/bin/dnsmasq -C /volume1/@appstore/dnsmasq/etc/dnsmasq.conf --log-facility=/volume1/@appstore/dnsmasq/log/dnsmasq.log --log-dhcp
>
> I get the following output:
>
> Feb  6 23:13:08 dnsmasq[17719]: started, version 2.52 cachesize 150
> Feb  6 23:13:08 dnsmasq[17719]: compile time options: IPv6 GNU-getopt no-DBus no-I18N DHCP TFTP
> Feb  6 23:13:08 dnsmasq-dhcp[17719]: DHCP, IP range 192.168.0.100 -- 192.168.0.150, lease time 12h
> Feb  6 23:13:08 dnsmasq[17719]: using nameserver 195.202.128.2#53
> Feb  6 23:13:08 dnsmasq[17719]: using nameserver 195.202.128.3#53
> Feb  6 23:13:08 dnsmasq[17719]: using nameserver 62.40.128.2#53
> Feb  6 23:13:08 dnsmasq[17719]: read /etc/hosts - 2 addresses
>
> This shows that it reads the correct config file (it has DHCP and the name servers).
>
> Still, when I start "ipconfig /renew" on a Windows client after disabling the DHCP server in the router the request times out. I already put in dhcp-authoritative in the config file to get dnsmasq to take over everything from the old DHCP server immediately.

Oh, that might be the problem.  Try ipconfig /release and then
ipconfig /renew.  If you don't release the lease, the old lease is
still valid and Windows will unicast renewal requests and not go
looking for a new server.  If you first release the old lease then it
will broadcast and get a lease from any available server.

>
> So right now I am a bit clueless. I will leave the DHCP in the router switched of and dnsmasq running overnight, maybe the client needs more time to realize that the old DHCP server is gone.
>
> Of course any further advise is greatly appreciated.
>
> Kind regards, Robert
>
> -------- Original-Nachricht --------
>> Datum: Sat, 6 Feb 2010 11:35:54 -0600
>> Von: "richardvoigt at gmail.com" <richardvoigt at gmail.com>
>> An: Robert Pollai <robert.pollai at gmx.at>
>> CC: dnsmasq-discuss at lists.thekelleys.org.uk
>> Betreff: Re: [Dnsmasq-discuss] Dnsmasq not answering DHCP requests
>
>> On Sat, Feb 6, 2010 at 1:53 AM, Robert Pollai <robert.pollai at gmx.at>
>> wrote:
>> > Hi Richard,
>> >
>> > Thanks for your reply!
>> >
>> >> Is dnsmasq running on the router where the old DHCP software was?  A
>> >> separate computer?  Connected how to the network? (e.g. dnsmasq is
>> >> wired to the router, clients are a mix of wired and wireless)
>> >
>> > The previous DHCP server was a router appliance from Linksys. Dnsmasq
>> > I run on a NAS from Synology (DS408) with an PPC processor running
>> Linux.
>> > I compiled dnsmasq there myself. The NAS is wired to the router and all
>> > clients I tested so far are wired to the router as well.
>> >
>> >> What OS?  Could be a firewall/packet filtering issue on either the
>> >> dnsmasq computer or the router. (e.g. router firewall is configured to
>> >> accept DHCP requests but not bridge them to the rest of the network)
>> >
>> > I also tested a client that is connected directly to the NAS via a
>> switch,
>> > So there is no firewall between. The firewall on the NAS is disabled.
>> >
>> >> Make sure that dnsmasq owns port 67 on its machine by running "netstat
>> >> -l" with dnsmasq running and again with dnsmasq stopped.
>> >
>> > I did that and dnsmasq has port 67 (shown as "bootps") and also 53
>> (shown
>> > as "domain") for DNS. I tested DNS and it works for machines I have in
>> my
>> > /etc/hosts (after I commented no-hosts out of the config file). The DNS
>> > does not work for the names I put in via the dhcp-host entries.
>>
>> This sounds as if some other DNS and DHCP server programs are running.
>>  Or perhaps dnsmasq is running and owns the ports, but is reading from
>> a different configuration file (path can be specified on the
>> command-line, there's also a compiled-in default).
>>
>> How are you starting dnsmasq?  Does it behave differently if you run
>> it from a root command-line instead of through init scripts?
>>
>> >
>> > Kind regards, Robert
>> >
>> > -----Original Message-----
>> > From: richardvoigt at gmail.com [mailto:richardvoigt at gmail.com]
>> > Sent: 05 February 2010 23:47
>> > To: rap.nospam2 at gmx.net
>> > Cc: dnsmasq-discuss at lists.thekelleys.org.uk
>> > Subject: Re: [Dnsmasq-discuss] Dnsmasq not answering DHCP requests
>> >
>> > On Fri, Feb 5, 2010 at 3:24 PM,  <rap.nospam2 at gmx.net> wrote:
>> >> Hi,
>> >>
>> >> I am new to dnsmasq and want to replace my routers DHCP with it. So I
>> just tried to create my first setup but unfortunately it seems that dnsmasq
>> is not answering DHCP requests, my clients requests are timing out.
>> >>
>> >> I would appreciate any hints on what I could have done wrong or
>> generally on how to approach/debug the issue.
>> >
>> > Is dnsmasq running on the router where the old DHCP software was?  A
>> > separate computer?  Connected how to the network? (e.g. dnsmasq is
>> > wired to the router, clients are a mix of wired and wireless)
>> >
>> > What OS?  Could be a firewall/packet filtering issue on either the
>> > dnsmasq computer or the router. (e.g. router firewall is configured to
>> > accept DHCP requests but not bridge them to the rest of the network)
>> >
>> > Make sure that dnsmasq owns port 67 on its machine by running "netstat
>> > -l" with dnsmasq running and again with dnsmasq stopped.
>> >
>> >>
>> >> Here is my config file:
>> >>
>> >> - file start -
>> >>
>> >> # Configuration file for dnsmasq.
>> >> #
>> >>
>> >> dhcp-range=192.168.0.100,192.168.0.150,12h
>> >> dhcp-leasefile=/var/packages/dnsmasq/target/leases/dnsmasq.leases
>> >> dhcp-authoritative
>> >>
>> >> no-resolv
>> >> no-hosts
>> >>
>> >> server=(ip deleted)
>> >> server=(ip deleted)
>> >> server=(ip deleted)
>> >>
>> >> dhcp-option=option:router,192.168.0.1
>> >>
>> >> dhcp-host=(mac deleted),adam,192.168.0.100
>> >> dhcp-host=(mac deleted),eva,192.168.0.101
>> >>
>> >> - file end -
>> >>
>> >> Kind regards, Robert
>> >>
>> >> _______________________________________________
>> >> Dnsmasq-discuss mailing list
>> >> Dnsmasq-discuss at lists.thekelleys.org.uk
>> >> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>> >>
>> >
>> >
>> >
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



More information about the Dnsmasq-discuss mailing list