Support Support Downloads Knowledge Base Case Manager My Juniper 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

What are the port states for STP and how do I monitor port states on EX-series switches?

0

0

Article ID: KB10983 KB Last Updated: 07 Oct 2008Version: 3.0
Summary:
EX-series switches provide Layer 2 loop prevention through Spanning Tree Protocol (STP), Rapid spanning tree protocol (RSTP), and multiple spanning tree protocol (MSTP). RSTP and MSTP are both based upon STP. The information below describes the port states in STP and CLI commands to monitor port state in EX series switches.
Solution:

STP is the simplest loop prevention protocol. It is a Layer 2 protocol that calculates the best path through a switched network that contains redundant paths. STP uses bridge protocol data unit (BPDU) packets to exchange information with other switches.

When enabling a new port for STP the Spanning Tree Protocol goes through the following port states to get that port to be either forwarding or blocking. The port states are:

  • Blocking - Drops all packet and does not forward any frames but still receives BPDUs from other switches.
  • Listening - The first state in transition to forwarding states. Unlike Blocking, in Listening mode, the port will send BPDUs.
  • Learning - the second state in the transition to Forwarding. State, the switch learns MAC addresses sent on this switch port. Forwarding - transmits and receives frames. This is the normal state for a port.
  • Disabled - Does not participate in STP, the switch port is administratively disabled.

To verify port state

Use the command 'show spanning-tree interface' to check the interface state, verify that the ports are in steady state and not flapping between states (ie Forwarding, Blocking or listening). Flapping interfaces will affect the stability and performance of the LAN

user@switch> show spanning-tree interface

Spanning tree interface parameters for instance 0

Interface     Port ID    Designated Designated          Port    State  Role
                         port ID    bridge ID           Cost
ge-0/0/9.0    128:522    128:522    32768.0019e25078a0  20000    FWD   DESG
ge-0/0/10.0   128:523    128:523    32768.0019e25078a0  20000    FWD   DESG
ge-0/0/11.0   128:524    128:524    32768.0019e25078a0  20000    FWD   DESG


To verify correct transmission of BPDU packets

Use the command 'show spanning-tree statistics interface' to verify that BPDU packets are being sent and received correctly, and not discarded without any apparent reason. The example below shows the BPDU sent and received, and the next BPD transmission in seconds

switch@user> show spanning-tree statistics interface
Interface   BPDUs sent BPDUs received Next BPD transmission
ge-0/0/9.0   7             5             0
ge-0/0/10.0  7             5             0
ge-0/0/11.0  7             5             0




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