Creating new Instance of IP-interface fails

Hello,

i am trying to create an new interfaces on a device. The data-model is tr-181, so we have interfaces + ip-adresses that belong to the interface.

The data looks like this

Device.IP.Interface.1.Alias = customer
Device.IP.Interface.1.Enable = true
Device.IP.Interface.1.IPv4Address.1.IPAddress = some-ip
Device.IP.Interface.1.IPv4Address.2.IPAddress = another-ip
plus more attributes

I read the docs here

// Ensure that *all* other instances are deleted
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[]", null, {path: 0});

// Add the two entries we care about
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:192.168.1.0,SourceNetMask:255.255.255.0]",  {path: now}, {path: 1});
declare("InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:172.16.12.0,SourceNetMask:255.255.0.0]", {path: now}, {path: 1});

looked at some ideas from @akcoder here

And for a very basic test i did the following

let values = {
    Enable: true,
    Alias: "customer",
    LowerLayers: "Device.Ethernet.Link.3"
};

let basePath = "Device.IP.Interface";
const path = basePath + '.[' + Object.keys(values).map(key => key + ':' + values[key]).join(',') + ']';
log(path);
declare(path, {path: 1}, {path: 1});

The provision executes, but fails

2021-11-30T11:26:20.752Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: Script: Device.IP.Interface.[Enable:true,Alias:customer,LowerLayers:Device.Ethernet.Link.3]
2021-11-30T11:26:20.754Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0100" acsRequestName="GetParameterNames"
2021-11-30T11:26:20.810Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0101" acsRequestName="AddObject"
2021-11-30T11:26:20.904Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0102" acsRequestName="GetParameterValues"
2021-11-30T11:26:21.088Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0103" acsRequestName="SetParameterValues"
2021-11-30T11:26:21.179Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0104" acsRequestName="GetParameterNames"
2021-11-30T11:26:21.232Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0105" acsRequestName="AddObject"
2021-11-30T11:26:21.325Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0106" acsRequestName="GetParameterValues"
2021-11-30T11:26:21.468Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0107" acsRequestName="SetParameterValues"
2021-11-30T11:26:21.566Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0108" acsRequestName="GetParameterNames"
2021-11-30T11:26:21.628Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0109" acsRequestName="AddObject"
2021-11-30T11:26:21.723Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010a" acsRequestName="GetParameterValues"
2021-11-30T11:26:21.867Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010b" acsRequestName="SetParameterValues"
2021-11-30T11:26:21.956Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010c" acsRequestName="GetParameterNames"
2021-11-30T11:26:22.007Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010d" acsRequestName="AddObject"
2021-11-30T11:26:22.098Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010e" acsRequestName="GetParameterValues"
2021-11-30T11:26:22.252Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f010f" acsRequestName="SetParameterValues"
2021-11-30T11:26:22.342Z [INFO] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: ACS request; acsRequestId="17d70987a3f0110" acsRequestName="GetParameterNames"
that goes on a while and finally fails
2021-11-30T11:26:26.488Z [WARN] ::ffff:172.25.0.206 000F94-Panther-Y%2E0520360024: Channel has faulted; channel="default" retries=0 faultCode="too_many_commits" faultMessage="Too many commit iterations"

Here is the cwmp request

  <?xml version="1.0" encoding="UTF-8"?>

  <soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2"><soap-env:Header><cwmp:ID
  soap-env:mustUnderstand="1">17d70987a3f0101</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:AddObject><ObjectName>Device.IP.Interface.</ObjectName><ParameterKey></ParameterKey></cwmp:AddObject></soap-env:Body></soap-env:Envelope>

And the response

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soap_env:Envelope
  xmlns:soap_env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:soap_enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
      <soap_env:Header>
        <cwmp:ID soap_env:mustUnderstand="1">17d70987a3f0101</cwmp:ID>
  </soap_env:Header>
      <soap_env:Body>
        <cwmp:AddObjectResponse>
          <InstanceNumber>3</InstanceNumber>
          <Status>1</Status>
  </cwmp:AddObjectResponse>
  </soap_env:Body>
  </soap_env:Envelope>

GenieACS goes on and tries to set the parameters

  <?xml version="1.0" encoding="UTF-8"?>

  <soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2"><soap-env:Header><cwmp:ID
  soap-env:mustUnderstand="1">17d70987a3f0103</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:SetParameterValues><ParameterList
  soap-enc:arrayType="cwmp:ParameterValueStruct[3]"><ParameterValueStruct><Name>Device.IP.Interface.3.Alias</Name><Value
  xsi:type="xsd:string">customer</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.IP.Interface.3.Enable</Name><Value
  xsi:type="xsd:boolean">true</Value></ParameterValueStruct><ParameterValueStruct><Name>Device.IP.Interface.3.LowerLayers</Name><Value
  xsi:type="xsd:string">Device.Ethernet.Link.3</Value></ParameterValueStruct></ParameterList><ParameterKey></ParameterKey></cwmp:SetParameterValues></soap-env:Body></soap-env:Envelope>

The response is 1 - which means the device does somethin internally before contacting GenieACS again

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soap_env:Envelope
  xmlns:soap_env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:soap_enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
      <soap_env:Header>
        <cwmp:ID soap_env:mustUnderstand="1">17d70987a3f0103</cwmp:ID>
  </soap_env:Header>
      <soap_env:Body>
        <cwmp:SetParameterValuesResponse>
          <Status>1</Status>
  </cwmp:SetParameterValuesResponse>
  </soap_env:Body>
  </soap_env:Envelope>

We then have a GetParameterNames

  <?xml version="1.0" encoding="UTF-8"?>

  <soap-env:Envelope xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2"><soap-env:Header><cwmp:ID
  soap-env:mustUnderstand="1">17d70987a3f0104</cwmp:ID></soap-env:Header><soap-env:Body><cwmp:GetParameterNames><ParameterPath>Device.IP.Interface.</ParameterPath><NextLevel>1</NextLevel></cwmp:GetParameterNames></soap-env:Body></soap-env:Envelope>

With a reply

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soap_env:Envelope
  xmlns:soap_env="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:soap_enc="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
      <soap_env:Header>
        <cwmp:ID soap_env:mustUnderstand="1">17d70987a3f0104</cwmp:ID>
  </soap_env:Header>
      <soap_env:Body>
        <cwmp:GetParameterNamesResponse>
          <ParameterList xsi:type="soap_enc:Array"
  soap_enc:arrayType="cwmp:ParameterInfoStruct[1]">
            <ParameterInfoStruct>
              <Name>Device.IP.Interface.2.</Name>
              <Writable>1</Writable>
  </ParameterInfoStruct>
  </ParameterList>
  </cwmp:GetParameterNamesResponse>
  </soap_env:Body>
  </soap_env:Envelope>

And then it starts all over :frowning:

We are just starting with CWMP - any help/advice will be appreciated

Don’t know if this is a unique feature of this CPE-Type, but when create an IP-Interface with CVMP, it automatically creates child IP-Adresse-Instance, too. And this one can’t be deleted or changed.

The CPE uses icwmpd, which has a CLI-tool for several CVMP operations. It allows to add/get/set Values

root@GNX:~# icwmpd -c add Device.IP.Interface.
Added Device.IP.Interface.3.
root@GNX:~# icwmpd -c get Device.IP.Interface.3.
Device.IP.Interface.3.Alias => cpe-3
Device.IP.Interface.3.Enable => 0
Device.IP.Interface.3.IPv4Address.1.AddressingType => DHCP
Device.IP.Interface.3.IPv4Address.1.Alias => cpe-1
Device.IP.Interface.3.IPv4Address.1.Enable => 0
Device.IP.Interface.3.IPv4Address.1.IPAddress =>
Device.IP.Interface.3.IPv4Address.1.Status => Disabled
Device.IP.Interface.3.IPv4Address.1.SubnetMask =>
...

AddressingType is a ReadOnly-Parameter, that cannot be changed. We can’t delete this instance, either

Error caught:
{"errCode":7002,"errMsg":"DATA_MODEL_DeleteInstance: group delete vendor hook failed for path=Device.IP.Interface.3.IPv4Address.1","paramErrs":[{"paramPath":"Device.IP.Interface.3.IPv4Address.1.","errCode":7002,"errMsg":"DATA_MODEL_DeleteInstance: group delete vendor hook failed for path=Device.IP.Interface.3.IPv4Address.1"}]}

Looks weird to me

What happens when you try to manually create the object instance from the GUI and set the parameter values?

Exactly the same. But this seems to be something special with thate Device-Family.
I can work around parts of the problem, if i delete the whole Interface-Stack and recreate the stack.

Next problem is that i can create the interfaces, but as soon as set values for the Interfaces (e.g. the LowerLayers Attribute) the CPE changes the allias value to some random values.
This is bad because GenieACS can’t find the instance it expects and starts to create new instance, deleting the one with the random name and so on.

I am pretty stuck here. I involved the manufacturer.

Let your mfgr know they are violating the spec. This is the only way I’ve found to get vendors to fix their stuff. You have to point to the exact part of the spec they are violating.

[ Alias ] A non-volatile handle used to reference this instance. Alias provides a mechanism for an ACS to label this instance for future reference.

If the CPE supports the Alias-based Addressing feature as defined in [Section 3.6.1/TR-069] and described in [Appendix II/TR-069], the following mandatory constraints MUST be enforced:

  • Its value MUST NOT be empty.
  • Its value MUST start with a letter.
  • If its value is not assigned by the ACS, it MUST start with a “cpe-” prefix.
  • The CPE MUST NOT change the parameter value.

That was exactly the part of the specs i sent them :wink: Thanks