[j-nsp] Add vlan to multiple interfaces on EX series

Bjørn Mork bjorn at mork.no
Fri Jul 10 05:53:13 EDT 2009


Cord MacLeod <cordmacleod at gmail.com> writes:

> Park yourself in edit vlans vlan xxx
>
> The run this on your local Linux machine:
>
> for i in `seq 0 23`; do echo set interface ge-0/0/$i; done

Or just do it on the system everyone has:

% uname -sr
JUNOS 9.5R2.7
% awk 'BEGIN {for (x=0; x<=23; x++) print "set interface ge-0/0/" x}'
set interface ge-0/0/0
set interface ge-0/0/1
set interface ge-0/0/2
set interface ge-0/0/3
set interface ge-0/0/4
set interface ge-0/0/5
set interface ge-0/0/6
set interface ge-0/0/7
set interface ge-0/0/8
set interface ge-0/0/9
set interface ge-0/0/10
set interface ge-0/0/11
set interface ge-0/0/12
set interface ge-0/0/13
set interface ge-0/0/14
set interface ge-0/0/15
set interface ge-0/0/16
set interface ge-0/0/17
set interface ge-0/0/18
set interface ge-0/0/19
set interface ge-0/0/20
set interface ge-0/0/21
set interface ge-0/0/22
set interface ge-0/0/23


> That's the way I mass edit.

Seriously though, you should do mass edits.  Or edits at all.  You
should use an offline configuration system and upload configuration
diffs from these system after following some sort of quality assurance
procedure. Direct edits are bound to give errors.


Bjørn


More information about the juniper-nsp mailing list