Welcome to the navigation

In excepteur reprehenderit nostrud velit lorem sit anim commodo mollit culpa dolor aliqua, elit, et cillum exercitation aute sed incididunt ullamco quis qui fugiat esse. Aute quis sunt irure adipisicing sit non dolor enim dolore magna velit in anim eu ex et aliqua, ea est qui excepteur ut occaecat id

Yeah, this will be replaced... But please enjoy the search!

Fixing slow commands on Windows 10

A lot of windows users seem to have poor performance on docker commands. Or it is at least described as performance but is more likely command lag caused by networking issues. And sure enough, I had it too on my latest installation. After a short while, I discovered that the issues only occurred when leaving the domain network.

That did make some sense to me since the docker commands aren't run natively on Windows, instead, they are sent to the HyperV container instance. Docker uses the NIC vEthernet (DockerNAT) where DockerNAT is a Virtual Switch in HyperV. In order to communicate with ANY HyperV instance, this needs to be done by using networking. Hence any command lag issues should be network-related and if either the domain controller are guarded by firewalls or doesn't allow certain communication you will be in trouble. 

NetBIOS Name

After some wireshark analysis it turns out that NetBIOS name resolution is the problem.

Luckily there is a pretty simple fix for this. In the above screenshot we see the NB HERLITZ which would mean that Netbios name is, well, HERLITZ.

This can also be retrieved (if you don't have Wireshark) by running the following command in PowerShell

[System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties()

The NetBios name is typically the leftmost part of the DomainName

This can further be confirmed by running nbstat

nbtstat /n

 

In this case we are looking for the GROUP property.

Solution

The solution is to fix the resolution of NetBIOS, the simple fix is to add a reference in the hosts file. In example 

#127.0.0.1	YOURNETBIOSNAME
127.0.0.1	HERLITZ

Youll find the hosts file in c:\windows\system32\drivers\etc and will need a text editor like notepad.exe running as an administrator to edit the file.

This may have other effects but I have rarely noticed anything at all. TR posted an article about fixing NetBIOS name resolution for alternative approaches.