Push WAN profile from ACS to CPE

I am completly new to GenieACS and i have been provided a task to find a way to push WAN parameters from ACS to CPE. We are using v1.2.8 ACS server. I have been going through GenieACS documentation and this forum as well to find a solution. I have found on a multiple occasion during my search that it was recommended to create cwmp.auth key and Value: AUTH(“myusername”, “mypassword”) in admin → config. WAN paramaters which we are mainly concerned with are username, password, VLAN ID.

I am sure this has been answered multiple times in this forum. However, it seems like i am not able to find correct solution as my search keywords might not be good enough. Thanks in advance. I would be glad to share necessary information to make it easier.

1 Like

My honest suggestion is to not worry about authentication at this stage. Get the rest of the configuration stuff worked out, then circle back to auth. By that time, you should have much more familiarity with GenieACS and TR069.

You didn’t specify the mfgr or connection type you wanted to set username/password/vlan id for. These types of details make it much easier to provide support. I’m going to presume from the context you are doing pppoe?

1 Like

Hello @akcoder ,

Based on available information, we have Huawei CPE.

We are able to see the device in GenieACS. We are trying to do this over PPPOE. These are the attributes we will be using for internet VLAN, PPPOE username, and PPPOE password respectively.

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.1.X_HW_VLAN → 30

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username → 0048276

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password → 0048276

I have placed cwmp.connectionRequestAuth Key with value
‘AUTH(InternetGatewayDevice.ManagementServer.ConnectionRequestUsername, InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)’ in admin → config for ACS → CPE authentication as well.

Based on this setup, how can i push those three WAN profile pppoe username, password and VLAN from ACS to CPE ? I hope this can explains better on what i am trying to accomplish. Thanks in advance !!

First, I would remove your cwmp.connectionRequestAuth entry, the values you’ve entered are a partial mirror of the default values GenieACS uses under the covers, but doesn’t account for TR181.

As for provisioning, will all CPEs have the same pppoe username/password/vlan? If so, then create a simple provision that is triggered on boot with this:

const now = Date.now();
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: '0048276');
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: '0048276');
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN', {value: now}, {value: 30);

If the username/password values will be unique per customer or device, then you will want to review example of a provisioning workflow wiki entry. This is the exact code I use to provision the CPEs on our network. You will obviously need to make any adaptations for your environment.

Thanks @akcoder.

If i am not mistaken, there was a typo on one line for WANPPPConnection.1.Password. and code should be

const now = Date.now();
declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username’, {value: now}, {value: ‘0048276’);
declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password’, {value: now}, {value: ‘0048276’);
declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN’, {value: now}, {value: 30);

Correct me if i have placed code in wrong location.

So what we are planning is to test static PPPOE username / password / VLAN in one test ONT, which is the one we have been discussing on this thread. Upon successful testing of this, we will test multiple CPEs with unique PPPOE username / password but same VLAN 30. So we will be trying to get PPPOE username and password from Serial number from ACS and push it to CPE.

Please confirm if i can place this code on same bootstrap provision as shown above or need to create new ?

Regards,

I would not put this in the bootstrap provision. Create a new provision with your changes. Then create a preset that kicks off the provision and set the weight to 100. This way if you put anything in your provision that overrides values in the default provisions there is no dueling between them.

The order of items in a provision do not matter. If you are going to use the serial for the un/pw down the road, then just do it now. Its a simple change:

const now = Date.now();
const serialNumber = declare('DeviceID.SerialNumber', {value: 1}).value[0];

declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {value: now}, {value: serialNumber});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: serialNumber});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN', {value: now}, {value: 30});

Hello @akcoder,

I ran the code on my test ONT and it worked. I was able to push static un / pw and VLAN as expected. If i understand correctly, this code will collect username and password for the device from serial number in ACS and set their un / pw in WAN profile.

I am little weak on Javascript. I am trying my best to understand the code and i think i am little struggling to understand this line of code incase of multiple ONT with different serial number:

const serialNumber = declare(‘DeviceID.SerialNumber’, {value: 1}).value[0];

declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username’, {value: now}, {value: serialNumber});

I know declare uses (path, timestamp, value). Can you please help me to understanding how are parameter being passed here.

Thanks,

Hello @akcoder,

I just found out, the code which ran to change uw / pw for just one ONT changed uw / pw for entire 6K + ONT.

const now = Date.now();
declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username’, {value: now}, {value: ‘0048276’});

declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password’, {value: now}, {value: ‘0048276’});

declare(‘InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN’, {value: now}, {value: 30});

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Name”,{value: now}, {value: “INTERNET_R_VOD_30”});

I somehow neglected the fact that placing provision and presets in admin will changes un / pw / VLAN for all the CPEs seen in GenieACS.

Is there an immediate way to revert the changes that were made and get original username / PW/ VLAN for 6000 + CPEs.

Thanks,

This code is reading the device serial number into a param and then setting the pppoe username to the serial number. Parameters are passed into the declare function as JSON objects (except the first param which will always be a string). The options for the second param (the timestamp param) are:

value which is how old the cached parameter value can be
path How old the cached parameter path can be before GenieACS does a GPN for that path. You should rarely need to provide this parameter.

For the third param (value), the syntax is the same. The third param is optional. If not provided, then the ACS will return the value of the parameter (a get, instead of a set).
value the value to set for the CPE
path the number of instances of the path that can exist. This is a more specialized use case and one I won’t dive into right now.

There is no history in GenieACS so there is no way to “revert” the parameter value. If your CPEs always have the PPPoE username/password set to the device serial number, than this will fix things for you:

const now = Date.now();
const serialNumber = declare('DeviceID.SerialNumber', {value: 1}).value[0];

declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {value: now}, {value: serialNumber});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: serialNumber});

If you use custom username/password values, then you will probably need to call an external script to get/change the PPPoE username per device. More information on calling external scripts is on the wiki, Example of a Provisioning Flow · genieacs/genieacs Wiki · GitHub

At this point, we have reverted some changes manually. Now, i would like to test this on just two CPE in ACS by specifying their serial number…
I want to assign static un/pw, and VLAN to just two ONT
Note: There are other hundreds of CPE which i do not want push static un/pw and VLAN on those.

How can i accomplish this by just isolating two device leaving configuration of the rest unchanged ?
Device 1:
serial number: 485754430CD299A6
un / pw: 0045537 / 0045537
vlan 30

Device 2:
serial number: 485754430CD712A6
un / pw: 0048276 / 0048276
vlan 30

Thanks.

Here is one way you could accomplish your goal. I’ve only listed the code for one serial, but I’m sure you can sort out how to add the provisioning for the other…

const now = Date.now();
const serialNumber = declare('DeviceID.SerialNumber', {value: 1}).value[0];

if (serialNumber === '485754430CD299A6') {
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {value: now}, {value: '0045537'});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: '0045537'});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN', {value: now}, {value: 30});
}

where add this script ?

const now = Date.now();
const serialNumber = declare('DeviceID.SerialNumber', {value: 1}).value[0];

if (serialNumber === '485754430CD299A6') {
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', {value: now}, {value: '0045537'});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password', {value: now}, {value: '0045537'});
declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_HW_VLAN', {value: now}, {value: 30});
}

Please review the documentation. If you need more help, you should probably engage with a support contract by emailing sales@genieacs.com.

Please note, I am not employed by GenieACS Inc, and I do not get a kickback for referring to support. I am but a volunteer. And you appear to need a higher level of support that can realistically be expected on a volunteer support forum.

Thanks @akcoder. I think i will work on this and will provide update. I hope this thread can remain active till then.

@kpuri1606 kishor puri sir ma nepal bata ho stun server ra genieacs yeutai cloud server ma install chha pointing pani gareko chhu but ahile pani device offline chha plz help me.mero number ho “9816201745” whatsapp number ho sir ma pay pani gar chhu plz solve mero problem. thanks advance kishor puri sir yahi sambhaw chha bhane plz whatsapp me.

Hi,
We are trying to do the same thing trying to access the router acs from PPPoE but unable to achieve this. How are you accessing the routers via acs on ppp connection?

thanks