Skip to main content

Windows Networking Tips

Reset Windows Network stack

Here's a list of commands to reset the Windows network stack.

Note that you need to do this at a Command Prompt that is running as Administrator.

Also note that some may not apply to all versions of Windows. If a particular command doesn't apply, you'll just get an error message, which can be ignored.

ipconfig /flushdns       #clears the system DNS cache
nbtstat -R
nbtstat -RR
netsh int ip reset all   #reset the TCP/IP stack to Windows install defaults
netsh winsock reset      #resets the Windows network sockets catalog
route /f                 #flush the routing table
ipconfig /registerdns    #renew DNS client registration and refresh DHCP leases

NOTE: A reboot will be required after performing these aggressive operations!

Release/Renew Windows DHCP address, with time delay

If you need to change the subnet that a Windows device is on, but need some time between releasing and renewing the address, the following command will have a 45 second delay between the two commands.

ipconfig /release && TIMEOUT /T 45 && ipconfig /renew

Local NETBIOS/WINS/Filesharing/Printer names not resolving

Windows File sharing can be finicky. (Example: QB company file access across the network suddenly stops working)

  • Make sure the Network you're on is designated as a Private network, not a Public one (a Public network profile has a stricter firewall ruleset). IF you change it, go ahead and reboot, and then try your Content Filter again
  • When trying to diagnose these types of issues, be aware that commands ping, nslookup, and Windows file sharing all seem to work slightly differently.

Explanation

nslookup wolfman (name server lookup: wolfman) sends the hostname (wolfman) to the DNS (domain name system) to obtain the corresponding IP address. This is the sole purpose of the nslookup command. This works already, so we have verified that the DNS works and that wolfman indeed corresponds to an IP address.

In contrast, ping wolfman needs to do two things:

  1. Get the IP that the hostname (wolfman) corresponds to
  2. Send packets to the IP and listen for the response

On Windows (even recent versions such as Windows 10), the first step can easily fail. For the sake of backwards compatibility, Windows supports various methods of hostname resolution (hosts file, DNS, NetBIOS/WINS, LMHOST file).

Unfortunately, it seems that Windows' ping command doesn't always attempt a DNS lookup. I don't know the specific conditions that triggers this behaviour.

Fortunately, we can force Windows to do a DNS lookup by using a FQDN (fully qualified domain name). In practice, we do this by suffixing a . dot to the hostname: wolfman.. Try ping wolfman. and verify that it works.

Source: StackExchange thread

  • Also note that printers are sometimes set up with a WSD port. In some cases, this "intelligent" auto-discovery service doesn't seem to update as expected. It may be quicker to remove and re-add the printer than to wait on WSD to get up-to-speed.

Web Services for Devices allows network-connected IP-based devices to advertise their functionality and offer these services to clients by using the Web Services protocol. WSD-based devices and clients communicate over the network using a series of SOAP (Simple Object Access Protocol) messages over UDP and HTTP(S). WSD for Devices provides a network plug-and-play experience that is similar to installing a USB device. Web Services for Devices also defines a security profile that may be extended to provide additional protection and authentication using device-based certificates.

Source: StackExchange thread