Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 2 Nächste Version anzeigen »




Description:

With the following Add-in script you can set a static IPv4 address on LANCOM Switches of the XS series, set a Management VLAN and deactivate the DHCP server on the device(s).

The Managament VLAN set with this script is not routable!

List of used variables:

VariableDescription




Add-in code:

/**
 * @param {Config} config
 * @param {Context} context
 * Do not edit this comment or parameter types. Required for code suggestions
*/exports.main = function (config, context) {



    config.addScriptLine("network protocol none"); // Deactivate DHCP
    config.addScriptLine("network parms " + context.vars.IP_Address + " " + context.vars.IP_Subnetz + " " + context.vars.IP_Route); // Static IP assignment via variables
    config.addScriptLine("network mgmt_vlan " + context.vars.IP_VLAN); // MGMT Vlan assigned; Attention this VLAN is not routable!
    config.addScriptLine("configure");
    config.addScriptLine("ip name server " + context.vars.IP_Nameserver); // Assign the IP of the DNS server

    };

Add-in as JSON file:

static_ip_dhcp_off.json


  • Keine Stichwörter