Juniper EX - disable multiple interfaces at the same time as a once off

  • I have used the Cisco interface range commands on many occasions to disable a large number of switching ports when the device is originally deployed as a once off and am looking for something similar in Junos.

    I don't want to use apply-groups or the juniper interface-range command set as there changes are permanent and to be honest it would confuse the Tier-1 / Tier 2 staff , aka inherited config is hidden by default and therefore will likely get missed when troubleshooting.

    I am just looking for verification that there is no way to do this natively before I look at using slax to create a custom command.

  • ytti

    ytti Correct answer

    8 years ago

    I don't think it's supported natively.

    Fortunately you don't need to create the SLAX script yourself, as such script already exists. Essentially you configure normal interface-range, but upon commit its content is expanded to the real interfaces and the interface-range config is removed, creating approximation of the IOS behavior.

    OMG ... that's awesome I cant stop testing all the various scripts now .. I can confirm the above script does exactly what I need if you use it within context ..... just one note , you need to copy the script to all VC members e.g. "file copy /var/db/scripts/commit/expand-interface-ranges.slax fpc0:/var/db/scripts/commit/"

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM