D
D
dollar2021-08-05 14:08:02
Windows
dollar, 2021-08-05 14:08:02

Why can ping and nslookup have different results when accessing DNS?

Don't they have a shared cache? The launch is almost simultaneous, in the same terminal.

Screenshot:
610bc5fc8f2af669031643.jpeg

Before that, of course, the settings of the DNS server itself were changed (initially it resolved 127.0.0.1, then the correct address was specified in it). Yes, most likely it's the cache. But it is not clear how the cache can be so arranged even purely in theory.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Falaleev, 2021-08-05
@dollar

Ping can use various methods to obtain an IP address (all listed in /etc/nsswitch.conf), such as taking it from /etc/hosts.
Nslookup always asks for nameserver only.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question