Image: iStock/klmax

In an era where much of the workforce operates from home or other remote places on a daily basis, establishing a reliable and sustainable internet connection is vital. However, many of us have been forced into using older, potentially less reliable devices to achieve those vital connections, and it has led to frustrating complications.

In those situations, many may find their internet/network connections fail for seemingly no reason and at the most inopportune moments. And, while rebooting your Windows 10 PC works, it is not the best solution. With a little planning and a small batch file, you can reset and renew a Windows 10 network connection without having to reboot your entire PC.

SEE: Why you should modernize your remote work policies to get ready for the hybrid office plan (TechRepublic Premium)

How to reset and renew a network connection in Windows 10

In a previous article, we discussed how to reset a network connection in Windows 10 with a batch file, but those commands referred to the network interface only. In some networking troubleshooting cases, we need to perform a complete refresh of all the network connection protocols, including at the host end.

To create the batch file, open your favorite text editor. For most Windows 10 users that will likely be Notepad. Type “notepad” into the Windows 10 desktop search box and select the appropriate item from the results.

With the text editor open, type in these commands:

ipconfig /release
ipconfig /renew
arp -d *
nbtstat -R
nbtstat -RR
ipconfig /flushdns
ipconfig /registerdns

You should see something that looks like Figure A.

Figure A

  • The two ipconfig commands will release the current IP address and then immediately ask for a new one.
  • The arp command deletes the current host name so we can reacquire it.
  • The nbtstat -R command purges and reloads the remote cache name table.
  • The nbtstat -RR command sends Name Release packets to WINS and then starts a refresh.
  • The final two ipconfig commands flush the DNS and then initiate manual dynamic registration for the DNS names and IP addresses that are configured at the computer.

Click or tap the File tab in Notepad and select the Save As menu item. You will want to save your batch file somewhere with easy access. The most likely spot would be on your Windows 10 desktop. Be sure to change the Save As type selection box to all file types so you can specify the text file will be saved with the “.bat” suffix, as shown in Figure B.

Figure B

Once the batch file is saved, you can exit out of Notepad.

You will have to use administrative credentials to run the batch file, so right-click the batch file icon on your Windows 10 desktop and select “Run as administrator” from the context menu.

The next time your internet or network connection fails for whatever reason, don’t spend that time you cannot afford to spend rebooting your Windows 10 PC, instead run this batch file, which should take mere seconds to complete. A renewed connection should eliminate the immediate problem and let you get back to work quickly.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays