I am trying to put a batch script together in order to help members resolve their network problems. When there are problems, we often ask them to run certain commands from the cmd prompt. My idea is to either have one general option that will hopefully fix the problem, or have different options for different problems. Using a batch script will make doing this easier and possibly avoid typing errors. The user will only need to select a particular option and then press enter. The batch script will do the rest [hopefully].
I have investigated and found what appears to be the general solutions that seems to fix the majority of network issues.
In order to be able to write the batch script I need advice on what should and shouldn’t be used, and in what situations they should be used, therefore I can write the script accordingly. I have added [restart needed] next to those that I understand need it!
ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew
nbtstat -R
nbtstat -RR
net stop dnscache
netsh advfirewall reset [restart needed]
netsh int ip reset [restart needed]
netsh int ip reset c:\resetlog.txt [restart needed]
netsh int ipv4 reset [restart needed]
netsh int ipv6 reset [restart needed]
netsh int reset all [restart needed]
netsh interface ipv4 reset [restart needed] - SAME AS netsh int ipv4 reset ABOVE
netsh interface ipv6 reset [restart needed] - SAME AS netsh int ipv6 reset ABOVE
netsh interface tcp reset [restart needed] - SAME AS netsh int ip reset ABOVE
netsh interface tcp set global autotuninglevel=disabled
netsh winsock reset [restart needed]
netsh winsock reset catalogue [restart needed]
ping 127.0.0.1 -n 10 & ping localhost -n 10
EDIT1:
Here is a brief description of what each of the above commands perform as far as I can make out and understand . . .
ipconfig /flushdns
Flushes the DNS resolver cache on the local computer.
ipconfig /registerdns
Registers the DNS name.
ipconfig /release
Releases the current DHCP server IP address [configuration settings] for all connected adapters.
ipconfig /renew
Renews the DHCP server IP address [configuration settings] for all connected adapters.
nbtstat -R
Reloads of the NetBIOS name cache.
nbtstat -RR
NetBIOS name update is sent.
net stop dnscache
Stops the DNS cache service.
netsh advfirewall reset [restart needed]
Resets the firewall to factory settings [Firewall=ON].
netsh int ip reset [restart needed]
Reset the TCP/IP Stack Protocols and reset all network interfaces to DHCP.
netsh int ip reset c:\resetlog.txt [restart needed]
Rewrites two registry keys used by TCP/IP.
netsh int ipv4 reset [restart needed]
Reset the IPv4 Protocol.
netsh int ipv6 reset [restart needed]
Reset the IPv6 Protocol.
netsh int reset all [restart needed]
Reinstalls the TCP/IP protocol.
netsh interface tcp set global autotuninglevel=disabled
?????????
netsh winsock reset [restart needed]
Reset the WINSOCK programming interface entries to installation defaults.
netsh winsock reset catalogue [restart needed]
Resets the WINSOCK protocols back to the default setting or clean state.
ping 127.0.0.1 -n 10 & ping localhost -n 10
Ping the network card loopback address and local computer address.
EDIT2:
I have come up with a couple of different scenarios but I would ideally like input from those that know about pc networking before I finish writing the batch script!
Thanks in advance.
I have investigated and found what appears to be the general solutions that seems to fix the majority of network issues.
In order to be able to write the batch script I need advice on what should and shouldn’t be used, and in what situations they should be used, therefore I can write the script accordingly. I have added [restart needed] next to those that I understand need it!
ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew
nbtstat -R
nbtstat -RR
net stop dnscache
netsh advfirewall reset [restart needed]
netsh int ip reset [restart needed]
netsh int ip reset c:\resetlog.txt [restart needed]
netsh int ipv4 reset [restart needed]
netsh int ipv6 reset [restart needed]
netsh int reset all [restart needed]
netsh interface ipv4 reset [restart needed] - SAME AS netsh int ipv4 reset ABOVE
netsh interface ipv6 reset [restart needed] - SAME AS netsh int ipv6 reset ABOVE
netsh interface tcp reset [restart needed] - SAME AS netsh int ip reset ABOVE
netsh interface tcp set global autotuninglevel=disabled
netsh winsock reset [restart needed]
netsh winsock reset catalogue [restart needed]
ping 127.0.0.1 -n 10 & ping localhost -n 10
EDIT1:
Here is a brief description of what each of the above commands perform as far as I can make out and understand . . .
ipconfig /flushdns
Flushes the DNS resolver cache on the local computer.
ipconfig /registerdns
Registers the DNS name.
ipconfig /release
Releases the current DHCP server IP address [configuration settings] for all connected adapters.
ipconfig /renew
Renews the DHCP server IP address [configuration settings] for all connected adapters.
nbtstat -R
Reloads of the NetBIOS name cache.
nbtstat -RR
NetBIOS name update is sent.
net stop dnscache
Stops the DNS cache service.
netsh advfirewall reset [restart needed]
Resets the firewall to factory settings [Firewall=ON].
netsh int ip reset [restart needed]
Reset the TCP/IP Stack Protocols and reset all network interfaces to DHCP.
netsh int ip reset c:\resetlog.txt [restart needed]
Rewrites two registry keys used by TCP/IP.
netsh int ipv4 reset [restart needed]
Reset the IPv4 Protocol.
netsh int ipv6 reset [restart needed]
Reset the IPv6 Protocol.
netsh int reset all [restart needed]
Reinstalls the TCP/IP protocol.
netsh interface tcp set global autotuninglevel=disabled
?????????
netsh winsock reset [restart needed]
Reset the WINSOCK programming interface entries to installation defaults.
netsh winsock reset catalogue [restart needed]
Resets the WINSOCK protocols back to the default setting or clean state.
ping 127.0.0.1 -n 10 & ping localhost -n 10
Ping the network card loopback address and local computer address.
EDIT2:
I have come up with a couple of different scenarios but I would ideally like input from those that know about pc networking before I finish writing the batch script!
Thanks in advance.
Last edited:
My Computer
- Computer type
- Laptop
- Computer Manufacturer/Model Number
- Fujitsu LIFEBOOK
- OS
- Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
- CPU
- Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
- Motherboard
- FUJITSU FJNBB06
- Memory
- 4.00 GB
- Graphics Card(s)
- Intel(R) Graphics Media Accelerator HD
- Sound Card
- [1] Realtek High Definition Audio [2] Intel(R) Display Audio
- Screen Resolution
- 1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
- Hard Drives
- TOSHIBA MK5076GSX
- Antivirus
- AVG FREE