1

In my Network Settings in Windows, I've set my DNS settings to use addresses 192.168.2.239 and 192.168.2.238. These are both non-existing DNS servers.

In cmd if I do

nslookup www.google.com

I get

    *** Can't find server name for address 192.168.2.239: Non-existent domain
DNS request timed out.
    timeout was 2 seconds.
*** Can't find server name for address 192.168.2.238: Timed out
*** Default servers are not available
Server:  UnKnown
Address:  192.168.2.239

Non-authoritative answer:
Name:    www.google.com
Addresses:  184.150.186.88, 184.150.186.84, 184.150.186.98, 184.150.186.103
          184.150.186.93, 184.150.186.113, 184.150.186.123, 184.150.186.109, 184
.150.186.108
          184.150.186.99, 184.150.186.119, 184.150.186.89, 184.150.186.114, 184.
150.186.118
          184.150.186.104, 184.150.186.94

Also, tracert is working.

My question is HOW? How is my ping successfully sending and getting back the messages if it has no DNS to work with?

Tracing route to www.google.com [170.100.15.22]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.2.1
  2    13 ms    11 ms    11 ms  bas7........com [xx.xxx.xx
.60]
  3    11 ms    11 ms    11 ms  agg1-.....net......ca [64.230.38
.52]
  4    23 ms    23 ms    23 ms  core3-xxxxxxxx02_xe0-8-2-0_core.net.bell.ca [64.
230.170.245]
  5    22 ms    23 ms    23 ms  tcore4-newyorkaa_hundredgige0-5-0-0.net.bell.ca
[64.230.79.148]
  6    24 ms    21 ms    21 ms  bx8-newyork83_bundle-ether2.net.bell.ca [64.230.
79.175]
  7   190 ms   244 ms   191 ms  72.14.221.241
  8    22 ms    22 ms    21 ms  216.239.50.108
  9    23 ms    22 ms    22 ms  209.85.244.153
 10    97 ms    98 ms    98 ms  209.85.252.95
 11   106 ms   106 ms   106 ms  216.239.50.186
 12   190 ms   223 ms   206 ms  216.239.57.126
 13   125 ms   125 ms   125 ms  216.239.46.48
 14   121 ms   121 ms   122 ms  108.170.245.49
 15   123 ms   122 ms   122 ms  108.170.238.161
 16   123 ms   124 ms   123 ms  prg03s05-in-f4.1e100.net [172.217.23.196]

Trace complete.
CodyBugstein
  • 222
  • 1
  • 3
  • 11

2 Answers2

4

The answer to this question, as noted by @BrennenSmith, is that the DNS information is stored in the DNS cache file. As seen in the output of the nslookup command, the Non-authoritative answer signifies that the DNS information is being supplied by the local DNS cache, not from the DNS server.

If this bothers you, you can clear the DNS cache with the command ipconfig /flushdns. Also, you can stop the DNS cache service with the command net stop dnscache.

B00TK1D
  • 685
  • 4
  • 18
  • Sometimes programs will have their own DNS cache too, and other times clearing the DNS cache out isn't as instant as you'd probably like. If the problems persists even after a reboot, I would check your ipconfig /all to ensure that no other DNS servers are set up on any other adapters. Tracert also works by doing IP based routing - so tracert is going to work regardless of DNS as long as there is an IP address. – IceMage Jan 20 '17 at 19:52
1

I'm answering this because your question seems to be more aligned to TraceRT and DNS, which are not exactly related.

Tracert will work regardless of the nameserver settings on your computer. The only thing that will break is the resolution of Google.com to an IP address (like 170.100.15.22).

TraceRT will track down the route taken by your point on the network based on the ROUTING table of your computer, not DNS. You can see your routing table by typing ROUTE /PRINT at the command line. The default gateway will be the first hop in nearly every instance (except when there are different routing rules). You can instruct TraceRT not to make DNS queries by using the -d argument.

IceMage
  • 1,336
  • 7
  • 12