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.

ytti
  • 9,776
  • 42
  • 53
DrBru
  • 1,609
  • 3
  • 16
  • 32

2 Answers2

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.

Craig Constantine
  • 4,972
  • 5
  • 36
  • 53
Lysis
  • 186
  • 2
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.

ytti
  • 9,776
  • 42
  • 53
  • 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 08 '13 at 14:34