Want to quickly change the IP under W2K, use the habitual ROTER, SWITCH command line to configure? Then use Netsh, what is Netsh? Netsh is the command line script utility provided by the Windows 2000 / XP / 2003 operating system itself, which allows users to display or modify the network configuration of currently running computers locally or remotely. For archive, backup, or configure other servers, NetSh can also save configuration scripts in a text file. There are two situations where running netsh commands. 1. Local running netsh command Click "Start → Run", enter the cmd command in the Run dialog and click [OK], then enter the netsh command after the command prompt will be entered. 2. To run the netsh command remotely to run the netsh command on the remote Windows 2000 Server server, first use the Remote Desktop Connection to connect to the Windows 2000 Server server running the terminal service, followed by using the Netsh command locally.
Backup / recovery
Server Network Settings When you talk about network settings, you will think of IP address, subnet mask, gateway, DNS, etc. (these mainly interface IP configuration parameters). For ordinary computers, network settings are only interface IP configuration parameters; for the server, network settings include not only the interface IP configuration parameters mentioned earlier, and interface configuration, port proxy configuration, remote access configuration, routing configuration , DNS proxy configuration, NAT configuration, DHCP relay proxy configuration, etc. The above network setting parameters are different depending on the special effects of the server in the network. For example, the Campus Network is responsible for connecting the external network in the campus network, and connects multiple subnets in the school, then they must Set Remote Access Configuration, Route Configuration, DNS Agent Configuration, and NAT Configuration. 1. Backup Server Network Setting up an experienced network administrator's most frequent job is backup. Only the backup is made, and the network can be quickly restored when you encounter devastating damage. Network Settings Backup Actions: Netsh Dump> Bak12.txt, you can back up your network settings into the Bak12.txt file through this operation, which is a text file. After adjusting network settings, you should instantly backup. 2. The network settings of the recovery server are adjusted to network settings, or if an operation error occurs, or the server network fails, you can use a backup quick recovery network settings. Operation method: NESH EXEC BAK12.TXT. By backing the server network settings through the Netsh command, it is very simple and convenient, and it is quick and effective. No other software assist is required, it is very suitable for network managers to back up and restore management.
Here is how to operate NetSh, some things may write less detailed, you need to do it yourself.
C: /> ipconfig (first use ipConfig this command to see the previous IP address)
Windows 2000 IP Configuration Ethernet Adapter Local Connection: Connection-Specific DNS SUFFIX.: Ip address................................... 255.255.255.0 Default Gateway................................
C: /> netsh (enter setting mode) Netsh> interface interface> IP interface IP> Set Address "Local Connection" Static 10.1.1.111 255.255.255.0 10.1.1.254 Interface IP> EXIT The set command above the SET command is explained below:
Set Address - Set the IP address of the specified interface and the default gateway. SET DNS - Sets DNS server mode and address. SET WINS - Sets WINS Server Mode and Address.
C: /> ipconfig (After the change, look at the ipconfig command, confirm if the change is successful)
Sign In WINDOWS 2000 IP Configuration Ethernet Adapter Local Connection: IP Address.........................: 255.255..........: 255.255........: 255.255. ..........................................: 10.1.1.254
Let's take a look at the Netsh command list (input in Netsh mode? Then use it carries with Netsh>?) .. - Move to the previous layer. ? - Display the list of commands. AAAA - Change to `aaaa` context. Abort - Discard changes made in offline mode. Add - Add a configuration item to the project list. Alias - Add a alias bye - exiting the program. Commit - Submit changes made in offline mode. Delete - Delete a configuration item on the project list. DHCP - Change to `DHCP` context. Dump - Displays a configuration script. Exec - Run a script file. Exit - Exit the program. Help - Displays the list of commands. Interface - Change to `Interface` context. Offline - sets the current mode to offline. Online - sets the current mode to an online. POPD - Open a context from the stack. Pushd - Push the current context into the stack. Quit - Exit the program. Ras - Change to `Ras` context. Routing - Change to `Routing` context. SET - Update Configuration Settings. Show - Display Information UNALIAS - Delete an alias. WINS - Change to `Wins` context.
In the process of work, it will encounter network debugging in different network segments, often need to switch the machine in several different IP addresses. Changing the IP address in the Win2000 operating system is more convenient than Win98 because it is not necessary to restart the computer after the IP address is changed, but it is necessary to enter network attribute settings. Is there a way to make a little more, such as double-click a shortcut to implement the switching of the IP address? The answer is yes. This feature can be implemented with the Netsh command in Win2000. First enter the command line mode ("CMD" can enter the command line mode in "Start → Run"), type NETSH to enter Netsh interface at the prompt. Type IP to enter the interface IP configuration mode, type DUMP, list the interface IP configuration information: c: / documents and settings / administrator> netsh netsh> netsh> int ip interface ip> dump # -------- -------------------------- # interface ip configuration # ------------------- --------------- Pushd Interface IP # "Local Connection" interface IP configuration (Note: The following shows the specific machine case) set address name = "Local connection" Source = Static Addr = 192.168.0.5 mask = 255.255.255.0 set address name = "Local connection" GATEWAY = 192.168.0.2 GWMETRIC = 1 set DNS name = "Local connection" Source = static addr = 61.237.17.181 add dns name = "Local connection" Addr = 211.97.168.129 Add DNS Name = "Local Connection" Addr = 211.98.4.1 Set Wins Name = "Local Connection" Source = Static Addr = None # "Local Connection 2" interface IP configuration set address name = "Local connection 2 "Source = DHCP SET DNS Name =" Local Connection 2 "Source = DHCP SET WINS Name =" Local Connection 2 "Source = DHCP POPD # Interface IP Configuration End Now We can change the way to change the IP address with the Netsh command, Through the "Set Address Name = Connection Name (the connection name must be enclosed with quotation marks) Source = Static Addr = IP address MASK = subnet mask" is implemented. Try it directly with Netsh in the command line mode. For example, to change the IP address of this unit to 192.168.0.7, the subnet mask is 255.255.255.0, you can do the following *: c: / documents and settings / administrator> netsh netsh> int ip interface ip> set address name = "Local connection" Source = static addr = 192.168.0.7 mask = 255.255.255.0 confirmation changes.