<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>I am having a strange problem that I think might be related
to dnssmasq. Sorry for the length of this but you need the background.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have a nas (QNAP TS-509) that is my main server. It runs
linux and a number of apps one of which is dnsmasq. I use the dns and dhcp features.
I have another nas (QNAP TS-639), which also runs linux, which I use for
testing and backups. The 639 has a reservation in dnsmasq. This server is
usually off. I have a script on the 509 that wakes the 639, does an rsync, and
then shuts the 639 down. I was testing a new wakenas script when I ran into a
problem. The way the new wakenas script works is like this:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>1 - ping the 639 to see if it responds.<o:p></o:p></p>
<p class=MsoNormal>2 - if it responds<o:p></o:p></p>
<p class=MsoNormal> 2a
- echo message that the 639 is up.<o:p></o:p></p>
<p class=MsoNormal> 2b
- exit.<o:p></o:p></p>
<p class=MsoNormal>3 - if no response<o:p></o:p></p>
<p class=MsoNormal> 3a
- issue wake on lan command <o:p></o:p></p>
<p class=MsoNormal> 3b
- start loop - loop 21 times<o:p></o:p></p>
<p class=MsoNormal> 4
- ping 639<o:p></o:p></p>
<p class=MsoNormal> 5
- if responds <o:p></o:p></p>
<p class=MsoNormal> 5a
- echo message that the 639 is up<o:p></o:p></p>
<p class=MsoNormal> 5b
- exit<o:p></o:p></p>
<p class=MsoNormal> 6
- sleep 10<o:p></o:p></p>
<p class=MsoNormal> 3c
- end loop<o:p></o:p></p>
<p class=MsoNormal> 3d
- echo message that the 639 is not up<o:p></o:p></p>
<p class=MsoNormal> 3e
- exit<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>So basically if the 639 is not up it attempts to wake it and
waits a max of 3.5 minutes to see if it is up. The script works except that it
reports that the 639 is not up when in fact it did start it. If I ping the 639
by its name from a terminal session on the 509 it returns an address of
169.254.100.100 when in fact the address of the 639 as assigned by the 509 is
192.168.22.242. If I ping it by its fqdn the correct address is returned. I
think what is happening is that when the 639 is turned on and it first connects
to the network it is connecting with the address of 169.254.100.100. It then
issues the dhcp request and gets assigned the correct address but somehow the
old address is still cached somewhere.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Some other info about the network. The 509 is also a wins
server and the 639 is a wins client. Both the 509 & 639 and two 1gb
ethernet connections that are bound into a single connection using 802.3ad.
They are connected to a Cisco 2960g switch which is configured to bind the
ports from each server into a single 802.3ad trunk.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>So how can I determine if the problem is with dnsmasq? What
logging should I turn on and what should I be looking for in the logs?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Here is the dnsmasq configuration:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal># Our
log settings<o:p></o:p></p>
<p class=MsoNormal>log-facility=/share/MD0_DATA/apps/logs/dnsmasq.log<o:p></o:p></p>
<p class=MsoNormal>log-queries<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal># Our
DNS settings<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>domain-needed<o:p></o:p></p>
<p class=MsoNormal>expand-hosts<o:p></o:p></p>
<p class=MsoNormal> <o:p></o:p></p>
<p class=MsoNormal>bogus-priv<o:p></o:p></p>
<p class=MsoNormal>filterwin2k<o:p></o:p></p>
<p class=MsoNormal>resolv-file=/etc/config/user/dnsmasq-resolv.conf<o:p></o:p></p>
<p class=MsoNormal> <o:p></o:p></p>
<p class=MsoNormal>#clear-on-reload<o:p></o:p></p>
<p class=MsoNormal>stop-dns-rebind<o:p></o:p></p>
<p class=MsoNormal>user=xxxxx<o:p></o:p></p>
<p class=MsoNormal>group=yyyyyyy<o:p></o:p></p>
<p class=MsoNormal>no-hosts <o:p></o:p></p>
<p class=MsoNormal>addn-hosts=/etc/config/user/dnsmasq-hosts.conf<o:p></o:p></p>
<p class=MsoNormal>domain=djmuller.com<o:p></o:p></p>
<p class=MsoNormal>cache-size=1000 <o:p></o:p></p>
<p class=MsoNormal>local-ttl=600 <o:p></o:p></p>
<p class=MsoNormal>neg-ttl=600<o:p></o:p></p>
<p class=MsoNormal>mx-target=mail.djmuller.com<o:p></o:p></p>
<p class=MsoNormal>localmx<o:p></o:p></p>
<p class=MsoNormal># address=/adbrite.com/127.0.0.1 <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal># Our
dhcp settings<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>dhcp-range=192.168.22.1,192.168.22.50,24h<o:p></o:p></p>
<p class=MsoNormal>dhcp-option=vendor:MSFT,2,1i<o:p></o:p></p>
<p class=MsoNormal>dhcp-leasefile=/share/MD0_DATA/apps/dnsmasq/dnsmasq.leases<o:p></o:p></p>
<p class=MsoNormal>dhcp-authoritative<o:p></o:p></p>
<p class=MsoNormal>dhcp-hostsfile=/share/MD0_DATA/apps/config/dnsmasq/dnsmasq-dhcp-reservations.conf<o:p></o:p></p>
<p class=MsoNormal>dhcp-optsfile=/share/MD0_DATA/apps/config/dnsmasq/dnsmasq-dhcp-options.conf<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal># ad
servers contained in additional configuration file<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>conf-file=/share/MD0_DATA/apps/config/dnsmasq/dnsmasq-adservers.conf #
just contains address=/domain/ip entries for ad servers<o:p></o:p></p>
<div style='mso-element:para-border-div;border:none;border-bottom:double windowtext 2.25pt;
padding:0in 0in 1.0pt 0in'>
<p class=MsoNormal style='border:none;padding:0in'><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I hope I have explained my problem so that you understand
it.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Thanks<o:p></o:p></p>
<p class=MsoNormal>Don<o:p></o:p></p>
</div>
</body>
</html>