Description:

With the following Add-in script you can bind physical interfaces to a Link Aggregation Group (LAG) and activate LACP on a LANCOM XS-51xx / XS-61xx or GS-45xx series switch.

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( "interface 1/0/15" ); //Adding the physical 1/0/15...
    config.addScriptLine( "addport 0/3/1" );     // ...into the logical interface (LAG) 1 0/3/1
    config.addScriptLine( "exit" );

    config.addScriptLine( "interface 1/0/16" ); //Adding the physical 1/0/16...
    config.addScriptLine( "addport 0/3/1" ); // ...into the logical interface (LAG1) 0/3/1
    config.addScriptLine( "exit" );

    config.addScriptLine( "interface lag 1" ); // Setting the Link Aggregation Group (LAG) from Static to LACP -> no port-channel static
    config.addScriptLine( "no port-channel static" );
    config.addScriptLine( "exit" );
};

Add-in as JSON file:

phys_interface_bind_to_LAG_assign_LACP.json