Description

This article explains how to determine the topology change interface initiator in a Spanning Treeenabled network. 

Symptoms

I want to verify whether the topology number is increasing in a Juniper Networks EX Series switch due to a change in the spanning-tree environment.

Solution

The topology change details in a spanning-tree environment can be identified by issuing the following command.

 

For Legacy devices with no ELS support

root@switch> show spanning-tree bridge detail
STP bridge parameters
Context ID : 0
Enabled protocol : RSTP
Root ID : 32768.28:c0:da:3d:50:40
Hello time : 2 seconds
Maximum age : 20 seconds
Forward delay : 15 seconds
Message age : 0
Number of topology changes : 2   <---------------------------
Time since last topology change : 3231 seconds  
Topology change initiator : ge-0/0/4.0  
Topology change last recvd. from : 2c:6b:f5:8b:23:04   
Local parameters
Bridge ID : 32768.28:c0:da:3d:50:40
Extended system ID : 0
Internal instance ID : 0
Hello time : 2 seconds
Maximum age : 20 seconds
Forward delay : 15 seconds
Path cost method : 32 bit

For devices with ELS support

root@Switch> show spanning-tree bridge detail 
STP bridge parameters 
Routing instance name               : GLOBAL
Context ID                          : 0
Enabled protocol                    : RSTP
  Root ID                           : 4096.54:4b:8c:47:84:00
  Root cost                         : 20000
  Root port                         : ge-0/0/1
  Hello time                        : 2 seconds
  Maximum age                       : 20 seconds
  Forward delay                     : 15 seconds
  Message age                       : 1 
  Number of topology changes        : 27
  Time since last topology change   : 5 seconds
  Local parameters 
    Bridge ID                       : 32768.10:0e:7e:a1:0a:40
    Extended system ID              : 0
    Hello time                      : 2 seconds
    Maximum age                     : 20 seconds
    Forward delay                   : 15 seconds
    Path cost method                : 32 bit 

Note that this command must be issued several times to see the changes in the "Number of topology changes" field. If the "Number of topology changes" line value increases, it means that there has been an interface flap in the network. You can find the interface where the topology change occurred in the logs with:

root@Switch> show log messages | match TOPO_CH
Dec 27 08:32:10  Switch l2cpd[38315]: TOPO_CH: for Instance 0 in  routing-instance default received on port ge-0/0/0.0

To further troubleshoot this, you will need access to the device that is sending the topology changes. You may also need to access the devices on a hop-by-hop basis in the topology until you find the device that is initiating them. After the device is located, look out for any interface that is flapping or check if a loop is present. You can verify the messages log with:

root@Switch> show log messages | match SNMP_TRAP_LINK

The output should present a list of the interfaces that have gone down and up. Identify the interface that is constantly flapping. You can then disable the port or disconnect it. In this case, the cause might be a problem with the cable, the device that is connected to it, or a broken port. You can verify the number of interface flaps with:

root@Switch> show interfaces <interface-name> extensive | match "Carrier transitions"

A high number of carrier transitions will point to a broken cable connection or fiber, or indicate a physical issue with the port. Replace the transceiver or port or move to a different port in the meantime. If you find that the issue is with the port after swapping cables or transceivers, contact Support

 

For more information about the show spanning-tree bridge detail command, refer to show spanning-tree bridge.

Modification History

2022-06-22: Added ELS outputs and updated links; added more information on how to troubleshoot