diff --git a/L2/STP/SONiC PVST FDS.md b/L2/STP/SONiC PVST FDS.md index 82f41970d0ec..fb6b95e04c3b 100644 --- a/L2/STP/SONiC PVST FDS.md +++ b/L2/STP/SONiC PVST FDS.md @@ -362,10 +362,12 @@ This command allows enabling the spanning tree mode for the device. **config spanning_tree {enable|disable} {pvst}** Note: -1) When global pvst mode is enabled, by default spanning tree will be enabled on the first 255 VLANs, for rest of the VLAN spanning tree will be disabled. -2) When multiple spanning-tree modes are supported, only one mode can be enabled at any given point of time. - - +1) When global PVST or RPVST mode is enabled, + 1. If total number of VLANs in the system is less than or equal to "MAX_STP_INSTANCES". + - Enable spanning tree on all the VLANs in the system, + 2. If total number of VLANs in the system is greater than "MAX_STP_INSTANCES". + - Throw an error +2) Only one mode can be enabled at any given point of time. ### 3.6.2.1.2 Per VLAN spanning-tree This command allows enabling or disabling spanning-tree on a VLAN. @@ -702,11 +704,11 @@ This section provides the industry standard CLIs that will be supported in the 2 | 3.6.2.4.6 Port level path cost | configure spanning_tree interface cost | Config Mode:Interface
(config-if)#[no] spanning-tree cost
| | 3.6.2.4.7 BPDU Filter | Not Available | Config Mode:Interface
(config-if)#[no] spanning-tree bpdufilter [enable\|disable]
| | 3.6.3 Show Commands | show spanning_tree | show spanning-tree | -| | show spanning_tree vlan | show spanning-tree [vlan ] | -| | show spanning_tree vlan interface | show spanning-tree [vlan [interface ]] | +| | show spanning_tree vlan | show spanning-tree [vlan ] | +| | show spanning_tree vlan interface | show spanning-tree [vlan [interface ]] | | | show spanning_tree bpdu_guard | show spanning-tree bpdu-guard | -| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan ] | -| | show spanning_tree statistics [vlan ] | show spanning-tree counters [vlan ] | +| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan ] | +| | show spanning_tree statistics [vlan ] | show spanning-tree counters [vlan ] | | | show runningconfiguration spanning_tree | show running-config spanning-tree | | 3.6.4 Debug Commands | debug spanning_tree | [no] debug spanning-tree | | | debug spanning_tree vlan | [no] debug spanning-tree vlan | diff --git a/L2/STP/SONiC RPVST Plus FS.md b/L2/STP/SONiC RPVST Plus FS.md index e1e15d893481..ec0f56675ed7 100644 --- a/L2/STP/SONiC RPVST Plus FS.md +++ b/L2/STP/SONiC RPVST Plus FS.md @@ -266,6 +266,12 @@ Use the no form of this command to return to the default setting. **no spanning-tree mode** +Eg: +``` +spanning-tree mode pvst +no spanning-tree mode +``` + **Syntax Description:** | Keyword | Description | @@ -278,43 +284,58 @@ Use the no form of this command to return to the default setting. **Command Mode**: Global Config Note: -1) When global PVST or RPVST mode is enabled, by default, spanning tree will be enabled on the first 255 VLANs. For rest of the VLANs, spanning tree is disabled. -The 255 VLANs are selected in the following order: -1. If spanning tree instances are configured first followed by VLANs, configuration order is used to count the first 255 spanning tree instances. -2. If VLANs are configured first followed by spanning tree instances, then VLANs are sorted by VLAN Id and first 255 VLAN Ids are used. +1) When global PVST or RPVST mode is enabled, + 1. If total number of VLANs in the system is less than or equal to "MAX_STP_INSTANCES". + - Enable spanning tree on all the VLANs in the system, + 2. If total number of VLANs in the system is greater than "MAX_STP_INSTANCES". + - Throw an error 2) Only one mode can be enabled at any given point of time. - #### 3.6.2.1.2 Per VLAN spanning-tree #### This command allows enabling or disabling spanning-tree on a VLAN. Use this command to disable or enable PVST / RPVST+ on a VLAN. Changing the PVST+ / RPVST+ state in a VLAN affects only that VLAN. This command enables PVST+ / RPVST+ for all ports in a VLAN. -Use the no form of this command to return to the default setting. +Use the no form of this command to disable STP for a VLAN. -**spanning-tree vlan ** +**spanning-tree vlan ** -**no spanning-tree vlan ** +**no spanning-tree vlan ** + +Eg: +``` +spanning-tree vlan 2 +spanning-tree vlan 3,50-100,200,1000-1200 +no spanning-tree vlan 75-90,200,1100-1150 +``` **Syntax Description**: | Keyword | Description | |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| vlan | Configure spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | +| vlan | Configure spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | **Default**: Spanning tree is enabled on all VLANs subject to scaling limits. **Command Mode**: Global Config - #### 3.6.2.1.3 Changing RPVST+ bridge parameters #### #### 3.6.2.1.3 Forward delay #### This command allows configuring the forward delay time in seconds. -** spanning-tree [vlan ] forward-time ** +Use the no form of this command to return to the default setting. + +**spanning-tree [vlan ] forward-time ** -** no spanning-tree [vlan ] forward-time ** +**no spanning-tree [vlan ] forward-time** + +Eg: +``` +spanning-tree vlan 2 forward-time 5 +spanning-tree vlan 3,50-100,200,1000-1200 forward-time 6 +no spanning-tree vlan 75-90,200,1100-1150 forward-time +``` **Syntax description**: @@ -329,10 +350,20 @@ This command allows configuring the forward delay time in seconds. #### 3.6.2.1.4 Hello time #### This command allows configuring the hello interval in seconds for transmission of BPDUs. +Use the no form of this command to return to the default setting. -**spanning-tree [vlan ] hello-time ** +Use the no form of this command to return to the default setting. + +**spanning-tree [vlan ] hello-time ** + +**no spanning-tree [vlan ] hello-time** -**no spanning-tree [vlan ] hello-time ** +Eg: +``` +spanning-tree vlan 2 hello-time 1 +spanning-tree vlan 3,50-100,200,1000-1200 hello-time 3 +no spanning-tree vlan 75-90,200,1100-1150 hello-time +``` **Syntax description**: @@ -347,10 +378,20 @@ This command allows configuring the hello interval in seconds for transmission o #### 3.6.2.1.5 Max-age #### This command allows configuring the maximum time to listen for root bridge in seconds. +Use the no form of this command to return to the default setting. + +Use the no form of this command to return to the default setting. -**spanning-tree [vlan ] max-age ** +**spanning-tree [vlan ] max-age ** -**no spanning-tree [vlan ] max-age ** +**no spanning-tree [vlan ] max-age** + +Eg: +``` +spanning-tree vlan 2 max-age 6 +spanning-tree vlan 3,50-100,200,1000-1200 max-age 7 +no spanning-tree vlan 75-90,200,1100-1150 max-age +``` **Syntax description**: @@ -365,10 +406,20 @@ Default: The max-age is 20 seconds #### 3.6.2.1.6 Priority #### This command allows configuring the bridge priority in increments of 4096 (default = 32768), range 0-61440. +Use the no form of this command to return to the default setting. + +Use the no form of this command to return to the default setting. + +**spanning-tree [vlan ] priority ** -**spanning-tree [vlan ] priority ** +**no spanning-tree [vlan ] priority** -**no spanning-tree [vlan ] priority ** +Eg: +``` +spanning-tree vlan 2 priority 0 +spanning-tree vlan 3,50-100,200,1000-1200 priority 4096 +no spanning-tree vlan 75-90,200,1100-1150 priority +``` **Syntax description**: @@ -385,10 +436,13 @@ This command allows configuring the bridge priority in increments of 4096 (defau This command allows configuring the loop guard on all the ports. By default, when spanning-tree stops receiving the BPDUs on a blocking port, it transitions to forwarding state which can result in a loop in the network. Loop guard feature when enabled, avoids this transition of non-designated ports to forwarding state and instead moves the port to a loop inconsistent state where the port continues to block the traffic to avoid the loop. +Use the no form of this command to disable loopguard by default on all the ports. + +Use the no form of this command to disable loopguard by default on all the ports. **spanning-tree loopguard default** -**no spanning-tree loopguard default ** +**no spanning-tree loopguard default** **Syntax description**: @@ -408,10 +462,18 @@ Below configurations allow STP parameters to be configured on per VLAN, interfac This command allows to configure the port level cost value for a VLAN, range 1 - 200000000. -**spanning-tree [vlan ] cost ** +Use the no form of this command to return to the default setting. + +**spanning-tree [vlan ] cost ** -**no spanning-tree [vlan ] cost ** +**no spanning-tree [vlan ] cost** +Eg: +``` +spanning-tree vlan 2 cost 1 +spanning-tree vlan 3,50-100,200,1000-1200 cost 100 +no spanning-tree vlan 75-90,200,1100-1150 cost +``` **Syntax description**: @@ -440,9 +502,16 @@ This command allows to configure the port level cost value for a VLAN, range 1 - ### 3.6.2.3.2 Port priority This command allows to configure the port level priority value for a VLAN. -**spanning-tree [vlan ] port-priority ** +**spanning-tree [vlan ] port-priority ** + +**no spanning-tree [vlan ] port-priority** -**no spanning-tree [vlan ] port-priority ** +Eg: +``` +spanning-tree vlan 2 port-priority 0 +spanning-tree vlan 3,50-100,200,1000-1200 port-priority 1 +no spanning-tree vlan 75-90,200,1100-1150 port-priority +``` **Syntax description**: @@ -460,9 +529,9 @@ This command allows to configure the port level priority value for a VLAN. This command allows enabling or disabling of STP on an interface. -**spanning-tree enable ** +**spanning-tree enable** -**no spanning-tree enable ** +**no spanning-tree enable** **Syntax description**: This command has no arguments or keywords. @@ -475,9 +544,9 @@ This command has no arguments or keywords. Can be set to enabled or disabled. The port becomes an edge port in the domain when set to enabled. Enabling edge port transitions the port quickly to spanning tree forwarding state without passing through blocking or learning states. -**spanning-tree port type edge ** +**spanning-tree port type edge** -**no spanning-tree port type ** +**no spanning-tree port type** **Syntax description**: @@ -539,13 +608,13 @@ This command allows configuring loop guard or root guard on an interface. Display spanning-tree information on the given vlan. -**show spanning-tree vlan ** +**show spanning-tree vlan ** Syntax Description: | Keyword | Description | |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| vlan | Display spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | +| vlan | Display spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | **Command Mode**: User EXEC @@ -575,7 +644,7 @@ Example: **show spanning-tree counters** -**show spanning-tree counters vlan ** +**show spanning-tree counters vlan ** This command displays the spanning-tree counters. counters will be synced to APP DB every 10 seconds. @@ -583,7 +652,7 @@ Syntax Description: | Keyword | Description | |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| vlan | Display spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | +| vlan | Display spanning-tree information for the given VLAN. User can specify a single VLAN ID, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. | **Command Mode**: User EXEC