Recently I have been carrying a notebook to work in the company, my headache is the day the company's network is to set up static IP, and the home network is automatically acquired. Oneself to the company opened a computer, every day the first thing is to re-enter the IP address and other information, it is very frustrating. I went to the Internet to check the batch processing set the IP address of the method, the following share to everyone. Preface
The static IP address is set primarily by the Netsh command, or automatically obtained. Netsh is a powerful network configuration command-line tool provided by the Windows system itself. set a static IP address
netsh interface ip set address name= "Local Area Connection" source= "static" Addr= "10.9.0.87" mask= "255.255.255.0" gateway= "10.9.0.254" gwmetric= "1"
netsh interface ip set DNS name= "Local Area Connection" Source=static addr= "8.8.8.8"
With the top two commands, you can set a static IP address, just change the corresponding information to your network information. set up auto Get IP
netsh interface ip set address "Local Area Connection" DHCP
netsh interface ip set DNS "Local Area Connection" DHCP
With the top two commands, you can set the IP address to get automatically.
In order to quickly change the IP address later, you can save the above two commands as a batch file with the suffix. bat, then double-click the batch file to quickly set the IP address. The following figure:
set static Ip.bat
set up auto get Ip.bat