...
/** // Funktion zum Anlegen von Routen var addRoute = function ( DestinationIP , IpMask , RtgTag , AdminDistance , PeerOrIP , Distance , Masquerade , Active , Comment ) { var TableRouting = config.getTableByOid( "1.2.8.2" ); // Setup/IP-Router/IP-Routing-Table var TableRouting_row = TableRouting .createNewRow(); TableRouting_row .setByOid( 1 , DestinationIP ); //[1] IP-Address : 15 chars from 1234567890. TableRouting_row .setByOid( 2 , IpMask ); //[2] IP-Netmask : 15 chars from 1234567890. TableRouting_row .setByOid( 8 , RtgTag ); //[8] Rtg-tag : 5 chars from 1234567890 TableRouting_row .setByOid( 9 , AdminDistance ); //[9] Admin-Distance : 3 chars from 1234567890 TableRouting_row .setByOid( 3 , PeerOrIP ); //[3] Peer-or-IP : 21 chars from ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789 (lower case characters are converted to upper case) TableRouting_row .setByOid( 4 , Distance ); //[4] Distance : 2 chars from 1234567890 TableRouting_row .setByOid( 5 , Masquerade ); //[5] Masquerade : No (0), on (1), intranet (2) - numbers has to be used TableRouting_row .setByOid( 6 , Active ); //[6] Active : No (1), Yes (0), Semi (2) - numbers has to be used TableRouting_row .setByOid( 7 , Comment ); //[7] Comment : 64 chars from #ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()*+-,/:;<=>?[\]^_.0123456789abcdefghijklmnopqrstuvwxyz ` TableRouting .addOrMerge( TableRouting_row ); }; //Anlegen der Routen addRoute( "123.123.123" , "255.255.255.255" , "0" , "0" , "INTERNET" , "0" , "1" , "0" , "Route xy" ); } |
---|
Add-in as JSON file:
View file | ||||
---|---|---|---|---|
|