Options

STP BPDU Hellos

daveba123daveba123 Users Awaiting Email Confirmation Posts: 7 ■□□□□□□□□□
In my ICND2 study book I quote:

1. The root creates and sends a Hello BPDU, with a cost of 0, out all its working interfaces (those in Forwarding State).
2. The nonroot switches receive the Hello on their root ports. After changing the Hello to list their own bridge ID as the
sender's BID, and listing that switch's root cost, the switch forwards the Hello out all designated ports
3. Steps 1 and 2 repeat until something changes.

The reason I'm confused is because in step 1, root switch BPDUs are said to be advertised at a cost of 0. Wouldn't the root switch instead want to advertise its cost according to its own interface link speeds? For example, if SW1 (root) were connected with redundant cables to SW2, wouldn't SW2 factor in the speed of SW1's interfaces?

To expand on this in step 2 it describes the nonroot switch that is forwarding the root switch's Hello as updating the Hello to list its own root cost. Where does this root cost come from? Is this root cost custom per port that the nonroot switch forwards the Hello out of, or am I misunderstanding this?

Is my interpretation correct in that the nonroot port updates the root cost separately per interface it forwards the Hello from? For example would a nonroot port update the root cost to be higher when sent out of a 100Mbps port than when it sends it from a 1Gbps port?



I'm sorry if this is too basic, but my research isn't coming up with anything that I can apply to this scenario and I really appreciate any input.

Thanks,
David

Comments

  • Options
    draughtdraught Member Posts: 229 ■■■■□□□□□□
    The cost comes from something the IEEE made up. Those are your per link costs below. Note the word its when cost is mentioned. I think the 0 cost for the root is what is confusing you. That only applies to the root switch's own ports, otherwise the costs are below.

    Instead of root cost. Call it the STP cost between this switch and the current root.

    10 Gbps = 2
    1 Gbps = 4
    100 Mbps = 19
    10 Mbps = 100
  • Options
    daveba123daveba123 Users Awaiting Email Confirmation Posts: 7 ■□□□□□□□□□
    Thanks, draught. So, the Root Switch really does ignore the speeds of its own ports. Very interesting.
  • Options
    iamme4evaiamme4eva Member Posts: 272
    Think of the cost as the cost to reach the root.

    The cost of the root to reach the root is.....0.....as it IS the root.

    So S1 (root) will send a BPDU to S2 saying "Hey, it costs me 0 to reach the root!". S2 will then examine the interface that the BPDU came in on and look at the cost associated with the link, add that to 0 and there's the new cost. So if it's 100 Mb (and the port cost hasn't been manually configured), then it will add 19 to 0, and advertise to SW3 (and out of all of it's other ports) "Hey, it costs me 19 to reach the root!".

    The switch that sends the BPDU only judges IT'S cost to reach the root - it's not worried about what's downstream, they can sort their own lives out! icon_smile.gif
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
  • Options
    gadav478gadav478 Member Posts: 374 ■■■□□□□□□□
    iamme4eva wrote: »
    Think of the cost as the cost to reach the root.
    So S1 (root) will send a BPDU to S2 saying "Hey, it costs me 0 to reach the root!". S2 will then examine the interface that the BPDU came in on and look at the cost associated with the link, add that to 0 and there's the new cost. So if it's 100 Mb (and the port cost hasn't been manually configured), then it will add 19 to 0, and advertise to SW3 (and out of all of it's other ports) "Hey, it costs me 19 to reach the root!".

    So it's more like an advertisement... saying "Hi I can get you to the root for a cost of 19". Good thread for clarity.
    Goals for 2015: CCNP
  • Options
    MrXpertMrXpert Member Posts: 586 ■■■□□□□□□□
    daveba123 wrote: »
    In my ICND2 study book I quote:
    1. The root creates and sends a Hello BPDU, with a cost of 0, out all its working interfaces (those in Forwarding State).
    2. The nonroot switches receive the Hello on their root ports. After changing the Hello to list their own bridge ID as the
    sender's BID, and listing that switch's root cost, the switch forwards the Hello out all designated ports
    3. Steps 1 and 2 repeat until something changes.

    The reason I'm confused is because in step 1, root switch BPDUs are said to be advertised at a cost of 0. Wouldn't the root switch instead want to advertise its cost according to its own interface link speeds? For example, if SW1 (root) were connected with redundant cables to SW2, wouldn't SW2 factor in the speed of SW1's interfaces?

    To expand on this in step 2 it describes the nonroot switch that is forwarding the root switch's Hello as updating the Hello to list its own root cost. Where does this root cost come from? Is this root cost custom per port that the nonroot switch forwards the Hello out of, or am I misunderstanding this?

    Is my interpretation correct in that the nonroot port updates the root cost separately per interface it forwards the Hello from? For example would a nonroot port update the root cost to be higher when sent out of a 100Mbps port than when it sends it from a 1Gbps port?



    I'm sorry if this is too basic, but my research isn't coming up with anything that I can apply to this scenario and I really appreciate any input.

    Thanks,
    David

    I am a bit rusty on this but this is my input for what its worth.
    When the Root bridge originates BPDUS, it will do so by sending them out its Designated ports with a "path cost of 0". The path cost refers to the cost on the receiving interface. It is zero because it is the root bridge and costs are only added when they are received not sent.This is why it is zero when sent by the top dog root bridge. The cost values are only added cumalatively when the BPDU is received and not sent. So any connected non root bridges will receive the BPDU and then add their path cost to it. For example SW1 is connected to SW2 and SW3 using fast ethernet links. SW1 has been elected the root bridge. In order for non roots to calculate their best "root path cost" (total cost) to reach the root bridge they must look at which of their ports has the lowest root path cost. Root bridge sends hello to SW2 with path cost=0. SW2 receives it on its Fa0/1 port and adds a path cost value of 19 to it. RPC=19 on fa0/1. Meanwhile SW3 receives BPDU from SW1 with cost of 0. It adds 19 to its fa0/1 and then forwards this BPDU onto SW2. SW2 receives it on its fa0/2 which is connected to SW3 and adds 19 to it. RPC on fa0/2 is now 38. SW2 compares the RPCs on its fa0/1 and fa0/2 ports and finds fa0/1 is lower and therefore better so it makes this port the root port. Meanwhile SW2 forwards on the BPDU out its fa0/2 port to SW3. When this BPDU is sent by SW2 to SW3 it has a root path cost of 19. SW3 receives it and adds 19 to it making it 38. SW3 sees this is higher cost than its fa0/1 and so fa0/1 will be the root port.
    The thing to remember is that costs are incremented on the receiving port.

    You mention what would happen if SW1 was connected with 2 redundant connections to SW2? Assuming SW1 is the root bridge here then it would still send out BPDUs out its FWD ports with a path cost=0. SW2 will receive it and add its path cost to this. If both have cost of 19 to reach the root then the decider is which ever port has lowest port priority becomes the root port. For example SW2 has two ports fa0/1 and fa0/2 connected to Root Bridge. Both these ports have RPC=19. fa0/1 has port priority=128.01 an fa0/2 has port-priority=128.02. 128.01 is lower and therefore preferred. You can of course change priority values to alter which port becomes the root port but this must be done on the Root bridge as opposed to non root. This is just said as an aside.

    When you configure STP, examine cmds like show spanning-tree root, show spanning-tree int fa0/1 detail, show spanning-tree. From memory (anyone correct me if i misremembered) but i believe show spanning-tree root displays root path cost whereas show spanning-tree displays just the path cost.
    I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
Sign In or Register to comment.