DNS lookup wierdness

denpgeorge

Member
May 31, 2001
32
0
0
I've got two xp machines with hostnames 'machine1' and 'machine2' on my local network. Both machines are set up for automatic configuration via DHCP. My DHCP server assigns the suffix 'domain.com', and assigns my local DNS server. So both machines are using 192.162.0.1 as their primary DNS server. (I'm using a WRT54G router with dhcpd and DNSmasq installed. The 'Local DNS' option is turned on which allows the DNS server to resolve DHCP hostnames.)

Machine1 works great and can nslookup and ping machine2 using both 'machine2' or 'machine2.domain.com'. Machine2 can nslookup machine1 just fine, but ping fails. Trying to ping machine1 from machine2 gives the following error message:
Ping request could not find host machine1. Please check the name and try again.

I wrote a small console app named resolve.exe in C# to test DNS resolution in an application:

using System;
public class Resolver {
public static void Main(String[] args) {
try {
string ipaddress =
System.Net.Dns.Resolve(args[0]).AddressList[0].ToString();
Console.WriteLine(ipaddress);
}
catch(Exception ex) { Console.WriteLine(ex.ToString()); }
}
}

If I execute the following sequence of commands from machine2, this is what happens:
nslookup machine1.domain.com /* success */
resolve machine1.domain.com /* success */
ping machine1.domain.com /* fails */
resolve machine1.domain.com /* fails */
nslookup machine1.domain.com /* success */
ipconfig /flushdns
resolve machine1.domain.com /* success */
ping machine1.domain.com /* fails */
nslookup machine1.domain.com /* success */
resolve machine1.domain.com /* fails */
resolve machine1 /* success */
ping machine1 /* fails */
resolve machine1 /* fails */

This is what I have gathered from this:
Resolve works great on a hostname right up until a program attempts to connect to that particular hostname. At this point a negative entry for this hostname is entered into the cache, but why? And why does nslookup not care about that? Can somebody help me figure out what the hell is going on here? And why does machine1 work just fine?
 

denpgeorge

Member
May 31, 2001
32
0
0
I thought I'd try and set up a WINS server on my network and see if that helps the situation any... turns out it makes no difference. Anybody got any ideas?
 

denpgeorge

Member
May 31, 2001
32
0
0
I've tried that.. it didnt work, did the exact same thing. Anyways if its possible, I'd prefer to keep the .com. Also still wouldnt explain why it works from machine1...

Everything points to this being an issue on machine2.
(It's running Windows XP Media Center Edition by the way)
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |