Use the netsh command in Windows to back up network settings

Source: Internet
Author: User
Tags configuration settings
Use the netsh command in Windows to back up network settings

Http://anheng.com.cn/news/23/301.html

In the process of network fault recovery, one of the important tasks is to restore the server network settings.

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. To archive, back up, or configure other servers, netsh can also save the configuration script in a text file.


Run the netsh command

You can run the netsh command in two cases.

1. Run the netsh command locally.

Click Start> Run. In the run dialog box, enter the CMD command and click [OK]. Then, enter the netsh command at the command prompt.

After entering netsh>:

The following commands are valid:

Commands in this context:

...-Move to the context level of the previous layer.

? -Display the command list.

Abort-discard the changes made in offline mode.

Add-Add a configuration project to the project list.

Alias-add an alias

Bridge-change to the 'netsh bridge 'context.

Bye-exit the program.

Commit-submit the changes made in offline mode.

Delete-delete a configuration item from the project list.

Diag-changed to the 'netsh diag' context.

Dump-displays a configuration script.

Exec-run a script file.

Exit-exit the program.

Firewall-changed to the 'netsh Firewall' context.

Help-display the command list.

Interface-changed to the 'netsh interface' context.

Offline-set the current mode to offline.

Online-set the current mode to a VM instance.

Popd-open a context from the stack.

Pushd-push the current context into the stack.

Quit-exit the program.

Ras-changed to the 'netsh Ras 'context.

Routing-changed to the 'netsh routing' context.

Set-Update Configuration Settings.

Show-display information

Unalias-delete an alias.

The following sub-contexts are available:

Bridge diag firewall interface Ras Routing

If you need more help information, enter the command,

Followed ?.


2. Run the netsh command remotely.

To run the netsh command on a remote Windows 2000 server, you must first use Remote Desktop Connection to connect to the Windows 2000 Server that runs the terminal service, the subsequent operations are the same as using the netsh command locally.


Backup/recovery

Server network settings

When talking about network settings, you will surely think of IP addresses, subnet masks, gateways, DNS, and so on (these are mainly interface IP configuration parameters ). For normal computers, network settings only have interface IP configuration parameters. for servers, network settings not only include the aforementioned interface IP configuration parameters, there are also interface configuration, port proxy configuration, remote access configuration, route configuration, DNS proxy configuration, NAT configuration, DHCP relay proxy configuration, and so on. The preceding network settings vary depending on the special role of the server in the network. For example, the Windows 2000 Server server is used in the campus network to connect to the Internet and multiple subnets in the campus, you must configure remote access, route, DNS proxy, and Nat on the server.

1. network settings of the Backup Server

Backup is the most frequent task performed by an experienced network administrator. The network can be restored quickly and timely only when a backup is performed and the network is damaged. Network Setting backup operation: netsh dump> bak12.txt. after this operation, you can set the network to the bak12.txt file, which is a text file.

After the network settings are adjusted, backup should be performed immediately.

2. Restore the network settings of the server

When adjusting network settings, if an operation error occurs or the server network fails, you can use backup to quickly restore network settings. Operation Method: nesh exec bak12.txt.

Using the netsh command to back up server network settings is extremely simple and convenient, and is fast and effective. It is suitable for network administrators to back up and manage server network settings without any assistance from other software.

 

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.