TR-069 CWMP Provisioning on ISC-DHCPD

0
(0)

Technical Report 069 (TR-069) is a technical specification of the Broadband Forum that defines an application layer protocol for remote management of customer-premises equipment (CPE) connected to an Internet Protocol (IP) network. TR-069 uses the CPE WAN Management Protocol (CWMP) which provides support functions for auto-configuration, software or firmware image management, software module management, status and performance managements, and diagnostics..

The TR-069 protocol allows DHCP servers to send one or more vendor-specific parameters to the client router. A CWMP configuration requires the following parameters for the URL to the auto-configuration server (ACS) for provisioning via ISC-DHCPD:

subnet 192.168.0.0 netmask 255.255.255.0
        option routers 192.168.0.1;
        range 192.168.0.100 192.168.0.111;
        append dhcp-parameter-request-list 43;
        option vendor-encapsulated-options 01:12:68:74:74:70:3a:2f:2f:61:63:73:2e:69:73:70:2e:6f:72:67;
}

Example ACS URL https://acs.isp.org

The option vendor-encapsulated-options must be specified as an encoded sequence of identical syntax with code, length and value field to the DHCP option.

The code for this option is 43 and its minimum length is 1.
Code Len Vendor-specific information
+-----+-----+-----+-----+---
|  43 |  n |  i1 |  i2 | ...
+-----+-----+-----+-----+---

When encapsulated vendor-specific extensions are used, the
information bytes 1-n have the following format:

Code Len Data item Code Len Data item Code
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
|  T1 |  n |  d1 |  d2 | ... |  T2 |  n |  D1 |  D2 | ... | ... |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+

Section: IETF rfc2132 – DHCP Options and BOOTP Vendor Extensions

url2hex

For the conversion is the following bash script, which can run as follows ./url2hex https://acs.isp.org

#!/bin/bash
if [[ -z $1 ]]; then
  echo "Argument missing! Use: url2hex url"
  exit 1
Fi
echo ""
echo [[[ URL2HEX Converter ]-e "]]-nTR-069 CWMP request ACS URL provisioning on ISC-DHCPD option vendor-encapsulated-options"
echo "URL:"1"
wcount='echo . wc -m'
tcount='echo 'wcount'-1 | bc'
length='printf '%x'n'
hexurl='echo -n ' 1 | xxd -ps | s[[:xdigit:]ed 's/]''2'/':&/g''
echo -e "URL-length:"tcount" HEX:"length" nvalues for CWMP provisioning in dhcpd.conf:
echo "append dhcp-parameter-request-list 43;"
echo "option vendor-encapsulated-options 01:"length"

Save the code lines to a file url2hex and make them executable.

chmod 755 url2hex

The length of the passed string is calculated and converted to the HEX value, the string itself is also converted to HEX, after which the values are hung together, starting from 0x01 for the value of the CWMP option for the ACS URL.

The output can then look like this:

[[[ URL2HEX Converter ]]]
TR-069 CWMP request ACS URL provisioning on ISC-DHCPD option vendor-encapsulated-options
URL:https://acs.isp.com
URL-length:18 HEX:12

values for CWMP provisioning in dhcpd.conf:

append dhcp-parameter-request-list 43;
option vendor-encapsulated-options 01:12:68:74:74:70:3a:2f:2f:61:63:73:2e:69:73:70:2e:6f:72:67;

The last two rows can be added in dhcpd.conf.

References

TR-069 Boadband Forum, art. “3.1 ACS Discovery”
RFC2132 – DHCP Options and BOOTP Vendor Extensions, art. “8.4. Vendor Specific Information”.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Leave a Reply

Your email address will not be published. Required fields are marked *