Set the IP address quickly !!

Source: Internet
Author: User

 

Use a batch file to set the IP address. If the IP address is set to 192.168.1.8 subnet mask to 255.255.255.0 gateway as 192.168.1.1 primary DNS to 202.96.128.68 backup DNS to 202.96.128.166, you only need to copy the following file content to a notepad, change the extension. bat, run this bat file: echo off CLS title set ip echo is setting IP address, please wait ...... Netsh interface IP Set address "Local Connection" static 192.168.1.8 255.255.255.0 192.168.1.1 1 ECHO is changing DNS settings. Please wait ...... (REM) Netsh interface IP Set DNS "Local Connection" static 202.96.128.68 primary (REM) Netsh interface IP add DNS name = "Local Connection" ADDR = 202.96.128.166 echo ****** congratulations! The modification is complete! * ***** Pause Note: The last parameter 1 is indispensable! If you do not need to set DNS, you can use REM to comment out the two lines of DNS settings. Clear IP Address Settings, set to automatically get IP Address: echo off CLS title clear ipsettings ECHO is clearing IP address, please wait ...... Netsh interface IP Set address name = "Local Connection" Source = DHCP (REM) ECHO is clearing DNS settings. Please wait ...... (REM) Netsh interface IP Set DNS name = "Local Connection" Source = DHCP echo Delete IP settings, set to automatic. Echo **************** congratulations, the command is successfully completed! * ************ Pause

After the settings are complete, you can run CMD and ipconfig/all to view the modified IP address.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.