Score:1

What is the effect of the '-v' flag to the Windows nslookup command?

lv flag

I'm trying to debug a problem in which my Windows host resolver will not resolve a particular DNS name (FQDN).

I notice that if I call the Windows nslookup command as follows,

nslookup x.y.z.cloud

(x.y.z.cloud is a stand-in for the actual name), the request times out twice with no reported results.

However, if I call

nslookup -v x.y.z.cloud

or

nslookup -v -debug x.y.z.cloud

it does not report failure, but instead returns the correct non-authoritative result for x.y.z.cloud from the local DNS server (& much additional information in the -debug case).

However, ping, or browsers, or (as far as I can tell), anything using the normal Windows resolver does not see the result for x.y.z.cloud. ('ipconfig /flushdns' does not help.) There's nothing in c:\Windows\System32\drivers\etc\hosts about x.y.z.cloud either.

So, clutching at straws, what is the effect of the '-v' flag to nslookup which makes it (apparently) more successful at retrieving the response? I tried it originally thinking it might be 'verbose', but the output is not really verbose without -debug also, and it appears to have other effects.

BTW, Is there documentation anywhere for all the flags of 'nslookup' including '-v', '-debug', etc.?

Any ideas on what might be going wrong with the normal name resolution are also welcome ;^)

NOTES: I've found out some more. It looks like zscaler is running on the Windows host and may well be interfering with the DNS requests. I mentioned in a comment that 'x.y.z.cloud' is not a name in our company's domain. However, it resolves (according to our local DNS server) to an IP address within the company network. From logs, zscalar appears to be classifying 'x.y.z.cloud' as an external 'isTunnel2Domain' and may be tunnelling the request somewhere un-useful. When 'nslookup -v x.y.z.cloud.' is used, it runs over TCP (thanks Dave!) and zscalar may not intercept it the same way.

zeelor avatar
lv flag
I should also mention that other Windows hosts nearby on the same network as I can resolve the name, and that my Windows host does not appear to have problems resolving any other names. Also, 'z.cloud' is not the local domain name.
dave_thompson_085 avatar
jp flag
`-v` is apparently taken as an abbreviation for `-vc` which causes nslookup to use TCP instead of UDP to communicate with the DNS server. But it doesn't appear to change anything else, and I see no logical reason a DNS server would succeed for a request over TCP when the same request over UDP _hangs_. Gets data-truncated or even errror=servfail, yes, but not hangs. Unless _maybe_ the data is big enough to exceed MTU somewhere, _and_ someone has disabled ICMP (as too many do), and the TCP SYN exchange gets MSS clamped (and thus segments) which UDP can't.
zeelor avatar
lv flag
Thanks, Dave. Using Wireshark, I have verified that using '-v' does indeed cause nslookup to use TCP rather than UDP. Also, as Alem noted, 'ipconfig /flushdns' does not appear to fully flush whatever cache is being used, because if after that command I call 'nslookup x.y.z.cloud.', it does not send any more traffic out to the DNS server.
Score:0
hr flag

As previously mentioned, the "-v" flag is not a valid option for the Windows nslookup command, so it's unlikely that it had any effect on the success or failure of your query. Based on your description, it seems like the issue may be related to DNS caching. Even after flushing the DNS cache with "ipconfig /flushdns", your system might still be using cached DNS records for the x.y.z.cloud domain, which can lead to the behavior you described where nslookup returns a different result than other applications. To completely clear the DNS cache, you can try the following steps: 1.Open an elevated command prompt (i.e., run as Administrator). 2.Type the following command: "net stop dnscache" (without the quotes) and press Enter. 3.Wait a few seconds for the DNS Client service to stop. 4.Type the following command: "net start dnscache" (without the quotes) and press Enter. 5.Wait a few seconds for the DNS Client service to start. After completing these steps, try running nslookup and pinging the x.y.z.cloud domain again to see if the issue has been resolved. If the issue persists, there may be other factors at play that require further investigation. emphasized text

zeelor avatar
lv flag
Hi Alem, When I try to call 'net stop dnscache' from an administrator shell, it says 'The requested pause, continue, or stop is not valid for this service.'
Score:0
hr flag

If you are receiving the error message

"The requested pause, continue, or stop is not valid for this service"

when running the command "net stop dnscache" from an administrator Command Prompt, it means that the DNS Client service is either not running or is stuck in a paused or stopped state.

To resolve this issue and stop the DNS Client service, you can try the following steps:

  1. Open the Services console by typing "services.msc" in the Run dialog or by searching for "Services" in your start menu.
  2. In the Services console, locate the DNS Client service and make sure that it is running. If it is not running, right-click on the service and select "Start" to start it.
  3. If the service is running but the issue persists, try selecting the service and clicking on the "Restart the service" button in the toolbar at the top of the Services console.
  4. If the service still cannot be stopped, you may need to use the Task Manager to force the service to stop. Press "Ctrl +Shift + Esc" to open the Task Manager, click on the "Services" tab, locate the DNS Client service, right-click on it and select "End Task".

If none of these steps resolve the issue, you may need to restart your system

HBruijn avatar
in flag
Please format text using [Markdown](https://serverfault.com/editing-help) and/or the formatting options in the edit menu to properly type-set your posts. That improves readability, attracts votes and helps people with similar questions.
HBruijn avatar
in flag
Also it usually editing your original answer is encouraged over adding a second answer when a comment requires updating/expanding your original answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.