<br><br><div class="gmail_quote">On Sun, May 27, 2012 at 10:15 PM, ian <span dir="ltr"><<a href="mailto:ian_malcolm@sjtu.edu.cn" target="_blank">ian_malcolm@sjtu.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello<div><br></div><div>I'm currently working a DNS server in a local area network. DHCP service is given by another server which is not under my control. Names on the internet are working fine, but looking up local names doesn't seem to work.</div>
</blockquote><div><br></div><div><br></div><div>Does the DHCP server serve those names somehow (via DNS, or stored in a database) that you can reach?  dnsmasq can't magically find out the name that a client sent to some other DHCP server.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<div><br></div><div><table border="0" cellpadding="0" cellspacing="0" width="466" style="border-collapse:collapse;width:351pt">
 <colgroup><col width="138" style="width:104pt">
 <col width="102" style="width:77pt">
 <col width="226" style="width:170pt">
 </colgroup><tbody><tr height="18" style="min-height:13.5pt">
  <td height="18" width="138" style="min-height:13.5pt;width:104pt">IP</td>
  <td width="102" style="width:77pt">note</td>
  <td width="226" style="width:170pt">hostname</td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">192.168.100.229</td>
  <td>DNS</td>
  <td><a href="http://LOEA-T7500.ic.sjtu.edu.cn" target="_blank">LOEA-T7500.ic.sjtu.edu.cn</a></td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">192.168.100.75</td>
  <td>a host</td>
  <td><a href="http://LOEA-VM004.ic.sjtu.edu.cn" target="_blank">LOEA-VM004.ic.sjtu.edu.cn</a></td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">192.168.100.31</td>
  <td>a host</td>
  <td><a href="http://LOEA-VM002.ic.sjtu.edu.cn" target="_blank">LOEA-VM002.ic.sjtu.edu.cn</a></td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">192.168.100.201</td>
  <td>DHCP</td>
  <td></td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">202.120.2.101</td>
  <td>upstream DNS</td>
  <td></td>
 </tr>
 <tr height="18" style="min-height:13.5pt">
  <td height="18" style="min-height:13.5pt">202.112.26.34</td>
  <td>upstream DNS</td>
  <td></td>
 </tr></tbody></table></div><div><br></div><div>I use "dig" on LOEA-VM004 to see if I can get LOEA-VM002 resolved via dns, but there is no answer:</div><div><br></div><div><div>[ian@LOEA-VM004 ~]$ dig LOEA-VM002</div>

<div>; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> LOEA-VM002</div><div>;; global options:  printcmd</div><div>;; Got answer:</div><div>;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 38313</div>

<div>;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0</div><div><br></div><div>;; QUESTION SECTION:</div><div>;LOEA-VM002.INA</div><div><br></div><div>;; AUTHORITY SECTION:</div><div>.<a href="http://10402INSOAa.root-servers.net" target="_blank">10402INSOAa.root-servers.net</a>. <a href="http://nstld.verisign-grs.com" target="_blank">nstld.verisign-grs.com</a>. <a href="tel:2012052601" value="+12012052601" target="_blank">2012052601</a> 1800 900 604800 86400</div>

<div><br></div><div>;; Query time: 2 msec</div><div>;; SERVER: 192.168.100.229#53(192.168.100.229)</div><div>;; WHEN: Mon May 28 10:08:31 2012</div><div>;; MSG SIZE  rcvd: 103</div></div><div><br></div><div>At the same time, I use tcpdump to listen on DNS server</div>

<div><br></div><div>[root@LOEA-T7500 ian]# tcpdump \(host 192.168.100.229 and port and port 53\) or \(host 192.168.100.201\) -nnvv</div><div>tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes</div>

<div><div>10:07:23.390606 IP (tos 0x0, ttl  64, id 31380, offset 0, flags [none], proto: UDP (17), length: 56) 192.168.100.75.36380 > 192.168.100.229.53: [udp sum ok]  38313+ A? LOEA-VM002. (28)</div><div>10:07:23.390765 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 56) 192.168.100.229.34909 > 192.168.100.201.53: [bad udp cksum 14c2!]  51850+ A? LOEA-VM002. (28)</div>

<div>10:07:23.390771 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 56) 192.168.100.229.34909 > 202.112.26.34.53: [bad udp cksum d343!]  51850+ A? LOEA-VM002. (28)</div><div>10:07:23.390774 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 56) 192.168.100.229.34909 > 202.120.2.101.53: [bad udp cksum 3d73!]  51850+ A? LOEA-VM002. (28)</div>

<div>10:07:23.390962 IP (tos 0x0, ttl  64, id 22929, offset 0, flags [none], proto: ICMP (1), length: 84) 192.168.100.201 > <a href="http://192.168.100.229" target="_blank">192.168.100.229</a>: ICMP 192.168.100.201 udp port 53 unreachable, length 64</div>

<div><span style="white-space:pre-wrap">  </span>IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 56) 192.168.100.229.34909 > 192.168.100.201.53:  51850+[|domain]</div><div>10:07:23.391730 IP (tos 0x0, ttl  59, id 6539, offset 0, flags [none], proto: UDP (17), length: 131) 202.112.26.34.53 > 192.168.100.229.34909:  51850 NXDomain q: A? LOEA-VM002. 0/1/0 ns: . SOA[|domain]</div>

<div>10:07:23.391772 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 131) 192.168.100.229.53 > 192.168.100.75.36380:  38313 NXDomain q: A? LOEA-VM002. 0/1/0 ns: . SOA[|domain]</div><div>10:07:23.391967 IP (tos 0x0, ttl  59, id 32177, offset 0, flags [none], proto: UDP (17), length: 131) 202.120.2.101.53 > 192.168.100.229.34909:  51850 NXDomain q: A? LOEA-VM002. 0/1/0 ns: . SOA[|domain]</div>

<div><br></div></div><div>Here is /etc/hosts /etc/dnsmasq.conf /etc/resolv.dnsmasq.conf and /etc/resolv.conf on LOEA-T7500</div><div><div><br></div><div># Do not remove the following line, or various programs</div><div><div>

# that require network functionality will fail.</div><div>127.0.0.1<span style="white-space:pre-wrap">      </span>localhost</div><div>#127.0.0.1<span style="white-space:pre-wrap">      </span><a href="http://LOEA-T7500.ic.sjtu.edu.cn" target="_blank">LOEA-T7500.ic.sjtu.edu.cn</a><span style="white-space:pre-wrap">        </span>LOEA-T7500</div>

<div>::1<span style="white-space:pre-wrap">               </span>localhost6.localdomain6 localhost6</div><div>127.0.0.1 LOEA-T7500 # added by Apache Friends XAMPP</div></div><br><div>
resolv-file=/etc/resolv.dnsmasq.conf</div></div><div><div>expand-hosts</div></div><div><div>domain=<a href="http://ic.sjtu.edu.cn" target="_blank">ic.sjtu.edu.cn</a></div></div><div><div>conf-dir=/etc/dnsmasq.d</div></div>
<div><br></div>
<div><div>search <a href="http://ic.sjtu.edu.cn" target="_blank">ic.sjtu.edu.cn</a></div><div>domain <a href="http://ic.sjtu.edu.cn" target="_blank">ic.sjtu.edu.cn</a></div><div>nameserver 192.168.100.201</div><div>nameserver 202.112.26.34</div>
<div>nameserver 202.120.2.101</div>
</div><div><br></div><div><div>; generated by /sbin/dhclient-script</div><div>search <a href="http://ic.sjtu.edu.cn" target="_blank">ic.sjtu.edu.cn</a></div><div>nameserver 127.0.0.1
</div><div>;nameserver 192.168.100.201</div><div>;nameserver 202.112.26.34</div><div>;nameserver 202.120.2.101</div></div><div><br></div><div>I ping LOEA-T7500 on LOEA-VM004, it is resolved as 127.0.0.1.
</div><div>And here is the ip-hostname list on DHCP, I mean those hosts do send their hostnames to DHCP when asking for a lease.</div><div><div><br></div><div><div>192.168.100.31  - 255.255.255.0  - ea-b3-8d-73-71-65   -2012/5/28 15:07:09     -D-  <a href="http://LOEA-VM002.ic.sjtu.edu.cn" target="_blank">LOEA-VM002.ic.sjtu.edu.cn</a></div>

<div>192.168.100.75  - 255.255.255.0  - 06-96-c1-4f-04-43   -2012/5/28 16:05:50     -D-  <a href="http://LOEA-VM004.ic.sjtu.edu.cn" target="_blank">LOEA-VM004.ic.sjtu.edu.cn</a></div><div><br></div></div><div>How can I solve this problem? Thank you.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div></font></span></div><span class="HOEnZb"><font color="#888888">-- <br>Huangtian<div>Shanghai Jiao Tong University</div><br>

</font></span></div>
<br>_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
<br></blockquote></div><br>