How to change the IP address in batches

  
In the network room I manage, there are often some remote training or test activities. Sometimes it is necessary to temporarily change the IP address in the entire computer room to the IP address of the metropolitan area network, and guide the students to modify it themselves. Obviously not a good idea. Through the related attribute setting operation of “My Network Neighborhood”, it is often a lot of time to change the IP address of hundreds of computers step by step. This is the main reason why I have to go to the computer room for more than half an hour before each activity. . By chance, I found that using a batch file with only two lines of text content, and with the file distribution and batch run functions of the network e-classroom, I can quickly get a similar IP address fast change problem. Here is an example of the XP system commonly used by student machines. First, open the “Notepad” program that comes with the system and enter the following two lines of text code: netsh interface ip set address name="local connection" source=static addr= 10.16.131.100 mask=255.255.255.0netsh interface ip set address name="local connection" gateway=10.16.131.1 gwmetric=0 Among them, the function of the first line of code is to modify the static IP address of this machine to “ld.16.16” .131.100”, the subnet mask is changed to  quo;255.255.255.0”, the function of the second line of code is to modify the default gateway to "10.16.131.1", and the DNS server address and other information usually do not need to be modified. Next, execute the “File-Save As” command to save the file as an executable file with the extension “()”, and distribute the file to all student machines through the network electronic classroom software. And according to the corresponding student machine number, the end of the IP address is modified and saved accordingly. For example, from 10.16.131.101 to 10.16.131.200, 100 computers can be identified, and then the remote operation function of the electronic classroom software can be simultaneously performed. Run the above batch file, no matter how many computers in the computer room, you can quickly complete the temporary modification of the IP address of the entire computer room. Since the computers in the network room usually install various system recovery software, you only need to restart the system to restore the original IP address. In addition, we can also save the original IP address as a batch file by referring to the above method. After the activity is finished, run it in batches, and you can quickly modify the IP address back. This article comes from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved