This tutorial is a step by step guide to save and set up ethernet settings easily. If you have two or more internet connections and you need to switch between them often, this this tutorial can help you save your time and effort.
In order to access internet, you have to do some ethernet settings in your computer. It is easy to set Internet Protocol TCP/IP properties. In Windows based computers, it can be found in Network Connections in Control Panel.
It has five vital ethernet settings. These settings are :
- IP Address
- Subnet Mask
- Default Gateway
- Preferred DNS Server
- Alternate DNS Server
Problems in Changing Ethernet Settings
Sometimes a user has two or more network connections, and every time he/she switches from one connection to the other, he/she has to change the Internet Protocol settings accordingly.
For a few timers it can be an affordable process, but for those who regularly switch from one network to another it is an irritating process to change the settings again and again. What if you forget one of the setting parameters?
Easy Solution for Frequent Ethernet Settings
In Windows, there is an easy method to do ethernet settings in just a double click. For this, first you have to save the relevant parameters in a file with .bat extension. To apply the settings you have to just double click this file.
If you have two or more connections and you regularly need to switch between them, then you will have to create a separate file for each connection.
Let’s learn here at – how to create these .bat files?
Step 1 :
Change the name of your Ethernet Adapter to something easy to remember. Go to Network Connections in Control Panel. Right click on the relevant Ethernet Adapter and Rename it. See the screenshot below.
I have named my ethernet adapter : USB TO LAN
Step 2 :
Open Notepad and copy and paste in it, the code below :
netsh interface ip set address name="USB TO LAN" source=static addr=126.96.36.199 mask=255.255.255.128 netsh interface ip set address name="USB TO LAN" gateway=188.8.131.52 gwmetric=0 netsh interface ip set dns name="USB TO LAN" source=static addr=184.108.40.206 netsh interface ip add dns name = "USB TO LAN" addr=220.127.116.11
Edit the parameters according to your settings. Note that I have renamed my Ethernet Adapter to USB TO LAN. Other addresses that appear in the code in respective order of their appearance are IP Address, Subnet Mask, Default Gateway, Preferred DNS Server and Alternate DNS Server. Change all of them according to your settings. Don’t change anything else.
Step 3 :
Save the file to some convenient location with .bat file extension. You can choose any name for the file.
I have saved the file with file name : mynetsettings.bat
Step 4 :
Run the .bat file. The following black command prompt will appear. See the screenshot below. Let it run. It will automatically close itself once the settings are applied.
Separate .bat Files for Every Connection
You should make separate .bat files for each internet connection. To apply a connection setting, run the respective .bat file. Now, switching between networks is super-easy.