Spanning Tree Configuration

To configure spanning in JUNOS software, first navigate to the [edit protocols stp] level. Enable each interface on which you would like to run STP, or alternatively, if you would like to run STP on every interface with Ethernet switching, simply enable the protocol itself:

[edit]
lab@Brandy# set protocols stp

[edit]
lab@Brandy# show protocols
lldp {
    interface all;
}
stp;

Note

The all keyword is not configured, as every interface with Ethernet switching will have STP enabled.

This is also where timers, priorities, and other STP parameters can be set. Notice that some aspects of RSTP configuration are shown, since JUNOS implements 802.1D-2004:

lab@Brandy# set protocols stp ?
Possible completions:
  <[Enter]>            Execute this command
+ apply-groups         Groups from which to inherit configuration data
+ apply-groups-except  Don't inherit configuration data from these groups
  bpdu-block-on-edge   Block BPDU on all interfaces configured as edge (BPDU
                       Protect)
  bridge-priority      Priority of the bridge (in increments of 4k - 0,4k,8k,..60k)
  disable              Disable STP
  forward-delay        Time spent in listening or learning state (4..30 seconds)
  hello-time           Time interval between configuration BPDUs (1..10 seconds)
> interface
  max-age              Maximum age of received protocol bpdu (6..40 seconds)
> traceoptions         Tracing options for debugging protocol operation
  |                    Pipe through a command

Let’s look at how STP operates with default parameters. Recall the topology in Figure 6-25. All interfaces are enabled for STP ...

Get JUNOS Enterprise Switching now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.