Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Employee
Employee

Simple one-liner to add multiple networks in series

Overview

Add many networks to management database.

Description

Just a simple BASH one-liner.

Instructions

In BASH run (change as needed):

for x in `seq 0 255`; do echo add network name "studentnet-$x" subnet "10.$x.16.0" subnet-mask "255.255.248.0" tags students >> students.txt  ; done

Copy students.txt to your windows desktop and open it in the CLI window in SmartConsole:

run.PNG

Let the file execute and then you can publish your changes.

If you also want to add the created networks to a group you can follow the above example with the following one-liner:

for x in `seq 0 255`; do echo set network name studentnet-$x groups "StudentsGroup" >> studentsgroup.txt  ; done

Code Version

Code version 0.0.1

Tested on version

R80, API version 1.0

NOTICE: By using this sample code you agree to terms and conditions in this Not authorized to view the specified document 1042

...

0 Kudos
0 Replies