5

In my Juniper qfx Switch, I want to execute many commands such as bellow:

set vlans vlan77 vlan-id 77
set vlans vlan77 l3-interface irb.77
set vlans vlan78 vlan-id 78
set vlans vlan78 l3-interface irb.78
set vlans vlan79 vlan-id 79
set vlans vlan79 l3-interface irb.79
....

I couldn't to write one by one, because there are hundreds lines. I want to execute them in a simple and convenient way. who can help me with this?

  • 1
    One simple way is just to create a text script, and then paste it into your terminal program. – Ron Trunk Jan 18 at 14:32
6

The easiest way to do this is:

  1. create a file with the set statements (probably using some script)
  2. copy that file to your router
  3. use load set <filename> to execute the set of statements

More information on loading configuration files can be found in this Juniper document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.