Using Tags to create PPPoE provisioning

I was wondering if it’s possible to use Tags to make some sort of autoprovisioning, but i have some doubts on the format of the Tags. As Tags are associated with device SN, i wanted to store the PPPoE on a Tag (every CPE will have a different Tag for their own PPPoE), compare the current PPPoE with the one stored in Tag, and if they are different change it on the CPE.

Something like this:

let routerPpp = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username", {value: 1});

let TagPpp = declare("Tags.*", {value: 1});

if (TagPpp !== routerPpp) {
 declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username"), {value: now}, {value: TagPpp};

The problem is that the Tag value is stored in the name of the Tag itself, and the value is boolean true/false.

Also i wanted to store the PPPoE and Password on Tags, but due to value beeing only true/false i don’t know how can i take the name of the tag and assign it to two different fields, like:
Tags.pppoe = 'pppoe1', Tags.passwd = '123456'

And not the current way it shows, that is:
Tags.pppoe1 = true, Tags.12356 = true

I’m basically using the tags as a constant value to assign a unique pppoe to a unique SN CPE.

Is this possible or it’s just something crazy to think?

Of course if there is any other way to associate a constant value to a CPE SN, i think it will be possible to achieve the same result i want of “provisioning” without adding external or additional programs.

Simply by making “if” statement and comparing the actual CPE PPPoE and the value that it’s wanted to match and replace after.

I use the tag to store pppoe user just as a convenient way to quickly locate a CPE based on customer Id on the Devices page.

in our case, PPPoE provisioning is done by the OLT using one profile per customer. By the time the CPE contact the ACS it already has the WAN interface configured and working. And it has to be since the ACS sits on a VLAN.

1 Like

In my case the CPE would be a TpLink 850n router. I will make the factory default backup a generic pppoe like “reset” that only has access to a disabled users VLAN where the GenieACS server would be (right now i’m testing on lab).
Then it will see that the actual PPPoE on the router is different from the one on the Tag and change it.

Do you extract the pppoe value on the tag in some way?

Like slicing the Tag name starting on character 5, so you skip the “Tags.” part and store it as a len.

Or it’s possible to store a custom value on the Tag besides true/false?

Thanks for the answer.

tags are not intended to be used as data storage.

OTOH setting pppoe username from provision would trigger a BOOTSTRAP event on the ACS from the CPE. That’s why we ended up using OLT profiles

1 Like

Ok, thanks. Will try make some tests, i wanted to see if it was possible to make the “provisioning” without things like this Provisioning Flow

Still i think it’s weird that the Tag value is only “true” or “false”, and the actual content of the tag is in the name itself.

Yes this is possible, and its more or less how I accomplish auto provisioning.

New CPE comes online. CPE will not have the Bridged or Routed tag. A CPE without those tags triggers the first provision to run. This provision makes a request to our subscriber management server to get the desired state of the CPE (Routed or Bridged) and sets that tag on the CPE.

Next, either the bridged or routed provision will run depending on the tag for the CPE, as long as the CPE does not also have the Provisioned tag.

In the case of Routed, another request to our subscriber management server is made to request the pppoe credentials, wifi, lan, static assignments, etc for that CPE. The provision script sets the desired values, then adds the tag Provisioned

In the case of Bridged, the specific interfaces are disabled and other interfaces are enabled on the CPE.

I do not store user information in my tags. Only the desired/current state of the CPE.


I’ve been trying to make this work but i walways find myself blocked on the same problem. Looking in other places, i noticed something.

On the “Config” menu, the “ui.index.*” label on “Tags”, parameter and type, makes it so it shows the content individually, wich is what i need. Like this:

Wich translates to the individual tags that seems easier to be extracted than the other case:

It’s possible to fetch the tags like it’s done in the “config” side?

Can you create a simple mockup of what it is you are trying to accomplish?

So, connecting to Mongobd you can query the following data, that returns the values written in the Tags:

'> db.devices.find({}, {_tags: 1, _id: 0})
{ “_tags” : [ “pppoe1”, “password1” ] }

I want to be able to take that query result (or results) and make a simple IF statement against the value of this (that will be the current active pppoe username):


But think it’s not possible to call the query result of MongoDB directly on the Provision script, i’m investigating that right now…

If i can achieve this, there is no need to add external scripts or addons to make the autoprovisioning, as the Tags are stored in GenieACS DB and i just have to assign a variable to that query results and compare with current WANPPP value.

There is no need for a provision script to talk to the Mongo db directly. Use declare statements to get the results you want from the CPE.

You are making things way more complicated than they need to be. With GenieACS, in your provision scripts you declare the state you want the device to be in and let it do the work necessary to get there.

To get data from other systems to provision users, use extension scripts.