Description

This article provides information on how enable logging on the EX Switch, when there is a change in the STP topology.

Symptoms

  • Enable sys logging, when there is a change in the STP topology.
  • By default, EX will not generated any log messages for the topology change.
  • Traceoption is enabled to track STP related transactions.

Solution


Configuration :

You have to enable STP traceoptions, as shown below:
set protocols rstp traceoptions file stp-log
set protocols rstp traceoptions flag bridge-detection-state-machine
set protocols rstp traceoptions flag topology-change-state-machine
stp-log is saved in /var/log/ . The following command is issued to verify these log messages:
user@switch#run show log stp-log

Aug 25 16:56:23.789876 BDSM: Port 513: Bridge Detection Machine Called with Event: BPDU_RCVD, State: NOT_EDGE
Aug 25 16:56:23.790122 BDSM: No Operations to Perform
Aug 25 16:56:23.793339 BDSM: Port 513: Bridge Detection Machine Called with Event: BPDU_RCVD, State: NOT_EDGE
Aug 25 16:56:23.793422 BDSM: No Operations to Perform
Aug 25 16:56:23.793520 BDSM: Port 513: Bridge Detection Machine Called with Event: BPDU_RCVD, State: NOT_EDGE
Aug 25 16:56:23.793554 BDSM: No Operations to Perform
Aug 25 16:56:23.794534 BDSM: Port 517: Bridge Detection Machine Called with Event: BPDU_RCVD, State: NOT_EDGE
Aug 25 16:56:23.794594 BDSM: No Operations to Perform
Aug 25 16:56:23.794702 TCSM: Port ge-0/0/4.0: Topo Ch Machine Called with Event: NOT_DESG_ROOT, State: ACTIVE

Note : Enabling all the SNMP trap categories, as shown below, does not generate the logs or traps for TCN (Topology Change Notification):
{master:0}[edit snmp]
user@switch#show
community jk;
trap-group jk1 {
    version all;
    categories {
        chassis;
        link;
        remote-operations;
        rmon-alarm;
        services;
    }
}