Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX] Sample Spanning Tree Network Topology



Article ID: KB22832 KB Last Updated: 19 Aug 2020Version: 4.0

This article provides information about the Spanning Tree topology and related terminologies to aid in troubleshooting Spanning Tree issues.  It is part of KB22774 - Resolution Guide - EX - Troubleshoot Spanning Tree.


It is important to collect the network topology and label the key components which are useful to troubleshoot if an issue occurs.


Sample Network Topology:

The port status of the interfaces of all four switches after the Spanning Tree convergence are shown below:

Switch A (Root Bridge)     

Port ge-0/0/1: Designated Port (Forwarding)
Port ge-0/0/2: Designated Port (Forwarding)
Port ge-0/0/3: Designated Port (Forwarding)

Switch B

Port ge-0/0/1: Designated Port (Forwarding)
Port ge-0/0/2: Root Port (Forwarding)

Switch C

Port ge-0/0/1: Designated Port (Forwarding)
Port ge-0/0/2: Root Port (Forwarding)
Port ge-0/0/3: Non-Designated Port (Blocking)

Switch D

Port ge-0/0/1: Root Port (forwarding)
Port ge-0/0/2: Non-Designated Port (blocking)

Terminologies used

Brief definitions of the network topology components:

Root Bridge

The Root bridge (Switch) is a special bridge which is at the top of the Spanning Tree. The other non-root switches are then branched out from the root switch, connecting to other switches in the Local Area Network (LAN).

All Bridges (Switches) are assigned a numerical value called bridge priority. The Bridge priority value is used to find the Bridge ID.

The Bridge ID is the combination of two values:

• Switch Priority, a numerical value defined by IEEE 802.1D, which is equal to 32,768 by default
• MAC Address of the Switch

As a whole, the Bridge ID is the string obtained by appending the MAC address of the switch at the end of the switch priority.

If all the Switches in your Local Area Network (LAN) are configured with the default Switch Priority (32,768), the Switch MAC address will become the decisive factor in electing the Root Bridge (Switch).The Switch with the lowest Bridge ID is then elected as Root Bridge (Switch). The above example shows four switches with default priority value. Here Switch A is the Root Bridge since it has the lowest MAC address.

To identify the Root Bridge in your network, refer to KB22777 - Identify the Root Bridge in a Spanning Tree (STP).

Edge Port
A port on the switch that is connected to a LAN that has no other bridges attached is an edge port. These edge ports transition directly to the forwarding state. RSTP monitors the port continuously for BPDUs (Bridge Protocol Data Units) in case a bridge is connected. Edge ports do not participate in Spanning Tree. RSTP can also be configured to automatically detect edge ports.

To configure an interface as an edge port on the switch, issue the following command:

user@switch# set protocols rstp interface <interface-name> edge

The example below shows the edge port configuration for interface ge-0/0/0:

user@switch# set protocols rstp interface ge-0/0/0 edge

Non-edge Port

Non-edge ports are ports on the switch that participate in the Spanning Tree algorithm. These non-edge ports generate Topology Changes (TCs) on the network. As soon as the bridge detects a BPDU being received on an edge port, the port becomes a non-edge port.

All the interfaces shown in the sample diagram are non-edge ports.
Bridge Protocol Data Unit (BPDU)
BPDUs are data messages in a LAN that use a Spanning Tree Protocol and are exchanged between switches.  These BPDU data messages are information on ports, MAC addresses, priorities and port costs. They make sure that the data reaches the intended switch.  The BPDU messages are exchanged across different Spanning Tree Protocol enabled bridges to detect loops in a network topology.  These layer 2 loops are cleared by shutting down certain switch interfaces and enabling redundant switch ports in a backup state or blocked state.

For more Spanning Tree definitions, refer to:
Modification History:
2020-08-19: Updated links.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search