There is no doubt that setting up IP in windows is very convenient because there is a simple and intuitive interface to operate. Setting the IP through the graphical user interface is generally sufficient, but for those who travel frequently and change jobs, it is time consuming and inconvenient to modify the IP. It is very convenient and quick to put the command to set the IP in a script file.
Set the IP step with the command line (WIN7, set for IPV4):
1. Set a static IP
netsh interface ipv4 set address name="local connection" Source=static addr=192.168.20.11 mask=255.255.255.0 gataway=192.168.20.1 gwmetric=30
The gateway settings for black fonts are optional.
2, set multiple IP, pay attention to the difference between the red part of the command
netsh interface ipv4 set address name="local connection" source=static addr=192.168.20.11 mask=255.255. 255.0 gataway=192.168.20.1 gwmetric=30 netsh interface ipv4 add address name="local connection" addr=192.168.1.11 mask=255.255.255.0 gwmetric=30 This command sets 192.168.20.11, 192.168.1.11 two IP< Br>
3, set to automatically get IP
netsh interface ipv4 set address name="local connection" source=dhcp
4, set the domain name netsh interface ipv4 set dns name= "Local Connection" source=static addr=202.106.0.20 register=PRIMARY
addr is the domain name server address, PRIMARY refers to the primary domain name
Full example:
A, Office LAN uses beijing-office.bat
netsh interface ipv4 set address name="local connection" source=static addr=192.168.20.11 mask=255.255.255.0 gwmetric=30 netsh interface ipv4 add address name= "Local Connection" addr=192.168.1.11 mask=255.255.255.0 Gwmetric=30 REM netsh interface ipv4 set dns name="local connection" source=static addr=202.106.0.20 register=PRIMARY
B, hotel Internet access, suitable for automatic access to IP settings, beijing- Hotal.bat
netsh interface ipv4 set address name="local connection" source=dhcp netsh interface ipv4 set dns name="local connection" source=static addr=202.106.0.20 register=PRIMARY netsh Interface ipv4 add dns name="local connection" addr=202.106.46.151
After creating these two script files, you can execute the corresponding script file in different environments, which is very convenient.
Reinstalling the system using the u disk is currently the most common method, but in the process of
In the process of using the mobile hard disk, it is inevitable that some problems will be encountere
Lenovo Y460 users usually hear noise when using the computer, because this notebook is equipped with
Using windows system friends in addition to the own screenshot function and use qq many screenshot m
Simply solve the BIOS optimization problem
Prevent mail server poisoning firewall debut
Just a few steps to help you open the door to a blocked website
Computer disk partitioning needs to pay attention to the problem
Sharing the setting of the optical drive as the first method of starting
Right-click menu troubles four ways to solve
Demystifying the use of the Ping command
Win10 TH2 official version introduces a newer and more secure BitLocker encryption algorithm
How to replace the win10 ring icon
Talking about Win8 system and Microsoft's future
Windows8 system Windows7 compatibility mode
How to delete IE browser error certificate after Win7 reinstallation
How to repair Win7 system: How to do Win7 blue screen
Call God's hidden management features of Windows 7
How do I view the specific release version of Red Hat Enterprise Linux?
70 features and techniques to completely get Windows 7 (on)
Sogou input method to see the typing speed of the small coup