spanning-tree: port is blocking/forwarding with different cost

Hi,

I have a strange comportment. I have made 2 tests with different value of the cost port :

This is my lab:

Sw1-(fa0/1)---------------(fa0/1)-Sw2

(fa0/3)                                  (fa0/5)

 

 |                                               |                                 

 |                                               |

 |                                               |

(fa0/3)                                  (fa0/5)                                          

Sw4-(fa0/1)---------------(fa0/1)-Sw3

 

When I change the cost of SW2 fa0/1 to39, the blocking port is fa0/5:

SW2#show spanning-tree

Interface        Port ID                     Designated                Port ID
Name             Prio.Nbr      Cost Sts      Cost Bridge ID            Prio.Nbr
---------------- -------- --------- --- --------- -------------------- --------
Fa0/1            128.1           39 FWD         0  4196 000a.8a9b.6680 128.1  
Fa0/5            128.5           19 BLK        38 32769 000a.8aa7.7380 128.5

 

and when I change the cost of SW2 fa0/1 to 1000 , the blocking port is fa0/1:

SW2#show spanning-tree

Interface        Port ID                     Designated                Port ID
Name             Prio.Nbr      Cost Sts      Cost Bridge ID            Prio.Nbr
---------------- -------- --------- --- --------- -------------------- --------
Fa0/1            128.1         1000 BLK         0  4196 000a.8a9b.6680 128.1  
Fa0/5            128.5           19 FWD        38 32769 000a.8aa7.7380 128.5

 

Do you know why the Sw2 fa0/5 change his state while the path cost is higher than 39 ?

 

 

Comments

  • The path cost is the sum of the port cost and the designated cost (the cost advertised by the neighbor). In the first case we see that:

    F0/1 path cost is 39 + 0 = 39

    F0/5 path cost is 19 + 38 = 57

    so F0/1 is chosen as the root port and goes into forwarding state

    In the second case we see that:

    F0/1 path cost is 1000 + 0 = 1000

    F0/5 path cost is 19 + 38 - 57

    so F0/5 is chosen as the root port and goes into forwarding state.

     

    Hope this helps

     

    Dave

  • All you see in that show command is your local viewpoint of the port cost, not the cumulative cost (which is what's compared).

    So apparantly, the cumulative cost for the other path is more than 39.  :)

    HTH,

    Scott







    ----- Original Message -----
    From: "Nabs" <[email protected]>
    Sent: Wed, June 17, 2009 8:06
    Subject: [CCIE R&S] spanning-tree: port is blocking/forwarding with different cost


    Hi,

    I have a strange comportment. I have made 2 tests with different value of the cost port :

    This is my lab:

    Sw1-(fa0/1)---------------(fa0/1)-Sw2

    (fa0/3)                                  (fa0/5)

     

     |                                               |                                 

     |                                               |

     |                                               |

    (fa0/3)                                  (fa0/5)                                          

    Sw4-(fa0/1)---------------(fa0/1)-Sw3

     

    When I change the cost of SW2 fa0/1 to39, the blocking port is fa0/5:

    SW2#show spanning-tree

    Interface        Port ID                     Designated                Port ID
    Name             Prio.Nbr      Cost Sts      Cost Bridge ID            Prio.Nbr
    ---------------- -------- --------- --- --------- -------------------- --------
    Fa0/1            128.1           39 FWD         0  4196 000a.8a9b.6680 128.1  
    Fa0/5            128.5           19 BLK        38 32769 000a.8aa7.7380 128.5

     

    and when I change the cost of SW2 fa0/1 to 1000 , the blocking port is fa0/1:

    SW2#show spanning-tree

    Interface        Port ID                     Designated                Port ID
    Name             Prio.Nbr      Cost Sts      Cost Bridge ID            Prio.Nbr
    ---------------- -------- --------- --- --------- -------------------- --------
    Fa0/1            128.1         1000 BLK         0  4196 000a.8a9b.6680 128.1  
    Fa0/5            128.5           19 FWD        38 32769 000a.8aa7.7380 128.5

     

    Do you know why the Sw2 fa0/5 change his state while the path cost is higher than 39 ?

     

     



    --
    View this message online at: http://ieoc.com/forums/p/6848/24201.aspx#24201
    --
    Internetwork Expert - The Industry Leader in CCIE Preparation

    http://www.internetworkexpert.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx
    <!>

  • Hi,

    I think I have understand how to calculate the root path cost. So if I put a cost of 39 to the Sw2 fa0/1, the root path cost is:

    Sw1 fa0/1=0 and Sw1 fa0/3=0;

    Sw2 fa0/1=0+39=39 and Sw2 fa0/5=38+19=57;

    Sw3 fa0/5=39+19=58 and Sw3 fa0/1=19+19=38;

    Sw4 fa0/1=39+19+19=77 and Sw4 fa0/3=0+19=0;

    The Sw4 fa0/1 root path cost is bigger than the Sw2 fa0/5 root path cost. So Why it blockes the Sw2 fa0/5 and not the Sw4 fa0/1 ?

     

    Thank you very much for your help.

    Regards

    Nabs






  • Hi Dave, Hi Scott


    I think I have understand how to calculate the root path cost. So if I put a cost of 39 to the Sw2 fa0/1, the root path cost is:

    Sw1 fa0/1=0 and Sw1 fa0/3=0;

    Sw2 fa0/1=0+39=39 and Sw2 fa0/5=38+19=57;

    Sw3 fa0/5=39+19=58 and Sw3 fa0/1=19+19=38;

    Sw4 fa0/1=39+19+19=77 and Sw4 fa0/3=0+19=0;

    The Sw4 fa0/1 root path cost is bigger than the Sw2 fa0/5 root path cost. So Why it blockes the Sw2 fa0/5 and not the Sw4 fa0/1 ?




    Thank you very much for your help.

    Regards

    Nabs



    Internetwork Expert - The Industry Leader in CCIE Preparation

    http://www.internetworkexpert.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx


    Discutez sur Messenger où que vous soyez ! Mettez Messenger sur votre mobile !
  • The decisions are made on a per device or per link basis. The costs are as you describe, but the decisions are as follows:

    SW1 - root

    Link SW1-SW2 cost of 0 from SW1 or 39 from SW2, so SW1 is designated port

    Link SW1-SW4 cost of 0 from SW1 or 19 from SW4, so SW1 is designated port

    SW2 has cost of 39 towards SW1 and 57 towards SW3, so f0/1 is root port

    SW4 has cost of 19 towards SW1 and 77 towards SW3, so f0/3 is root port

    Link SW2-SW3 cost of 39 from SW2 or 38 from SW3, so SW3 is designated port

    Link SW4-SW3 cost of 19 from SW4 or 58 from SW3, so SW4 is designated port

    SW3 has cost of 58 towards SW2 and 38 towards SW4, so f0/1 is root port.

     

    This leaves every port as either a root port or a designated port except SW2 f0/5, which must then block.

    Hope this helps

     

    Dave

  • Hi Dave,

    Thank you very much for your help. I have found that the choice of the DP is by comparing the bpdu cost between switches on the same segment ; This what you said.

    Thank you a lot for your high availability.

Sign In or Register to comment.