Batch IP Creation Method

Source: Internet
Author: User

The following tutorial will show you how to add IP addresses in batches through command lines in windows. Target: In the NIC named "Local Connection" of the Local Machine, add IP addresses in the range of 192.168.1 in batches. The starting IP address is 10. Add 1 each time until 22 is known, that is, the three parameters in brackets.
Add IP addresses bound to NICs in batches
Method 1
Run the following command on the CMD command line:
For/L % I in (10, 1, 22) Do netsh interface IP add address "Local Connection" 192.168.1.% I 255.255.255.0
Method 2
Create a BAT file with the following content:
@ Echo off
For/L % A in (10, 1, 22) Do netsh interface IP add address name = "Local Connection" ADDR = 192.168.1.% A mask = 255.255.255.0
Batch Delete the IP addresses bound to the network card. [perform the following operations when the network card IP address is bound.]
Run the following command in cmd:
Step 1: netsh-C int IP dump> C: \ ip.txt
In the C root directory, an ip.txt file is displayed, which contains the settings of the current nic. in order to better understand the IP address settings.
Step 2:
Edit this file and delete the IP address you want to delete in IP. txt.
Step 3:
Netsh-f c: \ ip.txt
Re-import the IP address of the NIC information to the NIC.

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.