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

Unterschiede anzeigen Seitenhistorie anzeigen

Version 1 Nächste Version anzeigen »




Configure a static ip address and deactivate DHCP on LANCOM Switches of the XS series.


With the following Addin 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):

Note: The Managament VLAN set with this script is not routable!!

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

    };

static_ip_dhcp_off.json


  • Keine Stichwörter