Configure a static ip address on LANCOM GS-4xxx and XS-Switches

With the following Addin script you can set a static IPv4 address on LANCOM Switches of the GS-4xxx and XS-series:

/**
 * @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.device.type.indexOf("XS-") >= 0) {
        config.addScriptLine("network protocol none");                                                                                              // Deactivate DHCP
        config.addScriptLine("network parms " + context.vars.mgmt_ip + " " + context.vars.mgmt_subnet + " " + context.vars.mgmt_defRouter);         // Static IP assignment via variables
        config.addScriptLine("network mgmt_vlan " + context.vars.mgmt_vlan);                                                                        // MGMT Vlan assigned; Attention this VLAN is not routable!
        config.addScriptLine("configure");
        config.addScriptLine("ip name server " + context.vars.mgmt_dns);                                                                            // Assign the IP of the DNS server
    }
    else if (context.device.type.indexOf("GS-") >= 0) {
        config.addScriptLine("network protocol none");                                                                                              // Deactivate DHCP
        config.addScriptLine("network parms " + context.vars.mgmt_ip + " " + context.vars.mgmt_subnet + " " + context.vars.mgmt_defRouter);         // Static IP assignment via variables
        config.addScriptLine("network mgmt_vlan " + context.vars.mgmt_vlan);                                                                        // MGMT Vlan assigned; Attention this VLAN is not routable!
        config.addScriptLine("configure");
        config.addScriptLine("ip name server " + context.vars.mgmt_dns);                                                                            // Assign the IP of the DNS server
    }
     // Write your script here.
     // Assignable variables can be found on the right.

};




Variables:
Name                Anzeigename    Variablen     Typ            Wert/Auswahl    Als Passwort verwenden
mgmt_defRouter         default Gateway         String                         Nein
mgmt_dns             Nameserver                 String                         Nein
mgmt_ip             Switch Static IP         String                         Nein
mgmt_subnet         Subnetmask                 String                         Nein
mgmt_vlan             Management VLAN         String                         Nein

download json file

results matching ""

    No results matching ""