Automatic IP address batch processing in Windows

Source: Internet
Author: User

For users who use both Intranet and Internet, you often need to manually switch the Intranet and Internet IP addresses. A batch process for automatically switching IP addresses is provided. Windows 7 is as follows: [plain] netsh interface ip set address name = "Local Connection" source = static addr = 192.168.1.55 mask = 255.255.255.0 gateway = 192.168.1.1 rem netsh interface ip set dns "Local Connection" source = static addr = 8.8.8.8 windows XP: [plain] netsh interface ip set address name = "Local Connection" source = static addr = 192.168.1.55 mask = 255.255.255.0 netsh interface ip set address name = "Local Connection" gateway = 192.168.1.1 gwmetric = 0 rem netsh I Nterface ip set dns name = "Local Connection" source = static addr = 8.8.8.8 register = PRIMARY rem netsh interface ip add dns name = "Local Connection" addr = 8.8.8.8 index = 2 copy the preceding code to a local file (xxx.txt ), save and modify the suffix. bat. Note: you need to set the addr, gateway, and dns in the above Code according to your network environment.

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.