This add-In script can be used to configure VRRP on LANCOM Routers with LCOS Version 10.90 and above.
Variable | Description |
---|
VRRP_PRIO | Assign to devices which should use VRRP and set a priority. |
/** * @param {Config} config * @param {Context} context * Do not edit this comment or parameter types. Required for code suggestions */ exports.main = function (config, context) { if (context.vars.VRRP_PRIO != "") { config.setScalarByOid("1.2.141.1", "1")//Enable VRRP
var VRRPtable = config.getTableByOid("1.2.141.2"); var VRRPtable_row = VRRPtable.createNewRow(); VRRPtable_row.setByOid("1", "INTRANET"); // Interface : 16 chars from ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789 VRRPtable_row.setByOid("2", "42"); // Router-ID : 3 chars from 1234567890 VRRPtable_row.setByOid("3", "1"); // Enabled : No (0), Yes (1) VRRPtable_row.setByOid("4", "1"); // Version : v2 (1), v3 (2), v2+v3 (3) VRRPtable_row.setByOid("5", context.vars.VRRP_PRIO); // Prio : 3 chars from 1234567890 VRRPtable_row.setByOid("6", "0"); // Backup-Prio : 3 chars from 1234567890 VRRPtable_row.setByOid("7", "100"); // Advert.-Interval : 5 chars from 1234567890 VRRPtable_row.setByOid("8", "10.10.10.10"); // Virtual-IPv4 : 15 chars from 1234567890. VRRPtable_row.setByOid("9", "::"); // Link-Local-Virtual-IPv6 : 39 chars from 0123456789ABCDEFabcdef:. VRRPtable_row.setByOid("10", "::"); // Global-Virtual-IPv6 : 39 chars from 0123456789ABCDEFabcdef:. VRRPtable_row.setByOid("11", "INTERNET"); // Monitored-WAN : 16 chars from ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789 VRRPtable_row.setByOid("12", ""); // Comment VRRPtable.addOrMerge(VRRPtable_row); } };
|
---|
VRRP-1090.json