Hi,I’m working on creating a script to add a new connection on the TP-Link CPE XC220-G3v. I’ve put together this script, but unfortunately, it’s not working as expected. To troubleshoot, I’ve compared export files from a router with a new interface added via the web management interface and from a clean router to verify all the necessary parameters.I’d greatly appreciate any guidance or suggestions you might have—I’m still relatively new to GenieACS.Thank you in advance for your help!
script:
//new pppoe connection
log("Inicio del script prueba acs pppoe");
//=====================
// 1️⃣ create basic interfaces
//=====================
declare("Device.X_TP_GPON.Link.[]", null, {path:4});
declare("Device.Ethernet.Link.[]", null, {path:8});
declare("Device.Ethernet.VLANTermination.[]", null, {path:4});
declare("Device.IP.Interface.[]", null, {path:8});
declare("Device.PPP.Interface.[]", null, {path:3});
log("Interfaces primarias creadas");
//=====================
// 2️⃣ create other interfaces
//=====================
declare("Device.DHCPv6.Client.[]", null, {path:5});
declare("Device.DNS.Relay.Forwarding.[]", null, {path:9});
declare("Device.IP.Interface.8.IPv4Address.[]", null, {path:1});
declare("Device.IP.Interface.8.IPv6Address.[]", null, {path:1});
declare("Device.IP.Interface.8.IPv6Prefix.[]", null, {path:1});
declare("Device.NAT.InterfaceSetting.[]", null, {path:4});
declare("Device.Routing.Router.1.IPv4Forwarding.[]", null, {path:5});
declare("Device.Routing.Router.1.IPv6Forwarding.[]", null, {path:5});
log("Interfaces secundarias creadas correctamente");
//=====================
// 3️⃣ Config parameters before enable
//=====================
declare("Device.Ethernet.VLANTermination.4.VLANID", null, {value: "198"});
declare("Device.Ethernet.VLANTermination.4.X_TP_VLANMode", null, {value: "2"});
declare("Device.IP.Interface.8.Alias", null, {value: "PPPoE_CBY_ACS."});
declare("Device.IP.Interface.8.IPv4Address.1.AddressingType", null, {value: "IPCP"});
declare("Device.IP.Interface.8.X_TP_ConnType", null, {value: "PPPoE"});
declare("Device.IP.Interface.8.X_TP_IPv6AddrType", null, {value: "DHCPv6"});
declare("Device.IP.Interface.8.X_TP_ServiceType", null, {value: "Internet"});
declare("Device.PPP.Interface.3.AuthenticationProtocol", null, {value: "AUTO_AUTH"});
declare("Device.PPP.Interface.3.X_TP_UsernameDomainEnable", null, {value: true});
//=====================
// 4️⃣ Asign LowerLayers
//=====================
declare("Device.X_TP_GPON.Link.4.LowerLayers", null, {value: "Device.Optical.Interface.1."});
declare("Device.Ethernet.Link.8.LowerLayers", null, {value: "Device.X_TP_GPON.Link.4."});
declare("Device.Ethernet.VLANTermination.4.LowerLayers", null, {value: "Device.Ethernet.Link.8."});
declare("Device.PPP.Interface.3.LowerLayers", null, {value: "Device.Ethernet.VLANTermination.4."});
declare("Device.IP.Interface.8.LowerLayers", null, {value: "Device.PPP.Interface.3."});
declare("Device.DHCPv6.Client.5.Interface", null, {value: "Device.IP.Interface.8."});
declare("Device.DNS.Relay.Forwarding.9.Interface", null, {value: "Device.IP.Interface.8."});
declare("Device.NAT.InterfaceSetting.4.Interface", null, {value: "Device.IP.Interface.8."});
declare("Device.Routing.Router.1.IPv4Forwarding.5.Interface", null, {value: "Device.IP.Interface.8."});
declare("Device.Routing.Router.1.IPv6Forwarding.5.Interface", null, {value: "Device.IP.Interface.8."});
log("LowerLayers asignados correctamente");
//=====================
// 5️⃣ Enable interfaces
//=====================
declare("Device.X_TP_GPON.Link.4.Enable", null, {value: true});
declare("Device.Ethernet.Link.8.Enable", null, {value: true});
declare("Device.Ethernet.VLANTermination.4.Enable", null, {value: true});
declare("Device.PPP.Interface.3.Enable", null, {value: true});
declare("Device.IP.Interface.8.Enable", null, {value: true});
declare("Device.IP.Interface.8.IPv4Enable", null, {value: true});
declare("Device.IP.Interface.8.IPv6Enable", null, {value: true});
declare("Device.IP.Interface.8.IPv4Address.1.Enable", null, {value: true});
declare("Device.IP.Interface.8.IPv6Address.1.Enable", null, {value: true});
declare("Device.IP.Interface.8.IPv6Prefix.1.Enable", null, {value: true});
declare("Device.NAT.InterfaceSetting.4.Enable", null, {value: true});
declare("Device.Routing.Router.1.IPv4Forwarding.5.Enable", null, {value: true});
declare("Device.Routing.Router.1.IPv6Forwarding.5.Enable", null, {value: true});
//=====================
// 6️⃣routing & DNS parameters
//=====================
declare("Device.Routing.Router.1.IPv4Forwarding.5.StaticRoute", null, {value: false});
declare("Device.DHCPv6.Client.5.Enable", null, {value: true});
declare("Device.DHCPv6.Client.5.X_TP_EnableRaRouter", null, {value: true});
declare("Device.DNS.Relay.Forwarding.9.Type", null, {value: "DHCPv6"});
declare("Device.DNS.Relay.Forwarding.9.X_TP_DNSType", null, {value: "DNS_A"});
declare("Device.DNS.Relay.Forwarding.9.X_TP_DNSType", null, {value: "DNS_AAAA"});
//=====================
// 7️⃣ Credenctials PPPoE
//=====================
declare("Device.PPP.Interface.3.Username", null, {value: "acs-pppoe-testing123"});
declare("Device.PPP.Interface.3.Password", null, {value: "acs-pppoe-testing123"});
log("End script");