Page 1 of 1

RSTP's port role error?

Posted: 04 Feb 2025 21:40
by zlinuxboy
topo:

Code: Select all

          +--------------+
          | p1           | p1
sw-1 --- sw-2           sw-3
          | p2           | p2
          +--------------+
I have a question about port role on os6900, the topo like above,

sw-1 is os6860, run RSTP/per-vlan, priority is 4096
sw-2(os6900-202) and sw-3(os6900-203) are os6900, run RSTP/per-vlan, prioriy is 32768
so sw-1 is the root bridge.

according to the rstp's rule, sw-2's p1(2/1/17) role should be desg, p2(2/1/18) should be backup, sw-3's p1(1/1/17) should be root, p2(1/1/18) should be alt.

but sw-2 `show span vlan 20 port` indicate the p2 is desg, why?

Code: Select all

os6860-1457 > show spantree vlan 20
Spanning Tree Parameters for Vlan 20
  Spanning Tree Status :                   ON,
  Protocol             :       IEEE Rapid STP,
  mode                 : Per VLAN (1 STP per Vlan),
  Priority             :        4096 (0x1000),
  Bridge ID            :   1000-e8:e7:32:fa:94:db,
  Designated Root      :   1000-e8:e7:32:fa:94:db,
  Cost to Root Bridge  :                    0,
  Root Port            :                 None,
  Next Best Root Cost  :                    0,
  Next Best Root Port  :                 None,
  TxHoldCount          :                    3,
  Topology Changes     :                    7,
  Topology age         :            00:03:39,
    Current Parameters (seconds)
      Max Age              =    20,
      Forward Delay        =    15,
      Hello Time           =     2
    Parameters system uses when attempting to become root
      System Max Age       =    20,
      System Forward Delay =    15,
      System Hello Time    =     2

os6900-202 > show spantree vlan 20
Spanning Tree Parameters for Vlan 20
  Spanning Tree Status :                   ON,
  Protocol             :       IEEE Rapid STP,
  mode                 : Per VLAN (1 STP per Vlan),
  Priority             :       32768 (0x8000),
  Bridge ID            :   8000-e8:e7:32:4a:58:99,
  Designated Root      :   1000-e8:e7:32:fa:94:db,
  Cost to Root Bridge  :                    4,
  Root Port            :                2/1/3,
  TxHoldCount          :                    3,
  Topology Changes     :                   28,
  Topology age         :            00:22:48,
  Last TC Rcvd Port    :               2/1/17,
  Last TC Rcvd Bridge  :   8000-e8:e7:32:4a:5b:a9,
    Current Parameters (seconds)
      Max Age              =    20,
      Forward Delay        =    15,
      Hello Time           =     2
    Parameters system uses when attempting to become root
      System Max Age       =    20,
      System Forward Delay =    15,
      System Hello Time    =     2

os6900-202 > show spantree vlan 20 ports
Spanning Tree Port Summary for Vlan 20
        Oper  Path   Desig        Prim.   Op  Op  Loop
Port     St   Cost    Cost   Role Port    Cnx Edg Guard  Desig Bridge ID        Note
-------+----+-------+-------+----+-------+---+---+------+----------------------+------
  2/1/3 FORW       4       0 ROOT   2/1/3 PTP  NO  DIS   1000-e8:e7:32:fa:94:db
 2/1/17 FORW       2       4 DESG  2/1/17 PTP  NO  DIS   8000-e8:e7:32:4a:58:99
 2/1/18 FORW       2       4 DESG  2/1/18 PTP  NO  DIS   8000-e8:e7:32:4a:58:99
 
 os6900-203 > show spantree vlan 20 ports
Spanning Tree Port Summary for Vlan 20
        Oper  Path   Desig        Prim.   Op  Op  Loop
Port     St   Cost    Cost   Role Port    Cnx Edg Guard  Desig Bridge ID        Note
-------+----+-------+-------+----+-------+---+---+------+----------------------+------
  1/1/3  DIS       0       0  DIS   1/1/3  NS  NO  DIS   0000-00:00:00:00:00:00
 1/1/17 FORW       2       4 ROOT  1/1/17 PTP  NO  DIS   8000-e8:e7:32:4a:58:99
 1/1/18  BLK       2       4  ALT  1/1/18 PTP  NO  DIS   8000-e8:e7:32:4a:58:99

 

Re: RSTP's port role error?

Posted: 05 Feb 2025 02:01
by silvio
Hi,
according to the rstp's rule, sw-2's p1(2/1/17) role should be desg, p2(2/1/18) should be backup, sw-3's p1(1/1/17) should be root, p2(1/1/18) should be alt.

This is not the correct explanation how STP is working.
wikipedia:
Alternate – An alternate path to the root bridge. This path is different from using the root port
Backup – A backup/redundant path to a segment where another bridge port already connects
The outputs are correctly. Only 1/1/18 at SW3 is blocked (as alternate). Backup is not the other side of this link (where the port is alternate/blocked).
All ports pointing from root to the other switches are designated.
BR Silvio

Re: RSTP's port role error?

Posted: 05 Feb 2025 03:01
by Cristek
You can imagine ALTERNATE as being an alternate path to your Root Bridge, and imagine BACKUP as a backup path to the same local switch, not the root bridge.
On the same segment, you will not see 2 ports blocking, one of them will always be forwarding. This is commonly found when you have dumb switches with redundant connections.

As an exercise, grab a patch cable and loop ports 1 and 2 on Sw3, and then you will see a BACKUP :)

Re: RSTP's port role error?

Posted: 05 Feb 2025 03:06
by zlinuxboy
silvio wrote: 05 Feb 2025 02:01 All ports pointing from root to the other switches are designated.
sw-2 is not root bridge.
there two links between sw-2 and sw-3, so sw-2(2/1/18) is the reduntant link as a backup for the segment, is that right?

Re: RSTP's port role error?

Posted: 05 Feb 2025 03:13
by zlinuxboy
Cristek wrote: 05 Feb 2025 03:01 As an exercise, grab a patch cable and loop ports 1 and 2 on Sw3, and then you will see a BACKUP :)
Thanks, but I am not avaible to the switch now, only remote access. here is the physical topo:

Code: Select all

              p1     p2
     +----------sw-1----------+
     |                        |
     |    +--------------+    |
     | p3 | p1        p1 | p3 | 
     +---sw-2           sw-3--+
          | p2        p2 | 
          +--------------+
how to config these three switches to simulate backup link for a local segment?

Re: RSTP's port role error?

Posted: 05 Feb 2025 07:30
by Cristek
OK then, your last topology has 4 segments and not 3. You have 2 cables between sw2 and sw3, and that makes it 2 segments, not 1.

There are a few good videos on youtube that you can elaborate on the ins-and-outs of STP.
And if you feel like reading, the Network Configuration Guide has a whole section on STP (chapter 6 - or page 145) :)

Re: RSTP's port role error?

Posted: 05 Feb 2025 09:00
by zlinuxboy
Cristek wrote: 05 Feb 2025 07:30 OK then, your last topology has 4 segments and not 3. You have 2 cables between sw2 and sw3, and that makes it 2 segments, not 1.

There are a few good videos on youtube that you can elaborate on the ins-and-outs of STP.
And if you feel like reading, the Network Configuration Guide has a whole section on STP (chapter 6 - or page 145) :)
Well, you statement remind me a picture from huawei. see attachment.

here is the explanation:
A backup port backs up a designated port and provides a backup path from the root bridge to the related network segment. It is blocked after learning the configuration BPDUs sent by itself.

On the network shown in Figure 5-2, CP 2 on DeviceC is the root port, and CP 1 is the alternate port. If CP 2 fails, CP 1 becomes the root port. On DeviceB, BP 1 is the designated port and BP 2 is the backup port. If BP 1 fails, BP 2 becomes the designated port.
Is that mean deviceB and deviceC are connect to a hub, that is the requirement to build a backup port?

Re: RSTP's port role error?

Posted: 05 Feb 2025 11:14
by silvio
Is that mean deviceB and deviceC are connect to a hub, that is the requirement to build a backup port?
Yes, that is the way how I understand backup port. So in real networks you will (hopefull) never seen it :-)
BR Silvio