Skip to content

Commit befe550

Browse files
authored
Merge pull request sonic-net#82 from dr412113/master
Enhancements
2 parents 45a340f + 03d7514 commit befe550

File tree

2 files changed

+110
-39
lines changed

2 files changed

+110
-39
lines changed

L2/STP/SONiC PVST FDS.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,12 @@ This command allows enabling the spanning tree mode for the device.
362362
**config spanning_tree {enable|disable} {pvst}**
363363

364364
Note:
365-
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.
366-
2) When multiple spanning-tree modes are supported, only one mode can be enabled at any given point of time.
367-
368-
365+
1) When global PVST or RPVST mode is enabled,
366+
1. If total number of VLANs in the system is less than or equal to "MAX_STP_INSTANCES".
367+
- Enable spanning tree on all the VLANs in the system,
368+
2. If total number of VLANs in the system is greater than "MAX_STP_INSTANCES".
369+
- Throw an error
370+
2) Only one mode can be enabled at any given point of time.
369371

370372
### 3.6.2.1.2 Per VLAN spanning-tree
371373
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
702704
| 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/> |
703705
| 3.6.2.4.7 BPDU Filter | Not Available | Config Mode:Interface<br/>(config-if)#[no] spanning-tree bpdufilter [enable\|disable]<br/> |
704706
| 3.6.3 Show Commands | show spanning_tree | show spanning-tree |
705-
| | show spanning_tree vlan <vlanid> | show spanning-tree [vlan <vlanid>] |
706-
| | show spanning_tree vlan interface <vlanid> <ifname> | show spanning-tree [vlan <vlanid> [interface <ifname>]] |
707+
| | show spanning_tree vlan <vlanid> | show spanning-tree [vlan <vlanid/vlan-range>] |
708+
| | show spanning_tree vlan interface <vlanid> <ifname> | show spanning-tree [vlan <vlanid/vlan-range> [interface <ifname>]] |
707709
| | show spanning_tree bpdu_guard | show spanning-tree bpdu-guard |
708-
| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan <id>] |
709-
| | show spanning_tree statistics [vlan <id>] | show spanning-tree counters [vlan <id>] |
710+
| | show spanning_tree root_guard | show spanning-tree inconsistentports [vlan <vlanid/vlan-range>] |
711+
| | show spanning_tree statistics [vlan <id>] | show spanning-tree counters [vlan <vlanid/vlan-range>] |
710712
| | show runningconfiguration spanning_tree | show running-config spanning-tree |
711713
| 3.6.4 Debug Commands | debug spanning_tree | [no] debug spanning-tree |
712714
| | debug spanning_tree vlan <id> | [no] debug spanning-tree vlan <id> |

L2/STP/SONiC RPVST Plus FS.md

Lines changed: 100 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ Use the no form of this command to return to the default setting.
266266

267267
**no spanning-tree mode**
268268

269+
Eg:
270+
```
271+
spanning-tree mode pvst
272+
no spanning-tree mode
273+
```
274+
269275
**Syntax Description:**
270276

271277
| Keyword | Description |
@@ -278,43 +284,58 @@ Use the no form of this command to return to the default setting.
278284
**Command Mode**: Global Config
279285

280286
Note:
281-
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.
282-
The 255 VLANs are selected in the following order:
283-
1. If spanning tree instances are configured first followed by VLANs, configuration order is used to count the first 255 spanning tree instances.
284-
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.
285287

288+
1) When global PVST or RPVST mode is enabled,
289+
1. If total number of VLANs in the system is less than or equal to "MAX_STP_INSTANCES".
290+
- Enable spanning tree on all the VLANs in the system,
291+
2. If total number of VLANs in the system is greater than "MAX_STP_INSTANCES".
292+
- Throw an error
286293
2) Only one mode can be enabled at any given point of time.
287294

288-
289295
#### 3.6.2.1.2 Per VLAN spanning-tree ####
290296

291297
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.
292298

293-
Use the no form of this command to return to the default setting.
299+
Use the no form of this command to disable STP for a VLAN.
294300

295-
**spanning-tree vlan <vlan-id> **
301+
**spanning-tree vlan <vlan-id/vlan-range>**
296302

297-
**no spanning-tree vlan <vlan-id> **
303+
**no spanning-tree vlan <vlan-id/vlan-range>**
304+
305+
Eg:
306+
```
307+
spanning-tree vlan 2
308+
spanning-tree vlan 3,50-100,200,1000-1200
309+
no spanning-tree vlan 75-90,200,1100-1150
310+
```
298311

299312
**Syntax Description**:
300313

301314
| Keyword | Description |
302315
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
303-
| 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. |
316+
| 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. |
304317

305318
**Default**: Spanning tree is enabled on all VLANs subject to scaling limits.
306319

307320
**Command Mode**: Global Config
308321

309-
310322
#### 3.6.2.1.3 Changing RPVST+ bridge parameters ####
311323
#### 3.6.2.1.3 Forward delay ####
312324

313325
This command allows configuring the forward delay time in seconds.
314326

315-
** spanning-tree [vlan <vlan-id>] forward-time <seconds\>**
327+
Use the no form of this command to return to the default setting.
328+
329+
**spanning-tree [vlan <vlan-id/vlan-range>] forward-time <seconds\>**
316330

317-
** no spanning-tree [vlan <vlan-id>] forward-time **
331+
**no spanning-tree [vlan <vlan-id/vlan-range>] forward-time**
332+
333+
Eg:
334+
```
335+
spanning-tree vlan 2 forward-time 5
336+
spanning-tree vlan 3,50-100,200,1000-1200 forward-time 6
337+
no spanning-tree vlan 75-90,200,1100-1150 forward-time
338+
```
318339

319340
**Syntax description**:
320341

@@ -329,10 +350,20 @@ This command allows configuring the forward delay time in seconds.
329350
#### 3.6.2.1.4 Hello time ####
330351

331352
This command allows configuring the hello interval in seconds for transmission of BPDUs.
353+
Use the no form of this command to return to the default setting.
332354

333-
**spanning-tree [vlan <vlan-id>] hello-time <seconds\>**
355+
Use the no form of this command to return to the default setting.
356+
357+
**spanning-tree [vlan <vlan-id/vlan-range>] hello-time <seconds\>**
358+
359+
**no spanning-tree [vlan <vlan-id/vlan-range>] hello-time**
334360

335-
**no spanning-tree [vlan <vlan-id>] hello-time **
361+
Eg:
362+
```
363+
spanning-tree vlan 2 hello-time 1
364+
spanning-tree vlan 3,50-100,200,1000-1200 hello-time 3
365+
no spanning-tree vlan 75-90,200,1100-1150 hello-time
366+
```
336367

337368
**Syntax description**:
338369

@@ -347,10 +378,20 @@ This command allows configuring the hello interval in seconds for transmission o
347378
#### 3.6.2.1.5 Max-age ####
348379

349380
This command allows configuring the maximum time to listen for root bridge in seconds.
381+
Use the no form of this command to return to the default setting.
382+
383+
Use the no form of this command to return to the default setting.
350384

351-
**spanning-tree [vlan <vlan-id>] max-age <seconds\>**
385+
**spanning-tree [vlan <vlan-id/vlan-range>] max-age <seconds\>**
352386

353-
**no spanning-tree [vlan <vlan-id>] max-age **
387+
**no spanning-tree [vlan <vlan-id/vlan-range>] max-age**
388+
389+
Eg:
390+
```
391+
spanning-tree vlan 2 max-age 6
392+
spanning-tree vlan 3,50-100,200,1000-1200 max-age 7
393+
no spanning-tree vlan 75-90,200,1100-1150 max-age
394+
```
354395

355396
**Syntax description**:
356397

@@ -365,10 +406,20 @@ Default: The max-age is 20 seconds
365406
#### 3.6.2.1.6 Priority ####
366407

367408
This command allows configuring the bridge priority in increments of 4096 (default = 32768), range 0-61440.
409+
Use the no form of this command to return to the default setting.
410+
411+
Use the no form of this command to return to the default setting.
412+
413+
**spanning-tree [vlan <vlan-id/vlan-range>] priority <value\>**
368414

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

371-
**no spanning-tree [vlan <vlan-id>] priority **
417+
Eg:
418+
```
419+
spanning-tree vlan 2 priority 0
420+
spanning-tree vlan 3,50-100,200,1000-1200 priority 4096
421+
no spanning-tree vlan 75-90,200,1100-1150 priority
422+
```
372423

373424
**Syntax description**:
374425

@@ -385,10 +436,13 @@ This command allows configuring the bridge priority in increments of 4096 (defau
385436
This command allows configuring the loop guard on all the ports.
386437

387438
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.
439+
Use the no form of this command to disable loopguard by default on all the ports.
440+
441+
Use the no form of this command to disable loopguard by default on all the ports.
388442

389443
**spanning-tree loopguard default**
390444

391-
**no spanning-tree loopguard default **
445+
**no spanning-tree loopguard default**
392446

393447
**Syntax description**:
394448

@@ -408,10 +462,18 @@ Below configurations allow STP parameters to be configured on per VLAN, interfac
408462

409463
This command allows to configure the port level cost value for a VLAN, range 1 - 200000000.
410464

411-
**spanning-tree [vlan <vlan-id>] cost <value\>**
465+
Use the no form of this command to return to the default setting.
466+
467+
**spanning-tree [vlan <vlan-id/vlan-range>] cost <value\>**
412468

413-
**no spanning-tree [vlan <vlan-id>] cost **
469+
**no spanning-tree [vlan <vlan-id/vlan-range>] cost**
414470

471+
Eg:
472+
```
473+
spanning-tree vlan 2 cost 1
474+
spanning-tree vlan 3,50-100,200,1000-1200 cost 100
475+
no spanning-tree vlan 75-90,200,1100-1150 cost
476+
```
415477

416478
**Syntax description**:
417479

@@ -440,9 +502,16 @@ This command allows to configure the port level cost value for a VLAN, range 1 -
440502
### 3.6.2.3.2 Port priority
441503
This command allows to configure the port level priority value for a VLAN.
442504

443-
**spanning-tree [vlan <vlan-id>] port-priority <value\>**
505+
**spanning-tree [vlan <vlan-id/vlan-range>] port-priority <value\>**
506+
507+
**no spanning-tree [vlan <vlan-id/vlan-range>] port-priority**
444508

445-
**no spanning-tree [vlan <vlan-id>] port-priority **
509+
Eg:
510+
```
511+
spanning-tree vlan 2 port-priority 0
512+
spanning-tree vlan 3,50-100,200,1000-1200 port-priority 1
513+
no spanning-tree vlan 75-90,200,1100-1150 port-priority
514+
```
446515

447516
**Syntax description**:
448517

@@ -460,9 +529,9 @@ This command allows to configure the port level priority value for a VLAN.
460529

461530
This command allows enabling or disabling of STP on an interface.
462531

463-
**spanning-tree enable **
532+
**spanning-tree enable**
464533

465-
**no spanning-tree enable **
534+
**no spanning-tree enable**
466535

467536
**Syntax description**:
468537
This command has no arguments or keywords.
@@ -475,9 +544,9 @@ This command has no arguments or keywords.
475544

476545
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.
477546

478-
**spanning-tree port type edge **
547+
**spanning-tree port type edge**
479548

480-
**no spanning-tree port type **
549+
**no spanning-tree port type**
481550

482551
**Syntax description**:
483552

@@ -539,13 +608,13 @@ This command allows configuring loop guard or root guard on an interface.
539608

540609
Display spanning-tree information on the given vlan.
541610

542-
**show spanning-tree vlan <vlan\>**
611+
**show spanning-tree vlan <vlan-id/vlan-range\>**
543612

544613
Syntax Description:
545614

546615
| Keyword | Description |
547616
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
548-
| 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. |
617+
| 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. |
549618

550619
**Command Mode**: User EXEC
551620

@@ -575,15 +644,15 @@ Example:
575644

576645
**show spanning-tree counters**
577646

578-
**show spanning-tree counters vlan <vlanid\>**
647+
**show spanning-tree counters vlan <vlan-id/vlan-range\>**
579648

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

582651
Syntax Description:
583652

584653
| Keyword | Description |
585654
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
586-
| 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. |
655+
| 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. |
587656

588657
**Command Mode**: User EXEC
589658

0 commit comments

Comments
 (0)