Re: [Dnsmasq-discuss] Clients bypassing dnsmasq server intermittently
Do you have any dns servers hardcoded on your macbook? -Original Message- From: dnsmasq-discuss-boun...@lists.thekelleys.org.uk [mailto:dnsmasq- discuss-boun...@lists.thekelleys.org.uk] On Behalf Of g...@desgames.com Sent: Tuesday, September 28, 2010 5:14 PM To: dnsmasq-discuss@lists.thekelleys.org.uk Subject: [Dnsmasq-discuss] Clients bypassing dnsmasq server intermittently I recently set up dnsmasq on an office server and have successfully configured it to act as an office DNS server. So far it seems to work fine, the only problem being that after a while my specific computer (a macbook with OSX 10.6) sometimes starts bypassing the dnsmasq server and resolving a particular office server hostname using the real-world IP, and not the local one. I'm not sure if this is happening for any other people in the office as the server in question is not yet being accessed by anyone but me. I'm also not sure if this is happening for another other servers in the office, or just the specific one I noticed. Anyway, my dnsmasq,conf file is as follows (just the uncommented lines): expand-hosts domain=.com dhcp-range=eth1,192.168.1.100,192.168.1.200,12h dhcp-option=option:netmask,255.255.255.0 dhcp-option=option:router,192.168.1.1 dhcp-option=option:dns-server,192.168.1.25 dhcp-option=option:domain-name,.com dhcp-option=28,192.168.1.255 dhcp-option=option:domain-search,.com conf-dir=/etc/dnsmasq.d The behaviour I'm seeing is that when I try to ping or connect to dev1..com (or just dev1), it should resolve to 192.168.1.26, which it doesfor a while. However, more than once I've discovered that it's started resolving to the outside IP which is something like 24.x.x.x. The only way to fix it is to drop my wireless connection and then reconnect. FYI, I've disabled the DHCP server on the wireless router. Any idea what's happening? Thanks, Guy ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Clients bypassing dnsmasq server intermittently
No - I forgot to mention that, sorry. I only have the ip of the dnsmasq server. On Tue, Sep 28, 2010 at 3:48 PM, Don Muller d...@djmuller.com wrote: Do you have any dns servers hardcoded on your macbook? -Original Message- From: dnsmasq-discuss-boun...@lists.thekelleys.org.uk [mailto:dnsmasq- discuss-boun...@lists.thekelleys.org.uk] On Behalf Of g...@desgames.com Sent: Tuesday, September 28, 2010 5:14 PM To: dnsmasq-discuss@lists.thekelleys.org.uk Subject: [Dnsmasq-discuss] Clients bypassing dnsmasq server intermittently I recently set up dnsmasq on an office server and have successfully configured it to act as an office DNS server. So far it seems to work fine, the only problem being that after a while my specific computer (a macbook with OSX 10.6) sometimes starts bypassing the dnsmasq server and resolving a particular office server hostname using the real-world IP, and not the local one. I'm not sure if this is happening for any other people in the office as the server in question is not yet being accessed by anyone but me. I'm also not sure if this is happening for another other servers in the office, or just the specific one I noticed. Anyway, my dnsmasq,conf file is as follows (just the uncommented lines): expand-hosts domain=.com dhcp-range=eth1,192.168.1.100,192.168.1.200,12h dhcp-option=option:netmask,255.255.255.0 dhcp-option=option:router,192.168.1.1 dhcp-option=option:dns-server,192.168.1.25 dhcp-option=option:domain-name,.com dhcp-option=28,192.168.1.255 dhcp-option=option:domain-search,.com conf-dir=/etc/dnsmasq.d The behaviour I'm seeing is that when I try to ping or connect to dev1..com (or just dev1), it should resolve to 192.168.1.26, which it doesfor a while. However, more than once I've discovered that it's started resolving to the outside IP which is something like 24.x.x.x. The only way to fix it is to drop my wireless connection and then reconnect. FYI, I've disabled the DHCP server on the wireless router. Any idea what's happening? Thanks, Guy ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss -- Guy Knights Systems Administrator DES Games www.desgames.com g...@desgames.com
Re: [Dnsmasq-discuss] Clients bypassing dnsmasq server intermittently
On Tue, Sep 28, 2010 at 4:13 PM, g...@desgames.com g...@desgames.com wrote: The behaviour I'm seeing is that when I try to ping or connect to dev1..com (or just dev1), it should resolve to 192.168.1.26, which it doesfor a while. However, more than once I've discovered that it's started resolving to the outside IP which is something like 24.x.x.x. The only way to fix it is to drop my wireless connection and then reconnect. FYI, I've disabled the DHCP server on the wireless router. Any idea what's happening? Thanks, Guy This sounds like you have two dhcp servers on your network serving different dns addresses. When the macbook lease expires and gets a new dhcp address it gets it from the OTHER dhcp server and that dhcp server is passing the resolv address as a public one.
[Dnsmasq-discuss] log_stderr + SIGPIPE
'uname -rims' - Linux 2.6.35.6-spott i686 AuthenticAMD Dnsmasq version 2.56test10 From time to time a friend of mine complains about WLAN stopping to work. The WLAN is the cheapest setup possible: ad-hoc with dnsmasq giving out IPs and DNS service. I'm using a service supervisor for dnsmasq, which logs to stderr and that output is sent to a file by a special logging daemon (not syslog). I was once able to find a concrete problem: dnsmasq couldn't send further log entries, because the logger had a temporary overrun and wasn't able to get rid of the log fast enough. Now in the source I see these lines: src/log.c, lines 194ff: /* Once a stream socket hits EPIPE, we have to close and re-open (we ignore SIGPIPE) */ if (errno == EPIPE) ... Could it be that the case of logging to stderr connected to a pipe suffers from the same condition and hangs up dnsmasq which ignores SIGPIPE? Unfortunately this problem is rare and not easily reproducable, but I'd help testing a possible fix anyway, even if it takes time. clemens
Re: [Dnsmasq-discuss] log_stderr + SIGPIPE
clemens fischer wrote: 'uname -rims' - Linux 2.6.35.6-spott i686 AuthenticAMD Dnsmasq version 2.56test10 From time to time a friend of mine complains about WLAN stopping to work. The WLAN is the cheapest setup possible: ad-hoc with dnsmasq giving out IPs and DNS service. I'm using a service supervisor for dnsmasq, which logs to stderr and that output is sent to a file by a special logging daemon (not syslog). I was once able to find a concrete problem: dnsmasq couldn't send further log entries, because the logger had a temporary overrun and wasn't able to get rid of the log fast enough. Now in the source I see these lines: src/log.c, lines 194ff: /* Once a stream socket hits EPIPE, we have to close and re-open (we ignore SIGPIPE) */ if (errno == EPIPE) ... Could it be that the case of logging to stderr connected to a pipe suffers from the same condition and hangs up dnsmasq which ignores SIGPIPE? Unfortunately this problem is rare and not easily reproducable, but I'd help testing a possible fix anyway, even if it takes time. I'm pretty sure that writes will simply block if the reader at the other end of the pipe is too slow. EPIPE occurs for the writer when the reader actually closes the file descriptor. Of course if you were using a syslogd you could turn on asychronous logging in dnsmasq and this problem would disappear Cheers, Simon.
Re: [Dnsmasq-discuss] log_stderr + SIGPIPE
Simon Kelley wrote: I'm pretty sure that writes will simply block if the reader at the other end of the pipe is too slow. EPIPE occurs for the writer when the reader actually closes the file descriptor. I see. Of course if you were using a syslogd you could turn on asychronous logging in dnsmasq and this problem would disappear Good idea. I usually use the per-process logger if I can help it, because then I don't get all sorts of daemon logs lumped together. There are other benefits as well. OTOH, if it avoids that deadlock, I'll switch to using some syslog variant that has good filtering. clemens
Re: [Dnsmasq-discuss] log_stderr + SIGPIPE
clemens fischer wrote: Simon Kelley wrote: I'm pretty sure that writes will simply block if the reader at the other end of the pipe is too slow. EPIPE occurs for the writer when the reader actually closes the file descriptor. I see. Of course if you were using a syslogd you could turn on asychronous logging in dnsmasq and this problem would disappear Good idea. I usually use the per-process logger if I can help it, because then I don't get all sorts of daemon logs lumped together. There are other benefits as well. OTOH, if it avoids that deadlock, I'll switch to using some syslog variant that has good filtering. If you determine that the problem really is the daemon-manager blocking stderr, it might be worth an experiment: at the moment logging to a file (including stderr) automatically forces asynchronous logging to be disabled. I don't see there's any reason to do that, so a simple change could make --log-async valid with --log-facility=- Cheers, Simon.