Set reserved IP addresses in bulk by command line

Source: Internet
Author: User
Tags reserved

First we know that there are two ways that DHCP adds a reserved address. One that is added to a reserved address in the scope, and another method that is bulk added through the command line.

Here's how to add a reserved address from the command line: (This method is available for testing on 2003R2 and 2008R2)

DHCP server scope add reservedip172.16.2.100 00055de2e509 pxp3


DHCP represents a DHCP configuration

The Server represents the host IP address where DHCP resides.

Scope The network number that contains the specified zone and zone.

add ReservedIP 00055de2e509 pxp3. Indicates that a reserved address (ADDRESERVEDIP) is added to assign a reserved IP address to the computer for MAC address 00055de2e509. The name reserved is PXP3. 。

How to use:

1. Save the command dhcpserver scope add ReservedIP 00055de2e509 in a text file, such as PXP3. 30 computers must have 30 such commands.

2. Then the command netshexec dhcp.txt to execute the commands in this file.

The TXT file into the C-packing directory, and then open a command prompt and switch to C-packing path, directly enter the following command.

netsh exec dhcp.txt Note: DHCP represents the file name of the TXT file you want to use, and you can use this method if you need to set up a large batch of reserved client IP addresses.


The method mentioned in this article only tests normally in single scope mode, and if your company is a multi-domain model, please let us know when you test or test your results.

The action effect is shown in the following illustration:

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.