Use netsh to synchronize network configurations

Source: Internet
Author: User

Backup:
Netsh dump c: \ ipconfig.txt

Restore:

Netsh exec> C: \ ipconfig.txt

Http://www.shilicn.com/czxitong/xp/1463.html

In many cases, we may need to work in different networks. It is troublesome to modify IP addresses repeatedly over and over again. In addition, the system crashes, and network card reconfiguration and other related parameters are also annoying (especially wireless network card ). In fact, using the built-in netsh command of Windows 2000, XP, and 2003 can not only quickly switch IP addresses, but also switch between static and dynamic IP Address Settings at any time, you can also back up and restore network settings at any time.

What is netsh?
Netsh is a command line script utility provided by the Windows 2000/XP/2003 operating system. It allows users to display or modify the network configurations of the currently running computer locally or remotely.
Instance 1: Switch IP addresses anytime, anywhere
Open notepad, create a new file, and enter the following code:
Netsh interface IP Set address "Local Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1
Click "File> Save", set the Save type to all files, name the file home. cmd, and save it on the desktop.
Similarly, create an office. CMD file and enter:
Netsh interface IP Set address "Local Connection" static 192.168.1.11 255.255.248.0 192.168.0.1 1
In the future, you only need to double-click home. CMD can quickly switch the IP address to 192.168.0.10, subnet mask: 255.255.255.0, Gateway: 192.168.0.1, and then double-click office. in cmd, the IP address is switched to 192.168.1.11, The subnet mask is 255.255.248.0, And the gateway is 192.168.1.1.
TIPS:
1. The IP addresses assigned by network administrators of different companies are different. You can set the IP addresses based on your actual situation.
2. In the above command, "Local Connection" is the name of the NIC connection. You can double-click the "Network Connection" icon in "Control Panel" to view the name of the corresponding Nic. If you have multiple NICs, you only need to modify the above "Local Connection" Name and IP address, subnet mask and gateway.
3. the last 1 of the preceding commands is the number of hops. This value is professional and can be set to 1. ignore this.
Instance 2: fixed/dynamic IP address change at any time
First create a static. CMD file on the desktop, and then enter the corresponding code, such:
Netsh interface IP Set address "Local Connection" static 192.168.0.12 255.255.255.0 192.168.0.1 1
Create a DHCP. CMD file and enter the following code:
Netsh interface IP Set address "Local Connection" DHCP
Ipconfig/release
Ipconfig/Renew
Double-click static. CMD on the desktop to change the IP address of "Local Connection" to 192.168.0.12, subnet mask: 255.255.255.0, and Gateway: 192.168.0.1. Double-click the DHCP. CMD file and set "Local Connection" to "Dynamic IP" immediately, and obtain the latest IP address from the DHCP server immediately.
Instance 3: backup/recovery network settings
In addition, netsh can back up the current network status, press win + R, enter the CMD command, press enter, and enter the following code at the "command prompt:
Netsh dump> D:/netbck.txt
This will back up the current network settings to the D:/netbck.txt file, which is a text file, including the settings of all network adapters in the current system, and save it. After the machine crashes or the system needs to be re-installed, you can use the backup to quickly restore network settings. All you need to do is enter netsh exec D:/netbck.txt at the "command prompt ".
You can.
The netsh command is indeed a very good tool, which is simple, convenient, and fast and effective, without the need for other software assistance (many similar software are charged) you can quickly manage, back up, and restore your network.

Source of this article: Example tutorial Network (www.shilicn.com) original link: http://www.shilicn.com/czxitong/xp/1463.html

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.