Setting parameters with unknow index

Marco Marino marino.mrc at gmail.com
Fri Sep 8 05:49:42 EDT 2017


Hi Dan, thank you for your support but at the moment I'm a bit confused and
my test doesn't work and this is frustrating.
The firmware provides one PTM interface and one ETH interface. Furthermore,
there is one WAN service for PTM and another for ETH using PPPoE. Basically
both WAN services have the same PPPoE credentials (test, test) and after
the first authentication, the CPE is able to query the tr069 server and
download new credentials.
Actually I'm doing one stupid test: I edit

InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPConnection.1.Username
= testuser
InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPConnection.1.Password
= testpassword

using the web interface of genieacs. The problem is that this doesn't work!
If I insert the same credentials using the web GUI of the router it works
but when I try with genieacs the CPE loses the connection (I'm checking
this using a laptop connected to the LAN of the router)
Please, let me know where I'm wrong!
Thank you


2017-09-07 22:36 GMT+02:00 Dan Morphis <dan at milkcarton.com>:

> On Thu, Sep 7, 2017 at 2:55 AM, Marco Marino <marino.mrc at gmail.com> wrote:
>
>> Hi Dan, thank you for your code. It is really useful!
>> Anyway, I have problem with indexes because:
>>
>> Vendor released a fw with 2 WANDevice because it works in two cases: with
>> the DSL port and with the LAN4 port used as WAN. Basically this creates a
>> first problem: I have InternetGatewayDevice.WANDevice.1 that is unused,
>> InternetGatewayDevice.WANDevice.2 that is the ptm device and
>> InternetGatewayDevice.WANDevice.3 that is used for pppoe over eth4. (I
>> don't know why InternetGatewayDevice.WANDevice.1 is unused!)
>>
>
> WANDevice.1 is the ATM interface, 2 is the PTM and 3 is the WAN port/Eth4
>
>
>> It seems to me that the index of "WANConnectionDevice" is incremented of
>> 2 in an unordered manner each time a new WANDevice is added. In fact, in my
>> case I have:
>> InternetGatewayDevice.WANDevice.*2*.wanconnectiondevice.*3*
>> and
>> InternetGatewayDevice.WANDevice.*3*.wanconnectiondevice.*1*
>> lastly, if I try to add a new wanconnectiondevice for example to
>> WANDevice.1, the assigned index is 5!! in fact I have:
>> InternetGatewayDevice.WANDevice.1.wanconnectiondevice.*5*
>>
>> please, note that the index of wanconnectiondevice is unordered.
>>
>> Following your code, my idea is to completely drop any WANDevice and any
>> WANConnectionDevice during the script execution and then recreate only
>> InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection
>>
>
> You are making this to complicated :).
>
> Here is what I do. First ensure that a WANPPPConnection exists on the ATM
> interface (thats the one we use). In your case you would want to ensure one
> exists on the PTM interface (WANDevice.2). Then blindly set the credentials
> on *all* WANPPConnection instances. This allows the device to work
> whether its plugged into a DSL line (as either ATM or PTM) or via the WAN
> port/Eth4. Depending on how you have your base config on the CPE set, your
> provisioning script could be made more or less complicated.
>
> This line will ensure that there is only one WANPPPConnection on the PTM
> interface:
> declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.*",
> null, {path: 1});
>
> Now blindly set the credentials across all the WANPPPConnection instances
>     declare("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*.WANPPPConnection.*.Username",
> {value: now}, {value: config.username});
>     declare("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*.WANPPPConnection.*.Password",
> {value: now}, {value: config.password});
>
>
> If you are still in the testing phase and have the ability to set a base
> config on the CPE, configure your CPE with the PTM interface and WAN
> interface. Then in the WAN services section of the GUI, create two services
> each for the PTM and WAN interfaces. First one being PPPoE, we do PPP
> traffic untagged. Second interface choose IPoE, and enter a VLAN number. We
> call the second interface the 'Management' interface. Then bind your TR-069
> traffic to the management interface. This will prevent the CPE from doing
> mgmt over the public internet. The second big advantage this provides is
> you can *always* do management on the CPE regardless of what the PPP
> state is. This will also allow you to switch a CPE from routed to bridged
> mode remotely, and still maintain communication with the CPE.
>
> In our environment, when a subscriber is disabled (non-pay, we also have a
> lot of seasonal customers that keep the CPE over the winter [and some even
> leave it plugged in and on]), I set declare("InternetGatewayDevice.
> WANDevice.*.WANConnectionDevice.*.WANPPPConnection.*.Enable", {value:
> now}, {value: false}); This explicitly turns off the PPP interface and
> prevents the CPE from hammering on our radius server.
>
>
>
>
>> but at the moment this doesn't work. Basically I'm trying with:
>> declare("InternetGatewayDevice.WANDevice.*", null, {path: 1});
>> declare("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*", null,
>> {path: 1});
>> declare("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*.WANPPPConnection.*",
>> null, {path: 1});
>>
>> so, my question is, how can I completely drop the configuration and then
>> recreate only
>> InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection
>> during the script execution? My idea is to do this in the function
>> setupBaseWanPppConnection().
>>
>> Thank you
>>
>>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170908/456355a5/attachment-0001.html>


More information about the Users mailing list