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 172.16.2.10 scope 172.16.2.0 add reservedip172.16.2.100 00055de2e509 pxp3

Comments:

DHCP represents a DHCP configuration

The Server 172.16.2.10 represents the host IP address where DHCP resides.

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

add ReservedIP 172.16.2.100 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 172.16.2.10 scope 172.16.2.0 add ReservedIP 172.16.2.100 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.

Statement:

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:

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.