How Spanning Tree Protocol Prevents Loops

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 84

  • @aminrz
    @aminrz 10 ปีที่แล้ว

    After many hours search about spanning tree this video made it completely clear to me. Thanks a lot for this great video.

  • @JohnDoe-ih2rt
    @JohnDoe-ih2rt 9 ปีที่แล้ว

    Thank you so much for the video... this did a way better job of explaining STP and Bridge Loops than any other video I've seen.

  • @quentincollier9387
    @quentincollier9387 6 ปีที่แล้ว +1

    Very good clarification of STP. I needed to hear and see how it works. GOT IT!

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    Thanks Ryan. I figured you didn't know..but I was kinda thinking out loud for the forum and myself.
    After research apparently the BPDU packets determine the best path to the root and shut of the listening of the other interfaces:
    Lowest root bridge ID -
    Lowest cost to the root bridge -
    Lowest sender bridge ID - Serves as a tie breaker if multiple
    Lowest sender port ID - Serves as a tie breaker if a switch has multiple (non-Etherchannel) links to a single upstream switch

  • @peterkapas858
    @peterkapas858 10 ปีที่แล้ว +3

    Awesome, This cleared up the whole concept for me. Thank you sir!

  • @rotellam
    @rotellam 8 ปีที่แล้ว

    Great video to describe how the loops are prevented. Books never really go over this side of things.

  • @wanderer-1986
    @wanderer-1986 8 ปีที่แล้ว

    Nice video thanks for the upload. I also have to draw out the networks and how protocols work in order to get a better understanding. Well done.

  • @mftagg
    @mftagg 5 ปีที่แล้ว

    Very informative. Straight to the point and instructive. Thanks for sharing.

  • @air8379
    @air8379 11 ปีที่แล้ว +2

    This was SO helpful, thank you so much for the simple and easy to understand explanation!! :)

  • @hezekiahomulo4097
    @hezekiahomulo4097 8 ปีที่แล้ว

    simple and easy to understand. Good job Sir..

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    There are ways to manually tweek which ports arelistening or blocking, but it is not recommended to mess with them, unless you really know what you are doing. STP usually works pretty well automatically, on its own.

  • @bat111A11
    @bat111A11 7 ปีที่แล้ว

    Beautifully explained. Thank you very much

  • @JoaquimMucageTontacastro
    @JoaquimMucageTontacastro 8 ปีที่แล้ว

    Ryan Knebel thanks a lot, I hope more videos from you, and you've got my respect

  • @MrSimospirit
    @MrSimospirit 8 ปีที่แล้ว

    amazing explanation, i was pretty confuse about STP. thanks man

  • @jairusan
    @jairusan 9 ปีที่แล้ว

    From the general perspective great explanation. Will be great to go with the emulated lab version representation of it, If I get to make the video I will credit your video and link this as well. Excellent work.

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว +1

    Yes, the priority is something you might want to change. One of the silly side effects of the way that priority is chosen is that since STP elects the lowest mac address, it almost always picks the oldest switch in your network. The manufacturers tend to increment the mac addresses over the years, so the lower the mac address, the older the switch.

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    STP has it's problems and one of them is scalability like you asked about. It will still work when you have a very large network, like in the hundreds of switches, but all the traffic going through a single switch can cause a bottleneck. On those very large networks, administrators will often disable STP and use a protocol like TRILL (Transparent interconnection of Lots of Links) or SPB (Shortest Path Bridging).

  • @coolshailendra2805
    @coolshailendra2805 7 ปีที่แล้ว

    quite simple and informative. Good way of representation , it helped.

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    Default is mid range
    The extend system-id the STP BPDU has to reuse 4 bits from the original 16 bits used to denote the Switches Priority. Therefore, 2 to the 4 equals 16, so 16 increments from 0-61440, with 32,768 chosen as the mid-range value.
    16 increments of 4096 start at 0---4096---8192---12288---16384---20480---24576---28672---32768---etc.
    STP BID Fields: 4 bits Priority --- 12 bits Vlan ID or Extended System ID ---48 bit MAC address from Backplane or Supervisor dependent on chassis.

  • @server2k3
    @server2k3 11 ปีที่แล้ว

    Every port on Non-Root Switch connected to host is set to Designated Forwarding(DF)
    The Link that is causing the loop between the non-Root Switches, is set to Blocking or Designated port. The method it uses again is the Bridge Priority or Mac address. The Non Root Switch with Lower priority is set to Designated and the other Peer Non Root switch sets it to blocking.

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    You don't need two connections to each switch. STP is generally on by default no matter how many cables there are. I only put in two cables between each switch to show redundancy and to show that it still works at that level of complexity.

  • @jkmorbo
    @jkmorbo 10 ปีที่แล้ว

    Great tutorial. This helps a whole lot. Thanks!

  • @binaryvip
    @binaryvip 10 ปีที่แล้ว

    Thanks man - Great Video -- Nicely Put Together

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    Yes. I have heard the same, although changing the STP default number to anything lower than the others which are at 32768 (default) would automatically make it the root, as I understand. So, other than making one switch the root on purpose, I don't see another reason to mess with them either.

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    BPDU's will determine:
    1. Least cost path from each bridge.
    2. Least cost path from each network segment.
    then
    3. Disable all other root paths. Any active port that is not a root port or a designated port is a blocked port (BP).
    So, all the root paths are determined by cost then the other paths stop listening (unless the main interface goes down..in which case they may listen again)
    /wiki/Spanning_Tree_Protocol

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    ALS-1 doesn't need to close down the other ports because the switches on the other ends of those ports aren't listening. I think one of the ideas is to close out as little traffic as possible, just in case. The thing that I found out when I did this video is that every part of the network still gets the broadcast. When ALS-1 sent it's traffic out to ALS-2, ALS-2 just ignores it, but after the broadcast is done, you will notice that every cable is highlighted.

  • @RyanKnebel
    @RyanKnebel  12 ปีที่แล้ว

    STP isn't usually implemented on the routers. Since a router is meant to forward data between different networks, each of its interfaces is attached to a different network. So broadcasts that hit a router stop there.
    A switch, on the other hand, is responsible for moving data about in the same network so here is where there is a danger of loops. So STP is implemented in every switch. This is probably already done by default.

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    I've never seen a business class switch that doesn't support STP, but I guess it's possible that there are some that don't. As far as which interfaces are listening, it is determied by the network topology. All the switches will hold an "election" to determine which switch is the "Root switch". Then, all the other switches in the network figure out the quickest way to send traffic to that root switch and that path determines which ports are listening or blocked.

  • @tillifindu
    @tillifindu 11 ปีที่แล้ว

    Thanks for a superb video.

  • @CIPHERJAY
    @CIPHERJAY 12 ปีที่แล้ว

    @Ryan Knebel Where is the STP implemented? In everyones router?

  • @coachemilythetriumphant3883
    @coachemilythetriumphant3883 7 ปีที่แล้ว

    Thank you. This is very helpful.

  • @CIPHERJAY
    @CIPHERJAY 12 ปีที่แล้ว

    Thanks for the reply. I am confused by what a switch is though.Could you explain what a switch is and if it is physical or not?

  • @jianhuang7888
    @jianhuang7888 5 ปีที่แล้ว

    very nice tutorial, thank you very much

  • @rawbyte
    @rawbyte 11 ปีที่แล้ว

    Hi! At around 2:00, where each switch decides to "close off" ports, why does ALS-1 do not "close off" it's links to DLS-2 and it's links to ALS-2. Should it not be closing off all other ports than the one it chooses to talk to DSL-1? Thanks for this video, it helped me alot!

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    So effectively, spanning tree makes sure that each switch gets a broadcast announcement ( I'm looking for IP x.x.x.x ), once. And in order for it to work, each switch must have two connections to each of the other switches that are in that subnet. But, is that feasible for a subnet of a couple thousand IP's that also has like 20 switches? Isn't that a crazy amount of cabling? What am I missing here?

  • @RikzB
    @RikzB 4 ปีที่แล้ว

    i know it’s kind of very late but how the switches send a reply back as i cannot see any path left to send a reply in the topology ?

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    Also, I get how the root switch listens and speaks on all interfaces, but how does each of the other switchs determine how many interfaces listen or speak. I mean ALS-1 only has a single non listening interface, while AS-2 has 5 non listening interfaces. What determines that aspect?

  • @joeldiaz853
    @joeldiaz853 7 ปีที่แล้ว

    Great Video, must all switches have STP?

  • @RyanKnebel
    @RyanKnebel  11 ปีที่แล้ว

    The switches use an algorithm that, to be completely honest, I don't really understand. But I tested some switches in my home lab, and these are the exact ports that my switches blocked or listened on.

  • @lucreciatex
    @lucreciatex 7 ปีที่แล้ว

    Great explanation. Thanks

  • @mikeybinsd
    @mikeybinsd 10 ปีที่แล้ว +2

    Just a comment. When a port is in blocking state, it DOES accept BPDUs.. The only time it doesn't listen sis when it's disabled

    • @mikeybinsd
      @mikeybinsd 10 ปีที่แล้ว +3

      Well, your video seemed to insinuate that blocking ports do not listen, which is not true--thus my repsonse
      Thanks

    • @joebaillie29
      @joebaillie29 9 ปีที่แล้ว

      +Mike Barrett
      I know this is a year down the line so anyone feel free to chip in. So the switch the PC is connected to sends out the BPDUs to the other switches (via the connections that aren't redundant). Those switches receive the BPDUs and do the same, the links are up and ports aren't blocked as such but the switches just don't use the redundant connections?
      It makes sense in my head. I think.
      I couldn't understand how in example 1 als-1 and dls-2 decided who was doing the "blocking" but this makes more sense.

  • @detyu7521
    @detyu7521 9 ปีที่แล้ว

    Genius! The missing ingredient to most STP explanations.

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    Oh wow. This is really helpful info.

  • @californiasportfishing
    @californiasportfishing 7 ปีที่แล้ว +1

    Wow this vid was posted 5 yrs ago. Anyway, when you say it's still up but in blocking state....what STP command did you use on the ports?

  • @RyanKnebel
    @RyanKnebel  12 ปีที่แล้ว

    So a switch is a physical box that has a bunch of ethernet ports on it. It allows multiple PCs to be connected to each other on the same network. All the ethernet jacks in an office are connected to a switch and the switch is connected to a router. If you would like to see a picture, do an image google search for "cisco 2960".

  • @djbneozen
    @djbneozen 11 ปีที่แล้ว

    How does each switch determine which interfaces are "not listening"? Are they manually configured to do so? I mean, is a config set to use one interface for "spanning tree" and then all the others automatically shut down? Is there a client command verse the root command? Do all of the images in the switches have to support spanning tree to get the info from the root device?

  • @Riververchi
    @Riververchi 8 ปีที่แล้ว

    Very very good, thank you so much!!!

  • @uniquevoid
    @uniquevoid 10 ปีที่แล้ว

    Great video man, I have a question.. how's the root elected? I've read that they have an ID and the lower gets it but I don't understand

    • @pummyy
      @pummyy 10 ปีที่แล้ว

      When you connect all the switches the first time, they would all have same priority by default. The switch with the lowest MAC address would be selected as a root in that case. But should you been keen on making a specific switch as Root, you can always give it a higher priority which will override the MAC election.

    • @sonofgod031
      @sonofgod031 9 ปีที่แล้ว +2

      +tincho from what i've read, the switch with the lowest priority number will be elected as the Root Bridge, priority number is configurable.. but if the priority is not configured yet, the switch with the lowest numerical MAC address will be the RB (Sw A MAC Addr 11:11 is lower than Sw B MAC Addr 22:33, therefore Sw A is the RB).
      www.dummies.com/how-to/content/spanning-tree-protocol-stp-introduction.html

    • @mandalepowell4699
      @mandalepowell4699 9 ปีที่แล้ว

      the one with the lowest mac address gets elected by default if config has not been taken place bro

  • @tech_excellence
    @tech_excellence 11 ปีที่แล้ว

    I like your video ! thanks man !

  • @BIZURASARUMA
    @BIZURASARUMA 9 ปีที่แล้ว

    Greatly explained.

  • @romesan2011
    @romesan2011 8 ปีที่แล้ว

    Excellent -Thank You !!

  • @kellyjaeferguson3514
    @kellyjaeferguson3514 9 ปีที่แล้ว

    Thanks much....great video

  • @ramcastro
    @ramcastro 11 ปีที่แล้ว

    Great job.

  • @jackiechan6460
    @jackiechan6460 8 ปีที่แล้ว

    So, this decides it. Gonna start studying networking. It's a fatal flaw that I don't know much so I can't offer more complex network solutions, just basic ones.

  • @eric_bo
    @eric_bo 7 ปีที่แล้ว

    Quite clear. Thank you ;-)

  • @srikanthgowdru1644
    @srikanthgowdru1644 8 ปีที่แล้ว

    on what base root switch is selected??

    • @borntoace7819
      @borntoace7819 8 ปีที่แล้ว

      Brigde Priority normally they're all default unless configured and then Lowest Mac-address

    • @richardmireles6318
      @richardmireles6318 7 ปีที่แล้ว

      Srikanth gowda

    • @richardmireles6318
      @richardmireles6318 7 ปีที่แล้ว

      It will follow als-1 to the Chicago port trunk

  • @rebrasi
    @rebrasi 8 ปีที่แล้ว

    Great video

  • @IamCoolAngel
    @IamCoolAngel 10 ปีที่แล้ว +1

    Great video thank you :)

  • @zanzishion1465
    @zanzishion1465 9 ปีที่แล้ว

    Try RSTP. Rapid Spanning Tree- which pretty much an enhancement and a more advanced SPT.:)

  • @jj7688
    @jj7688 7 ปีที่แล้ว

    Great Video.. Thank you..

  • @killermaticz002
    @killermaticz002 12 ปีที่แล้ว

    thanks I understand it now

  • @never152
    @never152 9 ปีที่แล้ว

    Thank you!!

  • @wiredcelery2096
    @wiredcelery2096 7 ปีที่แล้ว

    Good video

  • @ericstrong1731
    @ericstrong1731 8 ปีที่แล้ว

    great vid cheers

  • @romancemusicm
    @romancemusicm 8 ปีที่แล้ว

    thank you sir

  • @MohitYadav-xs5nm
    @MohitYadav-xs5nm 10 ปีที่แล้ว +3

    it will be more expressive, if you explain along with the port states.....

  • @arielriber7180
    @arielriber7180 6 ปีที่แล้ว

    thanks, man .
    BTW you can easily do voice for westren movies !!!!! cool voice

  • @TisMeCraigT
    @TisMeCraigT 10 ปีที่แล้ว

    Thanks

  • @seosamhohaodha3040
    @seosamhohaodha3040 6 ปีที่แล้ว

    I subscribed to your channel after watching your video on stp,,could you please please post lots and lots more ccna type videos,

  • @عبدالرحمنكمال-ظ9ك
    @عبدالرحمنكمال-ظ9ك 9 ปีที่แล้ว

    great ... thannnnk

  • @Mike_Jones281
    @Mike_Jones281 9 ปีที่แล้ว

    Nice

  • @CIPHERJAY
    @CIPHERJAY 12 ปีที่แล้ว

    @RyanKnebel

  • @mrwakawakasa
    @mrwakawakasa 10 ปีที่แล้ว

    wow
    cool
    THNKS
    bro u rock (Y) :)