Description:

This script sets all interface and routing tags to zero  0  to dissolve the L3 network separation, allowing all networks to access all routes.

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) {


    // /Setup/TCP-IP/Network-list/
    var networkTable = config.getTableByOid( "1.2.7.30" );
    var networkTableRows = networkTable.getRows();

    // turn result into a list for easier iteration
    var networkTableList = [];
    for ( var i = 0 ; i < networkTableRows.length; i++) {
        networkTableList.push(networkTableRows[i]);
    }

    networkTableList.forEach( function (row) {
        row.setByOid( 8 , "0" );                   // set routing tag to 0
        networkTable.addOrMerge(row);
    });

    // /Setup/IP-router/routing-table
    var routingTable = config.getTableByOid( "1.2.8.2" );
    var routingTableRows = routingTable.getRows();

    // turn result into a list for easier iteration
    var routingTableList = [];
    for ( var i = 0 ; i < routingTableRows.length; i++) {
        routingTableList.push(routingTableRows[i]);
    }

    routingTableList.forEach( function (row) {
        row.setByOid( 8 , "0" );                   // set routing tag to 0
        routingTable.addOrMerge(row);
    });
}

Add-in as JSON file:

routing_and_interface_tag_mod.json