Using the shell to create the same configuration across multiple interfaces and applying the configuration file. This is an alternate method from the usual configuration options.
Using the shell as an alternate method to create the same configuration across multiple interfaces.
For example, if there is a need to configure "no flow control" on the first 10 interfaces the following steps can be done:
> start shell user root
% sh #
# X=0; while [ $X -lt 10 ]; do echo "set interface ge-0/0/$X ether-options no-flow-control" >> juniper.txt; X=`expr $X + 1`; done
# cat juniper.txt set interface ge-0/0/0 ether-options no-flow-control set interface ge-0/0/1 ether-options no-flow-control set interface ge-0/0/2 ether-options no-flow-control set interface ge-0/0/3 ether-options no-flow-control set interface ge-0/0/4 ether-options no-flow-control set interface ge-0/0/5 ether-options no-flow-control set interface ge-0/0/6 ether-options no-flow-control set interface ge-0/0/7 ether-options no-flow-control set interface ge-0/0/8 ether-options no-flow-control set interface ge-0/0/9 ether-options no-flow-control
config# load set juniper.txt config# commit
Note: The name of the file used in this example is juniper.txt