8

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.

4

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.

1
  • 2
    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/"
    – DrBru
    Jul 8 '13 at 14:34
5

Starting with JunOS 12.1 there is wildcard range set in edit mode. You can use it with various range formats, as a starting point "Wildcard range commands for EX switches" is a good read.

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.