Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add netsh command to set Classless Static Route 249 in DHCP Scope, I use this command but it gave me an erorr, I am using windows server 2003 R2

netsh dhcp server \SRVDC01 scope set optionvalue 249 IPADDRESS

share|improve this question
It would help if we knew what error. – Chris S Dec 1 '10 at 19:49
up vote 2 down vote accepted

I suspect the errors you're seeing are:

Option data type supplied is not valid for the Option.

DHCP Server Set OptionValue failed.

Parameter(s) passed are either incomplete or invalid.

You're seeing these because option 249 must be specified as as BINARY value, not as an IPADDRESS value.

If you can't set this with the GUI then you'll have to convert your desired route into a hexadecimal string yourself. An example would be as follows: accessible via converts into "180a01010a010101". The first octet, "18", is the number of bits of subnet mask (0x18 = 24 decimal). The next octets are the network ID (0a = 10, 01 = 1, 01 = 1, for "10.1.1"), padded by zeros on the right if the subnet mask doesn't end on an even octet boundary. The last four octets are the IP address of the gateway.

Set the value in the GUI and you'll be happier.

share|improve this answer
Thanks, exactly, but somehow different to set 200 DHCP scope :-) – user19049 Dec 3 '10 at 8:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.