1Dnsmasq from version 2.52 has a couple of rather application-specific
2features designed to allow for implementation of the DHCP part of CPE
3WAN management protocol.
4
5http://www.broadband-forum.org/technical/download/TR-069_Amendment-2.pdf
6http://en.wikipedia.org/wiki/TR-069
7
8The relevant sections are F.2.1 "Gateway Requirements" and F.2.5 "DHCP
9Vendor Options".
10
11First, dnsmasq checks for DHCP requests which contain an option-125
12vendor-class option which in turn holds a vendor section for IANA
13enterprise number 3561 which contains sub-options codes 1 and 2. If
14this is present  then the network-tag "cpewan-id" is set. 
15This allows dnsmasq to be configured to reply with the correct 
16GatewayManufacturerOUI, GatewaySerialNumber and GatewayProductClass like this:
17
18dhcp-option=cpewan-id,vi-encap:3561,4,"<GatewayManufacturerOUI>"
19dhcp-option=cpewan-id,vi-encap:3561,5,"<SerialNumber>"
20dhcp-option=cpewan-id,vi-encap:3561,6,"<ProductClass>"
21
22Second, the received sub-options 1, 2, and 3 are passed to the DHCP
23lease-change script as the environment variables DNSMASQ_CPEWAN_OUI,
24DNSMASQ_CPEWAN_SERIAL, and DNSMASQ_CPEWAN_CLASS respectively. This allows
25the script to be used to maintain a ManageableDevice table as
26specified in F.2.1. Note that this data is not retained in dnsmasq's
27internal DHCP lease database, so it is not available on every call to 
28the script (this is the same as some other data such as vendor and
29user classes). It will however be available for at least the "add"
30call, and should be stored then against the IP address as primary 
31key for future use.
32
33
34This feature was added to dnsmasq under sponsorship from Ericsson.
35
36
37