Skip to content

Commit

Permalink
Merge pull request sonic-net#82 from dr412113/master
Browse files Browse the repository at this point in the history
Enhancements
  • Loading branch information
dks19 committed Feb 4, 2021
2 parents 45a340f + 03d7514 commit befe550
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 39 deletions.
18 changes: 10 additions & 8 deletions L2/STP/SONiC PVST FDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 <ifname\> <value\> | Config Mode:Interface<br/>(config-if)#[no] spanning-tree cost <value><br/> |
| 3.6.2.4.7 BPDU Filter | Not Available | Config Mode:Interface<br/>(config-if)#[no] spanning-tree bpdufilter [enable\|disable]<br/> |
| 3.6.3 Show Commands | show spanning_tree | show spanning-tree |
| | show spanning_tree vlan <vlanid> | show spanning-tree [vlan <vlanid>] |
| | show spanning_tree vlan interface <vlanid> <ifname> | show spanning-tree [vlan <vlanid> [interface <ifname>]] |
| | show spanning_tree vlan <vlanid> | show spanning-tree [vlan <vlanid/vlan-range>] |
| | show spanning_tree vlan interface <vlanid> <ifname> | show spanning-tree [vlan <vlanid/vlan-range> [interface <ifname>]] |
| | show spanning_tree bpdu_guard | show spanning-tree bpdu-guard |
| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan <id>] |
| | show spanning_tree statistics [vlan <id>] | show spanning-tree counters [vlan <id>] |
| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan <vlanid/vlan-range>] |
| | show spanning_tree statistics [vlan <id>] | show spanning-tree counters [vlan <vlanid/vlan-range>] |
| | 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 <id> | [no] debug spanning-tree vlan <id> |
Expand Down
131 changes: 100 additions & 31 deletions L2/STP/SONiC RPVST Plus FS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 <vlan-id> **
**spanning-tree vlan <vlan-id/vlan-range>**

**no spanning-tree vlan <vlan-id> **
**no spanning-tree vlan <vlan-id/vlan-range>**

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 <vlan-id> | 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 <vlan-id/vlan-range> | 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 <vlan-id>] forward-time <seconds\>**
Use the no form of this command to return to the default setting.

**spanning-tree [vlan <vlan-id/vlan-range>] forward-time <seconds\>**

** no spanning-tree [vlan <vlan-id>] forward-time **
**no spanning-tree [vlan <vlan-id/vlan-range>] 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**:

Expand All @@ -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 <vlan-id>] hello-time <seconds\>**
Use the no form of this command to return to the default setting.

**spanning-tree [vlan <vlan-id/vlan-range>] hello-time <seconds\>**

**no spanning-tree [vlan <vlan-id/vlan-range>] hello-time**

**no spanning-tree [vlan <vlan-id>] 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**:

Expand All @@ -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 <vlan-id>] max-age <seconds\>**
**spanning-tree [vlan <vlan-id/vlan-range>] max-age <seconds\>**

**no spanning-tree [vlan <vlan-id>] max-age **
**no spanning-tree [vlan <vlan-id/vlan-range>] 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**:

Expand All @@ -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 <vlan-id/vlan-range>] priority <value\>**

**spanning-tree [vlan <vlan-id>] priority <value\>**
**no spanning-tree [vlan <vlan-id/vlan-range>] priority**

**no spanning-tree [vlan <vlan-id>] 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**:

Expand All @@ -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**:

Expand All @@ -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 <vlan-id>] cost <value\>**
Use the no form of this command to return to the default setting.

**spanning-tree [vlan <vlan-id/vlan-range>] cost <value\>**

**no spanning-tree [vlan <vlan-id>] cost **
**no spanning-tree [vlan <vlan-id/vlan-range>] 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**:

Expand Down Expand Up @@ -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 <vlan-id>] port-priority <value\>**
**spanning-tree [vlan <vlan-id/vlan-range>] port-priority <value\>**

**no spanning-tree [vlan <vlan-id/vlan-range>] port-priority**

**no spanning-tree [vlan <vlan-id>] 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**:

Expand All @@ -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.
Expand All @@ -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**:

Expand Down Expand Up @@ -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 <vlan\>**
**show spanning-tree vlan <vlan-id/vlan-range\>**

Syntax Description:

| Keyword | Description |
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| vlan <vlan-id> | 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 <vlan-id/vlan-range> | 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

Expand Down Expand Up @@ -575,15 +644,15 @@ Example:

**show spanning-tree counters**

**show spanning-tree counters vlan <vlanid\>**
**show spanning-tree counters vlan <vlan-id/vlan-range\>**

This command displays the spanning-tree counters. counters will be synced to APP DB every 10 seconds.

Syntax Description:

| Keyword | Description |
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| vlan <vlan-id> | 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 <vlan-id/vlan-range> | 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

Expand Down

0 comments on commit befe550

Please sign in to comment.