STP question....

ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
here is a topology i created in packet tracer. i have some questions about how stp works. all switches are using default settings.


switch 1 (root)
  • since priorities tie, root goes to the lowest MAC ID.
  • all ports forwarding (root ports)
switch 2
  • FA0/2 is forwarding (root port)
  • FA0/1 - WHY IS IT FORWARDING?....it should be in a blocking state because it has a higher MAC ID than Switch3 (refer to diagram)...?
switch 3
  • FA0/2 - WHY IS IT BLOCKING?....shouldnt it be forwarding because it has a lower MAC ID than Switch2...?
  • FA0/1 - WHY IS IT FORWARDING?...shouldnt it be blocking state because it has a higher MAC ID than Switch4..?
switch 4
  • FA0/1 - forwarding (root port)
  • FA0/2 - forwarding (designated port)


can anyone explain this to me. thanks.
stp.png 14.1K

Comments

  • vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    Think of it this way...you've created a 4 point loop...all STP is designed to do is prevent loops. How many links need to be blocked in this network to prevent a loop from forming.

    Lowest Bridge ID (MAC + STP Priority - default 32768 ) wins so if no other changes are made, which switch has the lowest mac? which is the next best switch? STP will keep going until it finds the lowest priority switch and that's where it will determine which port to block to prevent a loop.

    Also bear in mind that Spanning tree works link by link to build a network topology. Each end of the link "competes" with the other end to see which has a higher priority and if it is a path back to the root bridge.

    This is the order a port will go through when it receives a BPDU from another switch to determine what role to play in spanning-tree

    Lowest root bridge ID
    Lowest root path cost
    Lowest sender bridge ID
    Lowest port ID

    Check out these sources and use them for STP and RSTP

    http://lockienotlucky.wordpress.com/category/ccnp-switch/page/3/
    http://www.cisco.com/en/US/tech/tk389/tk621/technologies_white_paper09186a0080094cfa.shtml
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
    vinbuck wrote: »
    Think of it this way...you've created a 4 point loop...all STP is designed to do is prevent loops. How many links need to be blocked in this network to prevent a loop from forming.

    Lowest Bridge ID (MAC + STP Priority - default 32768 ) wins so if no other changes are made, which switch has the lowest mac? which is the next best switch? STP will keep going until it finds the lowest priority switch and that's where it will determine which port to block to prevent a loop.

    Also bear in mind that Spanning tree works link by link to build a network topology. Each end of the link "competes" with the other end to see which has a higher priority and if it is a path back to the root bridge.

    This is the order a port will go through when it receives a BPDU from another switch to determine what role to play in spanning-tree

    Lowest root bridge ID
    Lowest root path cost
    Lowest sender bridge ID
    Lowest port ID

    Check out these sources and use them for STP and RSTP

    CCNP | SWITCH « each connection makes us stronger
    Understanding Rapid Spanning Tree Protocol (802.1w)  [Spanning Tree Protocol] - Cisco Systems

    thanks...i understand STP concept and and how it works but can you explain to me the ports that i bolded as to WHY they are in that port state. like...
    FA0/1 - WHY IS IT FORWARDING?....it should be in a blocking state because it has a higher MAC ID than Switch3?

    and the others as well...thanks
  • vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    Hate to break it to ya, but if you don't understand why Fa0/1 on Switch 2 is forwarding then you're not understanding the concept of Spanning Tree, at least not fully yet icon_wink.gif

    Blocking has nothing to do with MAC addresses, at least not directly - Bridge ID plus the four steps a port goes through during the election process are what determines whether a port is Forwarding or Blocking.
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
    vinbuck wrote: »
    Hate to break it to ya, but if you don't understand why Fa0/1 on Switch 2 is forwarding then you're not understanding the concept of Spanning Tree, at least not fully yet icon_wink.gif

    Blocking has nothing to do with MAC addresses, at least not directly - Bridge ID plus the four steps a port goes through during the election process are what determines whether a port is Forwarding or Blocking.

    its because switch 2 is advertising a lower cost to the root on the lan segment.?
  • vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    Not gonna give up the answer yet, but I will help get you there, because you will learn more about STP... icon_smile.gif

    If you think it's due to cost then do a show spanning-tree on packet tracer and calculate the cost over each path from Switch3 to the root bridge.
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
    vinbuck wrote: »
    Not gonna give up the answer, but I will help get you there, because you will learn more about STP... icon_smile.gif

    If you think it's due to cost then do a show spanning-tree on packet tracer and calculate the cost over each path from Switch3 to the root bridge.

    CHOOSING DESIGNATED PORT (straight from my notes)
    • DP on each LAN segment is switch port that advertises the lowest-cost Hello onto a LAN segment. When nonroot switch forwards a Hello, the nonroot switch sets the cost field in the Hello to that switch’s cost to reach the root.
    As a result, switch with the lower cost to reach the root, among all switches connected to a segment, becomes the DP on that segment.
    • If cost is equal then port switch with lower MAC ID becomes DP.
    =====================================================================================
    switch 2 fa0/2 has a cost of 19 to the root and will advertise that on the lan segment between switch2-switch3.
    switch 3 fa0/1 has a cost of 38 to the root and will advertise that on the lan segment between switch2-switch3.

    as a result switch2 fa0/2 is the DP....correct?
  • vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    It depends on the port cost assignment...paste the show spanning-tree from packet tracer into the thread so we can get a better idea. Switches do not exchange MAC addresses in a spanning tree BPDU, they exchange Bridge IDs which is Priority+MAC and whichever is lower wins...it may seem like splitting hairs when everything is in a default state, but once priorities get changed on all switches, then the MAC address pretty much goes out the window as a tiebreaker.
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
    vinbuck wrote: »
    It depends on the port cost assignment...paste the show spanning-tree from packet tracer into the thread so we can get a better idea. Switches do not exchange MAC addresses in a spanning tree BPDU, they exchange Bridge IDs which is Priority+MAC and whichever is lower wins...it may seem like splitting hairs when everything is in a default state, but once priorities get changed on all switches, then the MAC address pretty much goes out the window as a tiebreaker.

    cost and priority values are default....i posted the bridge ID's in the diagram. and the priority is default 32768..thanks.
  • ricky8ricky8 Member Posts: 24 ■□□□□□□□□□
    any thoughts?....thanks.
  • m3zillam3zilla Member Posts: 172
    The decision between blocking and forwarding is based on the cost to the root. The priority will only be looked at if there's a tie on the cost. Switch2 cost to root is 19, switch 3 cost to root is 38.
  • kurosaki00kurosaki00 Member Posts: 973
    you need to understand how STP works a bit more
    Root is designated by either lowest ID or Manual designation

    STP determines the root ports by calculating the least path cost to root bridge
    Now the designated bridge, on each lan segment (this is on each lan segment, contrary of selecting root ports which is cumulative with the whole network) calculate through what switch it has the least cost, that port becomes a designated port

    All designated ports and root ports are forwarding ports, else = blocked

    Only the root bridge is assigned mainly with the bridge ID
    when designated ports as root or designated it uses more the cost and cumulative cost not the lowest ID.
    meh
Sign In or Register to comment.