Do not know whether friends have such an experience, the laptop to the unit when the Internet, because the unit needs to be fixed with the IP address, and the home is automatically get IP address, so every day to this IP address settings to set to go, then there is no simple and convenient way? In fact, we can do a batch process, Each time you want to set the IP address, just run the batch process.
Set IP address batch, save the following code in Notepad as. BAT file, such as: Ipadd.bat, double-click to run.
Copy Code code as follows:
@echo off
echo Htmer Modify IP Address tool
Echo is setting up your IP address, please wait a moment ...
netsh interface ip set address name= "Local Area Connection" Source=static addr=192.168.0.2 mask=255.255.255.0
netsh interface ip set address name= "Local Area Connection" gateway=192.168.0.1 gwmetric=0
netsh interface ip set DNS name= "Local Area Connection" Source=static addr=192.168.0.3 register=primary
netsh interface ip add DNS name= "Local Area Connection" addr=192.168.0.4
netsh interface ip set wins name= "Local Area Connection" Source=static Addr=none
The above code in the relevant parameters described below, according to your actual situation can be modified:
Copy Code code as follows:
Addr=192.168.0.2--ip Address
mask=255.255.255.0--Subnet Mask
gateway=192.168.0.1--Gateway
addr=192.168.0.3--Preferred DNS
addr=192.168.0.4--Alternate DNS (if there is no alternate DNS, please delete this line of code)
Second, set up automatic IP address, the following code to save with Notepad. BAT file, such as: Dhcp.bat, double-click to run.
Copy Code code as follows:
@echo off
echo Htmer Modify IP Address tool
Echo is setting up an automatic IP address, please wait ...
netsh interface ip set address name= "Local Area Connection" Source=dhcp
netsh interface ip set DNS name= "Local Area Connection" Source=dhcp
Description: The "local link" in the above code is the system default name for the network link in your computer, if you have more than one network card installed, or if you renamed the local link, change the corresponding local link name in the code to your current name.