[MikroTik] Setting L2TP / PPPoE credentials not in TR069 tree

Hello,
I am facing an issue when trying to “get/set” parameters on L2TP from a MikroTik hapac connected to GenieACS.
Whenever I create an l2tp interface entry (in CPE) and refresh the tree I get these informations on WebUI :

Device.X_MIKROTIK_Interface.Generic.3
Device.X_MIKROTIK_Interface.Generic.3.Enable - true
Device.X_MIKROTIK_Interface.Generic.3.LowerLayers - blank
Device.X_MIKROTIK_Interface.Generic.3.Name - l2tp-out1
Device.X_MIKROTIK_Interface.Generic.3.Status - Up

No informations about credentials/profile/MTU etc…

Provision of parameters are done from a “models.py” to define Device paths :

mikrotik_hapac = {

'dhcp_state': 'Device.DHCPv4.Server.Pool.1.Enable',
'dhcp_start_ip': 'Device.DHCPv4.Server.Pool.1.MinAddress',
'dhcp_end_ip': 'Device.DHCPv4.Server.Pool.1.MaxAddress',
'dhcp_dns': 'Device.DHCPv4.Server.Pool.1.DNSServers',

}

Another server generates a JSON file with values based on user inputs such as :

{
[…]
‘dhcp_start_ip’ : “172.16.10.1”,
‘dhcp_end_ip’ : “172.16.10.250”
[…]
}

GenieACS matches these parameters and associates Device.DHCPv4.Server.Pool.1.MinAddress to 172.16.10.1 properly.

:question: Is it possible to create an L2TP interface with custom MTU/credential through this process if these parameters do not appear in TR069 Tree without going through a “.alter” or another uploaded file :question:

I would like to apply this configuration to create vlans and DHCP options, these parameter are not in the TR069 tree aswell.

Thank you for your help.

If the CPE doesn’t expose the parameter name, there is no out of the box way I’m aware of to accomplish this. You have to get Mikrotik to fix their CWMP implementation, or patch the GenieACS code to look for the particular parameter names you want to set and have it ignore the checks if they exist. Even doing that, doesn’t mean the CPE will accept the SPV on those parameters.

No, you’ll have to use a .alter. What we do for this is we have nginx reverse proxy both the GenieACS FS and a Laravel instance that creates a custom .alter file for the device on the fly. We set up a provision that pushes the .alter to the device, and the .alter is actually generated by Laravel. That way, we don’t have to upload a file per device to the GenieACS files section.

1 Like

@adralith The solution @mjducharme came up with is the one you want to use. You do not want to have thousands of .alter files.

@zaidka I wonder if it might be possible to add a “Virtual Files” feature into GenieACS for something like this? Perhaps it could be like Virtual Parameters and return a string, but the string could be the file contents? That might make these sort of things possible without having to reverse proxy some other web app to generate the file contents.

That’s an intriguing idea. But are there use cases for such a feature other than as a workaround for clients that don’t expose all the necessary parameters through TR-069?

Yes, I think so. I mean, TR069 has the basic ability to push a Vendor Configuration File. It makes sense to be able to create a Vendor Configuration File on the fly for a certain client, customized to that client, rather than just a generic one. That wouldn’t necessarily be a “workaround” for clients that don’t expose the necessary parameters, but could instead greatly simplify the initial configuration process by allowing you to push a config that is already customized for the client vs. having to push a generic config at first and then adjust the various parameters exposed via TR069 to customize it.