All over the internet I see example of how to set up dhcpd with WAPD proxy auto configuration using DHCP. In the /etc/dhcpd.conf file there are statements like this:

option wpad code 252;  
option wpad code 252 = text;  

What is code 252, where is it defined and what does it mean. Why is it a number 252 and not a useful statement like wpad-proxy-url; Why use 252 and not some other number (0, 5000). I get that it works, it just does not make any sense to a human (me). Googling for what is option 252 has been fruitless.


Option 252 provides a DHCP client a URL to use to configure its proxy settings. It's defined in draft-ietf-wrec-wpad-01.

If it was a statement like "wpad-proxy-url" then only systems that understood it could use it (they'd have to recognize that string and know how to handle it). Since it's a number, an arbitrary tag, it can be processed even by servers that don't understand it.

For example, if I say "What's on Jessica's head?" you have to know who Jessica is to answer me. But if I say "What's on the head of the third person in line?" you don't have to know that her name is Jessica.

It's 252 because that was the number assigned to the protocol by the IETF DHC working group. See RFC 2132.

  • 2
    DHCP option 252 is in the private-use area, so surely IETF DHC working group wouldn't assign it. – Craig McQueen Nov 14 '18 at 2:28
  • moreover, servers that process it w/o knowing it are actually forwarding those — they could forward those options if they were strings as well – poige Feb 20 at 2:58

Here is a nice link that lists what many of the code ### number mean and how they are used. http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml

252 is part a private usage reserved section. Basically for other people to use in there servers as they feel necessary.

Microsoft, decided to use 252 for their dhcp server, and then wrote into their browsers the ability to speak to the dhcp server and ask for code 252 to get information about proxy setup on the network form the url listed by the option.

Firefox, and chrome still require the dns setup to server the .pac file for proxy configuration. They currently don't work with the dhcp option.

  • 3
    Microsoft didn't pull 252 out of a hat. The request was made by representatives of Microsoft, Inktomi, RealNetworks and Sun Microsytems, and it was approved by the IETF DHC working group. (I admit, this makes it particularly baffling that a number from the block reserved for private use was chosen.) – David Schwartz Jan 31 '12 at 11:01
  • 3
    @David, How come it is not listed in iana.org/assignments/bootp-dhcp-parameters/… ? – nhed Aug 14 '12 at 20:45
  • Maybe because the WPAD specification never made it to a real RFC. It was "only" a "Internet-Draft"?? – Philip Helger Sep 28 '18 at 7:14

More lightweight option is to publish PAC file using DNS

namely a browser will fetch http://wpad.example.com/wpad.dat without needing raw network access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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