How to use batch file to update network connection in Windows 10. Video

From time to time, many PC users may find that their Network connections fail for seemingly no reason. And while rebooting your Windows PC works in some cases, it’s not the best solution. In this post, we will show you how to create a Batch File to reset, release & renew IP, Winsock, Proxy, DNS without restarting your Windows 11 PC. 10 .

Batch File(File) to reset, release and update IP, Winsock , Proxy , DNS

While you can easily reset TCP/IP , reset DNS(Flush DNS) or reset Winsock(reset Winsock) by following the normal processes – with a little planning, you can reset and refresh your Windows 10 network connection with a small .

How to use batch file to update network connection in Windows 10. Video

To create a batch file to reset, release and update IP, Winsock , Proxy , DNS in Windows 11/10, follow these steps:

Press Windows key + R to bring up the Run dialog box.

In the Run dialog box, type “Notepad(notepad)” and press Enter to open “Notepad(open Notepad)”.

Copy and paste the code below into a text editor.

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

Parameter descriptions are as follows:

Save the file (preferably to your desktop) with a name and add a .bat extension – for example; ResetNetConec.bat .

In the Save as type field, select All Files.

TIP(TIP) : You can also use our portable freeware FixWin to reset TCP/IP , reset DNS(Flush DNS) , reset Winsock etc.

April 5, 2021, 11:17 AM PDT

How to use a batch file to reset and renew a network connection in Windows 10

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.

How to use batch file to update network connection in Windows 10. Video

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 should you 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.

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.

How to use batch file to update network connection in Windows 10. Video

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.

How to use batch file to update network connection in Windows 10. Video

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

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.

:/>  Работа в Центр молекулярной диагностики (CMD) Московская область, 26 свежих вакансий. Вакансии Центр молекулярной диагностики (CMD) Московская область |

Also See

4-convert the .txt into .bat

When diagnosing Windows internet problems, it’s not unusual to flush the cache, reset Winsock, and reset TCP/IP, essentially resetting and renewing your network connection. All three steps take some time from the Command Prompt, but our batch file can do all of the above for you, saving you time and aggravation.

If you’ve never or rarely performed these steps, this batch file can be a lifesaver or at least a time saver, simplifying the process of resetting your network settings entirely.

To completely reset and renew everything in this batch file, you would have to:

ipconfig /registerdns: Begin manual dynamic registration for DNS names and IP addresses. Video tutorial:

Download Reset and Renew Your Internet Connection Batch File from MajorGeeks.

When the Command Prompt window closes, the reset has been completed. It should complete within a minute.

If you’re having issues with your internet connection, check out our similar links below:

Reset and Renew Your Internet Connection is a batch file that will flush the cache, reset Winsock, and reset TCP/IP, essentially resetting and renewing your network connection in one step.

If you’ve never or rarely perform these steps, this batch file can be a lifesaver or at least a time saver, simplifying the process of resetting your network settings entirely.

Screenshot for Reset and Renew Your Internet Connection Batch File

MajorGeeks. Com » Internet Tools » Diagnose, Monitor & Repair » Reset and Renew Your Internet Connection Batch File 1. 0 » Download Now

Computers connected to a network use an Internet Protocol address (IP address) to be identified and communicate with other computers using the Internet Protocol. While some IP addressing is set manually (each computer is configured manually, including their IP address in a given network), most obtain an IP address assigned by a server running a service called the Dynamic Host Configuration Protocol (DHCP). Usually this process of obtaining/being assigned an address happens automatically, but there may be instances where this may not work as expected. Troubleshooting network connectivity issues on a Windows computer may sometimes require releasing a DHCP lease (address assigned for a pre-determined period of time) and renewing a lease (acquiring an IP address with a new lease).

The ipconfig command

The ipconfig (short for IP Configuration) is a basic, yet popular, Windows network command-line utility used to display the TCP/IP network configuration of a computer. If you are familiar with Linux, this tool is similiar to ifconfig. This tool is often used for troubleshooting network connectivity issues. With ipconfig, you can identify the types of network adapaters on your computer, the computer’s IP address, the IP addresses of the DNS (Domain Name System) servers being used, and much more.

These commands shown here are tested on a comptuer with Windows 10 but most will work in other versions of Windows as well.

Table of Content

To use this utility, you will need to launch the Command Prompt window. The three common ways to launch the Command Prompt window are:

Ipconfig Syntax

There are a variety of switches (sub commands) available with the ipconfig utility that will either display certain information or perform certain network functions. At the most basic, the ipconfig displays a computer’s IP address, subnet mask and the default gateway (which is typically the IP address of your router or network firewall).

:/>  AAP Server Driver Download For Windows OS

Ipconfig – Retrieve Basic TCP/IP Network Information

Please note that unless your computer is connected directly to the Internet (this is rare), the IP address reported by ipconfig will be your local network IP, not your public external IP address.

While other network details can be retrieved by the ipconfig utility, for most network troubleshooting, this is what is typically needed.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /all – Retrieve All TCP/IP Network Information

This will show a detailed report of various network details for the computer. Again, your report will differ depending on your network setup and the network adapters installed on your computer. This report includes information such as:

As you can see, ipconfig /all provides you with a plethora of details about your computer network setup.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /release – Releases the IPv4 Address of All Network Adapters

Note, if you have a statically assigned (manually assigned) IP address, this command will not release it. See example ipconfig /renew for related information.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /release6 – Releases the IPv6 Address of All Network Adapters

The command is similar to ipconfig /release except it renews the IPv6 address on the adapters.

Ipconfig /release – Releases the IPv4 Address for a Specific Network Adapters

Note, if you have a statically assigned (manually assigned) IP address, this command will not release it. See example for ipconfig /renew for related information.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /renew – Get a New IPv4 Address for All Network Adapters

The ipconfig /renew will cause your computer to reach out to your DHCP server for an IPv4 address if it doesn’t already have one or renews an existing one for all network adapters. Depending on how your DHCP server is configured or the pool of available addresses, the IP address you will receive can be one you had previously or it can be a new IP address. Once you execute this command, it will typically take just seconds for a DHCP to assign your computer with an IP address. In the illustration below, the IP address assigned to this computer is 192.168.226.132.

See example for ipconfig /release for related information.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /renew6 – Get a New IPv6 Address for All Network Adapters

The command is similar to ipconfig /renew except it renews the IPv6 address on the adapters.

Ipconfig /renew – Get a New IPv4 Address For a Specific Network Adapter


How to use batch file to update network connection in Windows 10. Video

Ipconfig /all | findstr /v 00-00-00 | findstr Physical
– Display MAC Address of Only Physical Connected Network Adapters

The ipconfig utility, with the /all switch, is often used to find the MAC address (the 6-byte ‘burned-in’ physical/hardware address) of network adapters. While this does the job, the output shows a plethora of information as mentioned above. If you have multiple adapters, the output can be lengthy making it cumbersome to find what you are looking for.

This command is actually a series of three commands, namely:

As the above command shows, the output of ipconfig /all is funneled into the command findstr /v 00-00-00 as its input. The findstr with the /v switch will look for lines of text in the output of ipconfig /all that does not contain 00-00-00. What this does is exclude any network adapters that are disabled or not connected. These network adapters will have MAC address that starts with 00-00-00.

The result from the first findstr will still contain a lot of information that we can further filter out, such as DHCP lease information. To further reduce clutter to ultimately end up with an output that lists only MAC address of physical adapters, we will need to funneled the output of the first findstr into a second findstr command. This second findster will filter out every line of text except those that has the word Physical.

:/>  Пропал ctfmon exe и за что отвечает процесс ctfmon.exe в винде и можно ли его отключить

This series of commands produce an output that is concise to show only the MAC address of connected network adapters. As the illustration below shows, this is a much more easier report to read as oppose to using just using ipconfig /all.


How to use batch file to update network connection in Windows 10. Video

Ipconfig /displaydns – View DNS Cache

When you visit a website using it’s domain name (e.g., www.meridianoutpost.com), your computer will need to know the IP address for that website in order for it to find it the server hosting it on the Internet. The process of identifying the IP address is called DNS lookup (analogous to looking up a number in a phone book). Once your computer learns the associated IP address for the website you want to visit, it will cache it (store it) on your computer. The purpose of caching it is to improve performance by not having your computer perform a DNS lookup each time you access a web page on the website.

This command will list all the currently cached IP addresses on your computer (also referred to as the DNS resolver cache). If you’ve accessed a lot of websites since turning on your computer, this list can be very lengthy. The illustration below shows just a few entries out of many for a particular computer. If you just turned on our computer and have not access websites or servers on the network on the Internet, then you list will only show a “localhost” setting in your local hosts file.

This command is typically used to troubleshoot specific DNS lookup issues. See example for ipconfig /flushdns for related information.


How to use batch file to update network connection in Windows 10. Video

The information displayed on the list include:

Ipconfig /flushdns – Purge DNS Cache

This command will purge the cached DNS entries on your computer. You would typically do this to troubleshoot DNS related problems. An example of this is when you try to access a website but you encounter an error message stating the website is not found. For most people, executing this command does not have an adverse effect on your computer. See example for ipconfig /displaydns for related information.

How to use batch file to update network connection in Windows 10. Video

Other Usages and Getting Help

How to use batch file to update network connection in Windows 10. Video

Tips

Improve confidence and job performance

Improve productivity and efficiency

Summary

This is one of the most common utilities for fixing network connection problems. on Windows (as well as ping, net, netstat, nslookup, tracert, pathping, arp, route).

Network adapter display example:

IPv4 Address. . . . . . . . . . . : 192.168.72.1(Preferred)

DHCP Enabled. . . . . . . . . . . : Yes

Note that the address is assigned by the DHCP server 192.168.72.254.

DHCP Server . . . . . . . . . . . : 192.168.72.254

Lease Obtained. . . . . . . . . . : Wednesday, March 6, 2019 7:42:01 AM

Lease Expires . . . . . . . . . . : Wednesday, March 6, 2019 8:26:49 AM

To reset the IP settings of all network adapters on the computer, use the command:

When this command is issued, the client sends a DHCPRELEASE packet to the DHCP server indicating that the client no longer needs to use its network address.

If the adapter name contains spaces, its name must be enclosed in quotation marks.

You can also use wildcards * ? For example:

ipconfig /release *Ethernet0*

As with the release option, ipconfig / renew can take an optional attribute – the name of the network connection.

ipconfig /release && ipconfig /renew

Оставьте комментарий