Automatically switch IP address (zz) with netsh command in WINXP)

Source: Internet
Author: User

I knew it a long time ago. paste it for your reference. Reprinted as follows:

Due to security issues, I did not directly connect to the Intranet and the Internet, but assigned two IP segments. It is very troublesome to switch back and forth during daily use, fortunately, IBM provides a dedicated accessconnection software for small black, which is easy to use, but accessconnection cannot be used on the desktop. I use the system's built-in command netsh to implement the accessconnection function.

1. manually set the IP address in the Intranet for the network adapter, right-click "network neighbor → properties" on the desktop, and set the TCP/IP attribute of "Local Connection", for example, IP Address: 192.168.0.100, and subnet mask: 255.255.255.0.

2. after setting, click "start"-"run"-enter 'cmd' to enter the command line mode and enter the following command: netsh-C interface dump> C: \ innet.txt saves the internal network configuration that was manually set.

3. redo Step 1: Set the TCP/IP attribute of the NIC to the network configuration used in intenet, and execute the following command in the command line: netsh-C interface dump> C: \ outnet.txt saves the network configuration information of the Internet that was manually set.

4. open notepad, enter netsh-f c: \ innet.txt, and save it as 'intranet. bat '; similarly, create another batch processing file, input: netsh-f c: \ outnet.txt, and save it as "Internet. bat"

5. Send the creation shortcuts for the two batch files to the desktop. In this way, you can run 'intranet. bat' on the Intranet and "Internet. Bat" on the Internet"

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.