Switching

 View Only
last person joined: 14 hours ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Ability to edit multiple EX interfaces

    Posted 10-03-2008 13:01
    Does JUNOS have a command like the Cisco "range" command that allows you to edit multiple interfaces at once?


  • 2.  RE: Ability to edit multiple EX interfaces

    Posted 10-06-2008 13:45

    I asked my SE.  They said not yet~...

     

    For now.. i generate the commands I want from an UNIX command line...

     

    $ for i in `seq 1 48`; do   echo "set interface ......"; done

     

     

    Message Edited by ericwchan on 10-06-2008 01:45 PM


  • 3.  RE: Ability to edit multiple EX interfaces

    Posted 10-07-2008 05:06

    Hi,

     

    The other possibility if you need something quick is to use commit scripts with macros.  You can then create config that expresses the range you wish to create and the action you wish to apply and automatically manipulates it (along the same lines as eriwchan's unix command) to output a real JUNOS configuration when you commit the config.

     

    Rgds,

     

    Guy 


    #vlan
    #range
    #commit_script


  • 4.  RE: Ability to edit multiple EX interfaces

    Posted 11-08-2008 13:43

    Hey ericwchan,

     

    I am new to using JUNOS and I was wondeirng if you could elaborate on how you would actually run the for loop.  Would you run it from the the JUNOS shell or would you run it from some other non-JUNOS platform?  If you run it from the shell, how do you feed set commands into the cli, into configuration mode? 

     

    Sorry for the newbie, and slightly unrelated, question.

     

    Best regards,

    Carlos 

     

     



  • 5.  RE: Ability to edit multiple EX interfaces

    Posted 12-11-2008 14:34

    The WebUI has a workaround....   you can select (highlight) multiple interfaces from Configure>Interfaces>Ports and make changes to all from the Edit button.

     

    Hope this works for what you are trying to do.  Smiley Happy



  • 6.  RE: Ability to edit multiple EX interfaces

    Posted 10-14-2009 19:42

    I hear range commands are supposed to be out in November's JUNOS release. 

     

    Until then, I offer a couple of options, which I use:

     

    old school DOS script example: 

     

    for /L %i in (0,1,23) do @echo set interface ge-0/0/%i.0 family ethernet-switching vlan members V1

     

    You get the idea...change as needed OR use apply groups like so:

     

    set groups InterfaceSettings interfaces <ge-*>  family ethernet-switching vlan members V1

    set apply-groups InterfaceSettings

     

    see the config using show interface ge-0/0/0 | show inheritance 

    OR CLEANER OUTPUT: show interface ge-0/0/0 | show inheritance | except ##

     

    can't wait until ranges in November...hope it's true!

     

    HTH!



  • 7.  RE: Ability to edit multiple EX interfaces

    Posted 07-15-2010 01:12

    Hi there,


    From 10.x

    #set interfaces interface-range int_in_eth member-range ge-3/0/0 to ge-3/0/47
    #set interfaces interface-range int_in_eth unit 0 family ethernet-switching
    #commit check

    #commit


    For this example, i needed to create logical interfaces for my LC3 (virtual chassis configuration) that allows to use these ports.


    Other example but for VLAN: http://kb.juniper.net/index?page=content&id=KB16354



  • 8.  RE: Ability to edit multiple EX interfaces

    Posted 07-23-2010 06:00

    Hi Guys,

     

    you can also create a set file inside the EX itself on old versions (this can be used for any commands you need) as per below:

     

    - Go to the shell (start shell user root)

    - sh

    - # rm set-file.txt; X=0; while [ $X -lt 10 ]; do echo "set interface ge-0/0/$X description INT$X" >> set-file.txt; X=`expr $X + 1`; done
    # cat set-file.txt
    set interface ge-0/0/0 description INT0
    set interface ge-0/0/1 description INT1
    set interface ge-0/0/2 description INT2
    set interface ge-0/0/3 description INT3
    set interface ge-0/0/4 description INT4
    set interface ge-0/0/5 description INT5
    set interface ge-0/0/6 description INT6
    set interface ge-0/0/7 description INT7
    set interface ge-0/0/8 description INT8
    set interface ge-0/0/9 description INT9

    The you can load it directly from cli:

     

    load set set-file.txt

    Regards,

    Carlos