-2

I'm trying to automate the creation of DHCP scopes, but have run into a tricky pickle.

When I try to create a scope via the commandline like so:

netsh dhcp server add scope 10.10.15.0 255.255.254.0 "Clients"

It returns an error that simply says "Parameter(s) passed are either incomplete or invalid."

If I try to create the scope with those same parameters in the DHCP MMC plugin, it successfully creates the scope, but it creates it as 10.10.14.0. Likewise, if I run the command above with 14 instead of 15, it works.

2 Answers2

2

This is a simple matter of the mask - you have entered 255.255.254.0 versus 255.255.255.0

Since your mask needs to match the range - and 10.10.14.0 does - it works.

Tim Brigham
  • 15,545
  • 10
  • 75
  • 115
1

As we make very clear when you sign up to serverfault this site is for professional sysadmins - not beginners - and this is a staggeringly basic question.

You're asking for a /23 but 10.10.15.x is in the second 256-address block, not the first, that's 10.10.14.0 - so it's fixed your mistake for you. If you only want 10.10.15.0 then use a /24 not /23.

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • Ok first of all there is nowhere on sign up where it says "experts only". Second, my job isn't to design the network or how it works, just to automate the deployment of it. There's network guys that decide the IP scheme. I did ask them why it's a /23 instead of a /24 as I know that subnet never goes above 200 IPs in practice, and they simply said "Because", so what should I respond to them with? Third, the MMC seems to have no issue with creating it with the range and subnet mask specified, it just displays 14 instead of 15 in its window: http://i.imgur.com/d8PtCot.png – Chris Kennedy Dec 22 '15 at 19:18
  • 2
    @ChrisKennedy Expecting there to be a "Experts Only" warning _on the signup page_ is a bit simplistic. The FAQ / Help page explains that there's a minimum barrier to enter that involves searching for answer first, and reasonable business practices (including knowing knowing basic subnetting). Wether or not you have others in your company who's job is one thing or another, and wether or not something is your job or not is completely inconsequential here. In the future if you put a minimum amount of effort into solving your problem before asking a question you will be received much better. – Wesley Dec 23 '15 at 00:26