Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an efficient way to explicitly configure all interfaces as edge ports except for one or two? Something along the lines of:

set protocols rstp interface all edge

set protocols rstp interface ge-0/0/0 mode point-to-point

set protocols rstp interface ge-0/0/1 mode point-to-point

set protocols rstp interface all bpdu-timeout-action block

set protocols rstp interface all bpdu-timeout-action log

set protocols rstp bpdu-block-on-edge
share|improve this question
Are you just looking at a way of automating the statements or are you trying to eliminate redundant configurations? The wildcard range stanza might be your simplest solution if your trying to apply something like this en masse. – Ryan Foley Jul 1 '14 at 20:44
That might be the solution that I end up using, however it would be nice if there was a way to use an except type of command. Say, for the access-layer having everything edge except it's single uplink. Can you give me an example of how I would use the wildcard range for this? – Cory Jul 1 '14 at 20:50
Since this is Juniper related I can't give a real answer, but in Cisco-Land the spanning-tree portfast default command only applies to interfaces set in switchport mode access, which allows you to either configure a trunked interface, or in the interface configuration use spanning-tree portfast disable. – cpt_fink Jul 3 '14 at 3:14
up vote 3 down vote accepted

Judging by your comments, you're simply trying to simplify your initial set statements. The easiest solution is to use the wildcard range statements released after 12.1.

Example usage:

user@host# wildcard range set interfaces ge-0/0/[0-23] unit 0 family vpls

Equivalent to:

user@host# set interfaces ge-0/0/0 unit 0 family vpls
user@host# set interfaces ge-0/0/1 unit 0 family vpls
user@host# set interfaces ge-0/0/2 unit 0 family vpls
user@host# set interfaces ge-0/0/23 unit 0 family vpls

Juniper - Example: Using the Wildcard Command with the Range Option

In your example above, you appear to want to multiple ranges. For instance, if you wanted all ports except port 25, you would use this:

wildcard range set protocols rstp interface ge-0/0/[0-24,26-47] mode point-to-point
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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