Deciphering Spanning-Tree Technologies

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] you know I think that when I first started that there was you know I had a perception that I knew a lot about the basic the core protocols and now you know I realized I didn't when I first started and this is really filled in those gaps just getting in there labbing the stuff seeing the problems correcting the problems I've never seen anything out there like this and I've been to multiple Cisco courses for my CCMP CCNA but this you actually get to see the technology work so it kind of helps stick it in your brain our sessions are very interactive always available to answer any questions during the session or offline they give you gives you the right mentality you need to approach any problem or troubleshooter you know answer question on test it's helped me a lot you know even even stuff that's not even for the CCIE you know I had the all-access pass just a knowledge that you get for them you know not only like you know this is how you can figure it but they actually show you in the video this is how it works and that's what you need you can't just read a document like well this is a configuration so hopefully it works because sometimes it doesn't work I wish that I'd start off with material just like this because I would have understood right off the bat what the theory is and what it's actually doing in the command line it's definitely more advanced I think it's explained in a better way better analogies I think it's tougher which is good you know I I took one that was earlier and it was it was easier you know what I mean so I gave me this this false confidence and so now you're getting into this stuff and you see like wow this is a little bit more advanced so you know I want to do is do some more of this stuff and now it's started I'm starting to feel way more comfortable feel the leaks buzz that I had I'm able to get it with those things and understand those things better it's easy to study for a test and just study exactly what you need to know but in this class we've gone kind of above and beyond and he showed us things that can actually apply in real world and some things that may not be applicable to the exam but are good things to know especially when troubleshoot and I definitely recommend it I've been recommending it just using the materials now going to the camp I'd recommend it all day long it's just it's a completely different learning experience [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] hello my name is Keith Bogart and I'm one of the instructors here at I&E and if you're watching this video it's most likely because you're considering attending our CCNA routing and switching bootcamp but you may have some questions about it and I'm here to hopefully answer those questions let's get started probably one of the most important questions is why should you attend ionise CCNA routing and switching bootcamp one of the best reasons I can give you his dedicated learning when you're doing your own self-study there's all kinds of things that can distract you as you well know but when you're sitting in our classroom in our bootcamp you'll have five to seven days of dedicated learning for these routing and switching technologies nothing will be available to distract you you'll be heads down and learning these protocols so what else is a benefit you'll also get instant answers to your questions once again when you're doing your self-study and you get confused or stuck where do you go to get an answer to your question more likely you're turning to some kind of online community or forum where you might have to wait hours or days to get answers to your questions and hopefully those answers are clear and not ambiguous when you're sitting in out one of our boot camps you have a knowledgeable instructor dedicated to you right there you can ask any question at any time as a matter of fact the instructor will encourage that to make sure that you're getting the most out of your boot camp experience another benefit of attending our boot camps is a instructor assisted laughs you know that as you're pursuing your CCNA certification you need to have hands-on lab time there's no better way to learn the Cisco IOS command-line and memorize the commands what you should expect be a various show and debugging output but if you're doing labs on your own where do you start what feature is important what features should you ignore when you're in one of our boot camps all those questions are answered for you the boot camp labs are structured to highlight the most relevant features and protocols that you're most likely to see when a achieving your CCNA certification exam also you'll have the instructor right there so if you get stuck during a lab that instructor can help walk you through it and answer any questions you might have and of course it goes without saying that sitting in a boot camp experience you'll have lots of interactivity not only will you be able to engage with the instructor you'll have other students around you who have varying degrees of networking experience who you can bounce ideas off of and who can give you some ideas as to how this stuff is used in the real world in their own networks so what can you expect by attending one of our food camps well certainly you can expect long days there is a reason why we call these boot camps the Cisco CCNA covers a lot of material and so in order to learn this stuff we're gonna have long grueling days so be prepared for that be prepared to be dedicated to this experience should you hopefully choose to go you'll have lectures and lab demonstrations the instructors not just gonna sit up there for eight or ten hours hitting you with one PowerPoint after the other in order to reinforce the material can have frequent whiteboarding frequent verbal explanations of how the stuff is used in the route of real-world and lab demonstrations so you can actually see how to configure monitor and troubleshoot this on real equipment you'll also have equipment of your own so if you choose to do so you can follow along with the instructors lab demonstrations and you'll have do-it-yourself labs but this is the type of lab or term I've coined that means once the instructor has taught you a particular topic that person might put some lab objectives up on a slide or bullet point real high level objectives configure this book all make it talk this way with this device and the idea is you have a certain amount of time to try to make it work on your own to see if you've actually learned the material and it can incorporate it into your own lab and then of course at the end of the time the instructor will go through that lab and show you how to complete it you can also expect verbal quizzing during the lab this is the one of many tools the instructor has to do testing for understanding the instructor will frequently ask individuals within the class questions pertaining to what has just been taught or maybe things that were taught hours or days before just to make sure that you're actually retaining the knowledge so what are some of our prerequisites to attend a CCNA boot camp this boot camp is not designed for someone who has no networking experience at all we do expect you will have done some self-study prior to attending this boot camp to get the most out of this experience the ideal candidate before attending our CCNA routing and switching boot camp will have spent a minimum of two to three months in their own self studies now in order to help guide you further if you go to streaming I&E comm our website and from there click on cisco CCENT you'll see that the very first topic is called operation of ip data networks that consists of about three hours of videos that fall under that general umbrella so ideally you would watch those three hours before attending our boot camp or get a similar level of knowledge via your own self studies of reading white papers or wherever you go to do your self studies so with that hopefully I've answered your questions I've whetted your appetite to attend to our boot camp and I will see you there [Music] [Music] [Music] [Music] [Music] [Music] [Music] you know I think that when I first started that there was you know I had a perception that I knew a lot about the basic the core protocols and now you know I realized I didn't when I first started and this is really filled in those gaps just getting in there labbing the stuff seeing the problems correcting the problems I've never seen anything out there like this and I've been to multiple Cisco courses for my CCMP CCNA but this you actually get to see the technology work so it kind of helps stick it in your brain our sessions are very interactive always available to answer any questions during the session or offline they give you gives you the right mentality you need to approach any problem or troubleshooter you know answer question on test it's helped me a lot you know even even stuff it's not even for the CCI you you know I had the all-access pass just a knowledge that you get for them you know not only like you know this is how you can figure it but they actually show you in the video this is how it works and that's what you need you can't just read a document like well this is a configuration so hopefully it works because sometimes it doesn't want I wish that I start off with material just like this because I would have understood right off the bat what the theory is and what it's actually doing in the command line it's definitely more advanced I think it's explained in a better way better analogies I think it's tougher which is good you know I took one that was earlier and it was it was easier you know what I mean so I've gave me this this false confidence and so now you're getting into this stuff and you see like wow this is a little bit more advanced so you know I want to do is do some more of this stuff and now it's starting I'm starting to feel way more comfortable field obliques buzz that I had I'm able to get over those things and understand those things better it's easy to study for a test and just study exactly what you need to know but in this class we've gone kind of above and beyond and he showed us things that can actually apply in real world and some things that may not be applicable to the exam but are good things to know especially when troubleshooting in AI I definitely recommend it I've been recommending it just using the materials now going to the camp I'd recommend it all day long it's just it's a completely different learning experience [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] you welcome everybody to our show today let me just make sure everything is going alright there we go I'm watching on YouTube just like you just to make sure just a little little bit of delay there so welcome to our show from I neon deciphering spanning tree topologies today and I'm Keith Bogart I'm one of the instructors here I specialize in the routing and switching CCNA and CCNP level videos and it's my pleasure and enjoyment to in our time together today to hopefully make you guys experts on figuring out how spanning tree creates a tree how it decides which ports are forwarding which ports are blocking and if something changes on a switch like an entire switch crashing or a new port coming up or going down how that affects things and how that changes the tree if at all so in the event that you have not seen any videos from you before let me just show you here here's my contact information so if I'm gonna do my best throughout this session to answer any questions that you post to youtube live in the event that i'm not able to get to your questions if there's just too many of them or something feel free to reach out to me there you see my email address and Twitter account and LinkedIn and through that you can reach out to me now let me just sorry I am recording today's show as well and there we go so let me just briefly sort of describe the the audience that I'm going to be speaking to for today's show because I realize that those of you who are watching come from lots of different backgrounds lots of different experience levels so the audience I'm really gonna be speaking to today are people who are primarily learning spanning-tree for the first time you know for the purposes of like getting their CCNA certification or maybe you got your CCU certification routing and switching a while ago now you're pursuing your ccnp and the exam you're going for right now is a CCMP switch exam which also expects you to thoroughly understand spanning tree and but maybe it's been a while since you did your CCNA and you forgot how spanning tree works so either way that's the core audience that I'll be speaking to today so now like I said there's a lot of people with different experience levels and and technical knowledge who are watching this so by all means submit whatever question you have during the YouTube live session today I just want you to be aware that if the question you submit is really out of the scope of this class for example if you start asking me something about multiple spanning trees or how rapid spanning tree is different than 802 dot 1d or asking me questions about uplink fast or backbone fast or stuff like that those are all really interesting questions and and definitely stuff you do need to know for various certification tests but our time is very limited a-and that is outside the scope of what I'm going to be covering so I would still encourage you to ask your questions and even though I might not have an opportunity to get to questions like that guys I'll be focusing more on questions that are within the scope of the class there's a very good chance if you ask whatever question you have somebody on the YouTube live feed will answer you so if you're watching and if you do see someone post a question and you think hey I have experience in that field or I know the answer to that feel free to pipe in and type in an answer to that person and help everybody out so I'm not the only one here we can all learn from each other's experience in today's class so with that let's go ahead and get started here and I'm gonna be doing today's class in a variety of ways first of all I'm gonna be making extense use extensive use of white boarding so I'm actually using Cisco's WebEx tool and it's got a white boarding feature within that I just like to use so I'll be doing that and for demonstrations I'll be doing demonstrations primarily on packet tracer and the reason I'm doing that is because for those of you watching if you don't have any experience with packet tracer it's absolutely free you can download packet tracer for free all you need to do is sign up for Cisco's networking Academy which basically just entails giving them your username password and email address and that's pretty much it and then you can play around with spanning tree and do most of the stuff I'm going to show you today so you could follow along with me or once the recording of this comes out you could follow along with the recording but I think your packet tracer would give everybody throughout the world the opportunity to do this stuff because it is freely available now the downside with packet tracer is because it's not real Cisco IOS software it doesn't have all the commands available the real Cisco IOS software has and a lot of times when you issue show commands like you know show this protocol or show that the output that you get is not exactly the same as the output you get in a real switch so there will be times that I'll be moving over to our ine lab racks here where I can actually show you on real switches and sort of do a comparison and contrasting between this is what you would see on packet tracer this is what you see on a real switch and here on the real switch you can see you've got some additional options that allow you to do some things that packet tracer doesn't allow you to do but I will try to keep most of my demonstrations constrained a packet tracer if at all possible since I know that everybody watching has access to that tool Salim nice to see Keith with a beard this time yes yes I know showing my age here alright so let's go ahead and start with a basic premise of what is spanning tree and why is it needed why did it come out what problem did it solve and when it I'm teaching in class I'd like to introduce any new concept by answering that question if you understand what the problem was a networking that this feature was designed to solve it hopefully Salette it solidifies it in your mind as to why you would use it and why it works this particular way so that being the case so take yourself back to like the late nineteen seventies now some of you guys may not even been born at that point in time but so we're going back now beyond the days of switches this is the back in the days when bridges were prevalent okay so if you remember your history of Ethernet when Ethernet first came out you had just one big long cable that all these mainframe computers would tap into and then in order to get additional distance on that cable and additional devices connected to it hubs came out and then after hubs bridges came out so that's that's where we are right now we're in the world of devices mainframes and some real simple pcs connecting to bridges now how did a bridge work a bridge was a very simple device and Ethernet frame would come in a port the bridge would simply look at the destination MAC address of that Ethernet frame the bridge would go into its own local bridging table which was a listing of MAC addresses it would try to find a match for that MAC address and if it did find a match that MAC address and its table also had a corresponding port number where that MAC address lived were resided so the frame would come in and they would go out that particular port based on the MAC address table but there were times when a frame would come in and a lookup would happen in the MAC address table and there'd be no match there'd be nothing there either because that destination MAC address was just unknown thus the bridge had never heard from it before or maybe a destination MAC address was a broadcast it was intentionally meant to go to everyone not just one device so in both of those situations the bridge would go into its table and say hey I don't see a match here for this so I guess what I'll do is I'll just flood this frame it came in one port and I'll just make copies of it and send it out all the other ports so that was sort of the idea of you know when a frame comes in to us to a bridge how do we get it to the destination if we don't know where the destination is real simple send it everywhere so that was the idea behind that but this way of doing bridging had some downsides to it and so imagine this topology I've got right here now I've drawn two switches switch 1 and switch 2 but the idea is exactly the same whether we're talking about a bridge or a switch when it comes to forwarding an Ethernet frame the concert is the same whether it's a bridge or a switch frame comes in look up the MAC address send it on its way so here I have two devices we'll just call them two switches now the problem came in when number one I decide to have redundant links I would say hey one link between these two switches or between these two bridges is not enough I have so much data so much information going back and forth that one link is getting overloaded it can't handle all that data so I decided well I'm gonna give myself a second link or maybe a third link to increase my bandwidth increased my capacity well here is a problem that was introduced by this and this is the problem the spanning tree was designed to solve so I'm gonna go ahead and maximize this they can see a little bit better so imagine the PCA sends some sort of ethernet frame and the destination is a broadcast now there's a lot of types of Ethernet frames it could be a broadcast it could be a dhcp discover it could be an arp request a lot of different things but the point is when switch one goes into his MAC address table to look up the destination of this frame he's not gonna find a match because a broadcast MAC address if you remember always takes the form of just a whole bunch of F's right ffffff so that is a broadcast MAC address or in binary just a bunch of binary ones and that is only seen in a destination it's never seen as a source MAC address which means this will never show up in the MAC address table so here comes into switch 1 a broadcast and switch ones as well since it's not on my table I guess I'll flood it so he takes a copy the frame and since it out port 2 he takes another copy and sends it out port 3 now at the same time he does some learning right here in other words he says hey maybe this is the first time I've ever seen a frame from the source MAC address of a a so I now know that a a exists and his frame came in on port number one so I'll go into my MAC address table and that's where I will learn him right there all right now he sends out these two frames here to switch to now we don't know which of these frames is gonna be processed first by switch to the one that came in on port 4 or the one that came in on port 5 but that's that's really kind of irrelevant let's just pick one at random let's say that switch 2 decides to process the one that came in on port 4 first so he says hey here's a frame with a source MAC address of a a I've never seen that before and I'm gonna learn it I'm gonna associate it to port 4 because that sort of came in now he takes a look at the destination MAC address of that frame he says oh the destination MAC address is a broadcast I don't have that in my table so I'm gonna flood it so he takes that frame and he floods it out port number 6 and he also floods it out port number 5 now a split second later now he's gonna process the frame that came in on port number 5 because that's been waiting to be looked up he says oh hey this frame that came in on port number 5 is also from a a so I guess a a has moved he's no longer on port number 4 I will delete that entry and I will rewrite it as being learned that port number 5 ok now hold that thought for just a second that has just happened that process of learning a a on port fought for and then deleting it and rewriting it on port 5 that has happened in like a split second super super fast now let's look at switch number 1 switch number 1 here is now getting a frame coming in on port number 3 switch number 1 says ah interesting this frame coming in on port number 3 has a source MAC address of a a I guess he's no longer on port number 1 he must now be on port number 3 and guess what that's a broadcast so I'm gonna go ahead and flood that so he sends a copy of that frame to the PC he also sends a copy the frame out port number 2 now it comes in on switch to switch 2 says here's good old AAA again but he's coming on port number four so I'm gonna delete that and I'm gonna relearn it on port number four and oh that's a that's a broadcast frame right here so I'm going to go ahead and flood that here in here and you can see what's happening at this point this this broadcast is just circling and circling and circling between here both these piece seeds are getting multiple copies of it now imagine it for just a second remember if these links are let's say fast ethernet links which means they're capable of 100 million bits per second okay and the forwarding engines in these switches that the actual Asics are responsible for taking a frame looking it up forwarding it out they can do that process millions or tens or hundreds of millions of times per second so in one second of time how frequently do you think this broadcast frame is being hit by a a a a and hitting B BBB and not only that but when a broadcast comes into a switch the switches own CPU has to look at that broadcast because after all maybe somebody's trying to ARP for the switch itself maybe somebody's trying to talk directly to the switch so the switches CPU also has to pay attention to that in this case here we have four devices the two PC's and the two switches and their CPUs are just getting pounded with bam-bam-bam-bam-bam-bam just like thousands of broadcast every second they're just slamming those CPUs well the CPUs of these devices were never meant to handle that onslaught of incoming broadcasts so from PCA and PCB probably what you'll see on the PC is your your networking connectivity will just stop you're like I was in the middle of watching some YouTube video and it just froze and I can't download my emails anymore and I can't do anything and my PC is even when I open up Microsoft Word or Microsoft Excel it's like it's crawling and my mouse is crawling across the screen that's because the CPU and your laptop is just dying because it's being pounded with these broadcasts are coming in many of which are your own broadcasts which keep coming back to you and the switches the switches are having an even bigger problem because not only are they also having to process this onslaught of incoming broadcast that they themselves are generating and circling around but they're having to go into their MAC address tables and constantly erase rewrite erase rewrite that process also takes a hit on the cpu so on the switches what you would probably notice is the CPU getting higher and higher and higher and higher and eventually you try to log in to the switch you get nothing you can't even even if your consult into the switch you have no access to the command line it is frozen and then probably a few seconds later the switch just crashes the CPU gets overwhelmed and just dies and crashes comes back up so this is what we call a bridging loop and so you know if you were just a regular user of this network what the indicator would be to you that there's a bridging loop going on is you know you're doing your stuff and networking you know you're doing your emails your web browsing and all sudden it's getting slower and slower and slower and then there's a period of time when you have no networking connectivity whatsoever that's the period of time those switches have crashed and are reloading and then when the switches come back up and their tables are empty network is just fine but the next time a broadcast goes out and guarantee there will be one within the next minute or so now the network's gonna get slower and slower so you got this repeating pattern of the network getting slower no connectivity networks fine slower slower slower no connectivity networks fine and that's what you would know as oh ok there's a there's a broadcast storm going on there's a bridging loop so this is problem that spanning tree was designed to solve so very smart lady called radhiya Pearlman who I believe worked at Digital Equipment Corporation which doesn't exist anymore like I said this is back in the late 1970s early 1980s I believe came up with a solution to this she said ok well the whole reason why we have this problem is because we have this redundant leak right here so technically what I could do is just remove that cable there no redundancy I'm done right no problem I don't have a bridging loop but now what happens if this link goes down I've got nothing so she thought what would be a good ideas if I had some protocol that ran in the background that recognized redundancy in a network and stripped out that redundancy in other words it basically made a link useless it didn't bring it down the link was still physically up it still was electrically alive but this protocol would say right now I'm not gonna allow any data across this link because if I do that could cause a bridging link bridging loop a spanning tree loop but what this protocol would be smart enough to realize is hey if another link does go down I need to account for that and take my link which was previously down and bring it back up again so this is what spanning tree does and the reason they call it spanning tree if I go to this picture right here so here's our original tree like structure you know imagine that each one of these red boxes represents a bridge or a switch the lines between them are you know Ethernet cables are connecting them together and we have a lot of redundancy here right that the switch on my floor has connectivity to other switches on my floor connectivity those switches above me switches in the basement and everything's interconnected together now this topology right here is ripe for a bridging loop so when you implement spanning tree on this spanning tree says okay well I'm gonna start removing some redundant links I'm not going to take them out I'm just gonna make sure that data is not allowed to flow across those links and what she'll end up having is after spanning tree is done doing its job you'll end up with something that looks like a tree where from any one point to another point on the network between any two PC's between any PC and a server there is only one possible path all the redundancy has been trimmed off but spanning tree is smart because if a switch in my tree fails or if a current active link fails spanning tree can take one of those other links it's currently what we call blocked it's blocking traffic and turn it into a forwarding link where it's allowed to forward traffic to make up for the fact that something over here has gone down or has failed so that is the idea behind spanning tree why it was developed and what the concept is so let me pause here for just a second does anybody have any questions on what I've described so far and let me just take a look through some of the existing questions and see if there's anything I can answer before we start going into the details of how this works I'm just going to scroll up here a little bit oh hey David congratulations on passing your CCNA that's fantastic good job Selim you have your icnd2 in the next two weeks okay that's where you're gonna be hit with your spanning tree questions spanning tree is that's where it is introduced on the icnd2 exam okay so I don't see any questions so far so let's go ahead and talk about how this happens how does it come up with this tree so the way I like to describe is I like to say okay if you think about a tree everything much from a tree starts at the roots right if you don't have any roots spreading underneath the ground you have no tree so a tree requires roots and then everything sort of branches out from the roots and as the sunlight comes in that's converting energy which goes down into the roots you know the water comes in goes down to the roots so just like a tree needs roots to exist spanning tree needs roots as well so the roots we're talking about here in spanning tree is one particular switch or bridge is going to be elected to a special role called a root bridge and I'm going to talk about who is that in just a second how do we determine that but once all the switches know in the topology oh that guy over there he's the root bridge then the tree is formed based on where he is and the shortest path to reach him everything about this tree is based on the root bridge now you might be asking okay well what if I have a root bridge and my tree has been formed and my root bridge was away like someone Yanks him out of the topology or it just crashes and dies well guess what like so many networking protocols out there right a lot of networking protocols make use of hellos or keepa lives where some devices I'm here I'm here I'm here over and over and over again as long as it keeps doing that the protocol is stable everything's good it's when those hellos or keepalive stop that the protocol scrambles and says okay I need to account for this I need to do something same thing is true with spanning tree this root bridge that we're gonna see here in just a second has to periodically send out these hello messages saying hello I'm here I'm still the root bridge and if he stops because he crashes and dies or something like that then after a certain period of time all the switches will elect a new root bridge and a new tree will be formed based on the location of wherever that new root bridge is so when you're taking a look at a topology of switches so let me go ahead and get rid of this right here so let's go into packet tracer now so let's just make a simple topology of let's say four or five switches they make this a little bit bigger here so it doesn't really matter which switch I select from packet tracer I'm just gonna select the the thirty-five 60s let's just put one right there on right here let's just do a simple triangle to begin with alright so I've got three thirty-five sixties now I have not connected them yet but once I do connect them they're gonna start running spanning tree and this is also another thing for the cisco certification exams is spanning tree is not something you have to turn on it's already on by default so everything about to show you is happening in the background now there's certainly ways to influence spanning tree and make it do what you want it to do but you can just leave it alone and it will do all of this it will do its loop prevention all by itself which is the great thing okay so let's go ahead and connect these guys together because we're talking switch to switch connectivity we need a crossover cable so if you just hover over the cable types down below if you haven't done this before and you look way down here in this section so if you look down here as I'm hovering over the cables you'll see that it actually indicates what the cable type is so that blue cable there is console copper straight through copper crossover alright so let's just select copper crossover and between this guy here I'll stick fastethernet 0/1 I'll have him go to fastethernet 0/1 over here and on the same switch here let's do another crossover cable but this time I'm going to select his gig port gig zero one and I'll have it go to gig zero one on this guy and one more let's do Fast Ethernet zero to going to fast ethernet zero to all right and so we can see this I go to options preferences I'm gonna put on here cuz we're gonna put show port labels because in spanning-tree it's very important that you know what the actual port number is is that zero one is at zero eight you actually have to know that in order to decipher topology so when I talk about deciphering spanning tree topology while I'm really talking about is looking at topology like this and being able to figure out what the tree is gonna look like what link is not going to be used because it's gonna be blocking somewhere alright so in that's our ultimate end goal which of these three links is not going to be used by by data so let's just put a this is put a couple of pcs in here put one right there and let's put one right here and let's just put one right here all right and we'll connect those guys up with some straight through cables so our ultimate objective here is to figure out when these pcs are talking to each other what the path is that they're gonna they're either net frames are gonna take what's gonna be blocked by spanning tree you okay now packet tracer actually shows it to us so you know if we were lazy we could just look at this and I'm not sure if you're familiar with this or not but and packet tracer if everything is just on one VLAN and by default everything's on VLAN one here the green light means it's in the forwarding State it is wide open for sending and receiving traffic this sort of orange dot means it's blocking so we can see that this one is blocking now the question is why is that blocking all right so let's go through the logic here so step number one of spanning trees we have to figure out which switch is going to be our root bridge everything is gonna branch off from the root so how do we do that well in the world of spanning tree when a switch first gets turned on or enters the topology it doesn't know who the root bridge is so that switch starts sending out these special spanning tree hello messages and bc2 man-beast you got it it's called a bpdu so the name of this message is called a bridge protocol data unit bpdu and this is the message that goes out by Spain tree this is the fundamental building block where everything learns of the topology and ultimately decides what's gonna be forwarding what's not gonna be forwarding what's gonna be blocking so inside that bpdu there are a lot of different fields I'm not gonna get them in order you don't you know for any certification test you should know what the fields are and what their purposes are but you don't necessarily have to get them in the correct order so I'll start out with one of those fields is called the root bridge ID field another field is called the sending bridge ID so this first box here in the BPU says here is who I believe the identifier is of the root bridge the name of the bridge and the second box says hey I'm sending this bpdu to you it's coming from me so I'm gonna put my own name in the sending bridge field now imagine that all three of these switches got powered on at exactly the same time so they have to elect a root bridge so at the very beginning because a switch doesn't know what the topology is it doesn't know if there's an existing root bridge or not it takes its own name and puts it inside the root bridge ID field it says well I'll just assume that I'm the root bridge until somebody tells me better I'll take over that job now was it what does this bridge ID field look like well you know it's a number right but as a number it's actually divided into two separate components see if I can fit them in here so if we were actually looking at it so if we're saying that this field is this Ethernet frame is going from from left to right so let's just say then that this field here on the the right this would be the first field that you would read that is the bridge priority so every bridge has a number of a bridge priority and then after that there's the bridge MAC address okay so the bridge IE is composed of two subfields a bridge priority and a bridge MAC address now for the purpose of any certification exam you need to know what is the default value for the bridge priority I'll give you a little bit of history lesson for this so rowdy a Pearlman when she developed this and she developed a structure this BPD was she said okay well the bridge priority I'm gonna make that 16 bits so 16 bits long so if you think about a number so if you think about 16 bits okay so if I was to draw out 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 or if this was my priority field right here 16 bits long the absolute lowest number you could have would be all zeros I'm not gonna fill it all in here but you know a priority of 0 would be the lowest number what's the highest number you could have all ones right and if I fill this in with all ones that would be 65535 so Ms Pearlman decide well I'm gonna make the default bridge priority be right in the middle half of that so between zero and sixty five five thirty five she decided that the default bridge priority would be thirty to seven sixty eight and yes for a certification exam from CCNA all the way to CC ie you will want to memorize that number now through iOS commands you can change that and a lot of people do you can change that number but that is the default thirty-two 768 now the MAC address you can't really predict in advance what that's going to be on some switches there are some show commands where even if the switches is connected to anything if there were no cables you still might be able to predict what MAC address it would use but I'm just gonna put in some random MAC address here alright so let's just say that's the MAC address so the bridge ID is this total combined number thirty-two 768 or whatever the priority is and the 48-bit MAC address following that so that whole thing together is considered the bridge ID so you got a switch now or a bridge that's taking his name which is his sending bridge ID and he's copying it into this field called the route ID root bridge ID but we could only have one they can only have one root bridge so imagine all these switches are exchanging be PDUs who's gonna win in spanning tree whenever you're comparing two values against other and you're trying to determine what's the winner what's the best lower is better whatever the lower the number is whatever the lower value is that is the winner so if we go back to my topology right here we need to figure out of these three switches what their bridge IDs are and whoever's got the lowest bridge ID that will be our root bridge now if all the switches or bridges have the exact same priority and they will by default by default every single of them will be 32 768 then they will default to whoever has the lowest MAC address that will be our winner that'll be our root bridge when kind of a funny interesting little factoid here is that if I have a environment of new switches and old switches guess what switch is gonna be my root bridge by default my oldest switch whatever switch was manufactured the earliest because a switch that was produced and manufactured in 1999 is gonna have a lower MAC address than a brand new switch that was manufactured yesterday right because companies get batches of MAC addresses and typically they take the lowest one they just go up from there so you're really old outdated switch that's gonna be your root bridge now you probably don't want that you probably you know maybe that switch is like in some far dusty corner of the network somewhere you want ideally a switch is pretty much right in the middle of your network in the core layer of your network you want that one to be the root bridge and also you want to switch this like a big beefy core or distribution layer switch you don't want some small puny little access layer switch being your root bridge so if there's nothing else that people do with spanning tree is they will they will identify okay that bridge right there I want that one to be my root bridge how do you make that happen you change the priority and there's actually a couple of different ways you can do that in Cisco IOS I'll go onto uh actually let's just take a look at packet tracer first of all what options does packet tracer give us so if I go into the command line here make this a little bit larger now on Cisco switches I'm assuming that if you're watching me right now you are familiar with the concept of VLAN so I'm not gonna go into what a VLAN is on Cisco switches each VLAN that's active in other words a VLAN has at least one physical interface in it that's what makes it active each VLAN that's active is running spanning read so if I have five VLANs in my switch me lines one through five VLAN one is running spanning tree that VLAN has some root bridge somewhere and it's formed a tree for VLAN one VLAN two it's got a root bridge and there's another tree for that one so all of your spanning tree commands in Cisco switches you have to include the VLAN that you're concerned about which tree do I want to look at the one for VLAN - the one from VLAN 19 so this is called per VLAN spanning tree so if you see that acronym P vs T that's what we're talking about here each VLAN doing its own separate spanning tree now I haven't configured any VLANs in these switches so I should just have VLAN one pretty much so for my show command X I'm not gonna show command I'm gonna show you the command to first of all set the priority of a switch so it would be spanning - tree VLAN select your VLAN number and then to change the priority okay good it does have both both commands here you can manually set the priority Spain Dressed tree VLAN one priority and then set some number as your priority so for example if I wanted this switch here to be the root bridge I could actually give it a priority of zero and once again assuming there is no other switch that has the same priority of zero this guy will be the winner now if there is another switch in this VLAN it also has a priority of zero guess who's gonna win whoever's got the lowest MAC address that will be my root bridge but I'm trying to avoid the MAC address being the winner I'm trying to make the priority dictate who's gonna win by being the lowest priority another very popular command that people like is spanning tree VLAN whatever the VLAN is root primary root primary and what that command as soon as you hit enter on that command the switch will take a look at its spanning-tree table and say okay is there a current root bridge out there who's not me let's say there's a root bridge out there right now who's whose priority is 8,192 so my switch I just did the root primary command I'll say okay well I want to beat him so I need to have a lower priority than 8,192 and it'll actually automatically lower the priority low enough to beat that guy now there's more logic to it than that as far as like how does it pick a number once again I'm serve on constrained time right now so I don't really have time to talk about extended system IDs and things like that but the main thing I want to reinforce right now is the D priority is 32 768 if we want to make one particular switch the root bridge the way you do that is you knock the priority down and you can either do that manually with a spanning - tree priority command and set your number or you can do it with the spanning - tree VLAN root primary command and that will automatically pick a number for you which will make it the root bridge now there is one caveat though with this command right here with the root primary command let's say that I currently have a root bridge let's say right here this is my root bridge and he is the root bridge because he is 4096 that is his current priority then he's got some mac address right here well the spanning tree VLAN root primary command will not work on any other switch to beat this guy why not well when this command takes effect and says I need to lower my priority it actually lowers it in multiples of 4096 so for example if this guy was the current root bridge because he was 81 92 no problem if I did the command right here he would end up having a priority of 4096 he would say okay I need to be lower than 8000 192 what's the next increment down what's the next 4096 value less than that that I can select oh 4,096 but if a switch is already 4096 you might think oh well then why doesn't this come and just knock him down to zero it doesn't do it it just won't do that so if the current root bridge is 4096 the only way to make this guy the root is by actually using the other command that I showed you which was the spanning - tree VLAN and then actually set the priority to zero if you want a prior to zero you can't do that with the root primary command you can only do that manually with the spanning tree VLAN priority value so that's just one little caveat about that okay so that's how you deterministic lis set the root bridges by going on to whatever's not the root so we can compare and contrast that let's go to this guy over here all right same command shows spanning - tree VLAN one let's zoom in here a little bit okay so we can see that this is the information about my local switch you can see he's using the default priority of 32 768 now Cisco switches for decades have done something called extended system IDs and what an extended system ID is simply means it takes the priority and as the VLAN to it and that's what gives the total priority so that's why it says 32 769 if I had done this for VLAN 10 it'd be 32 778 32 768 plus VLAN 10 which had been 32 778 so that's what's called an extended system ID so here we can see this is my MAC and priority and this right here is the priority and Mac of the root bridge so the root bridge beat me he's the winner not because of his priority his priority is the exact same but because of his MAC address because if we just start comparing the MAC addresses from left to right 0 + 0 0 + 0 up here we have some differentiation 0 here and 3 right here and once again lower is better so 0 is lower than 3 so this MAC address is better or lower than this MAC address so that's why this switch became the root bridge simply by virtue of having the lowest MAC address of all the switches so if you're ever given a spanning tree topology like a diagram such as something like let's get rid of this we don't need this anymore something like this and you're asked to figure out what's forwarding what's blocking what's this topology going to look like first thing you have to ask yourself is what is my root bridge and in order to answer that question you need to know what the bridge ideas of every single switch remember you have to look at the priority first and ask yourself doing these switches have a lower prior than any other switch if they do you're done whoever has the lowest priority that's the winner if the Priory's are all the same or if there happens to be a tie in the priority then whoever has the lowest MAC address and you just parse the MAC address from left to right you just start comparing the numbers okay zero zero zero zero one e FC OC is lower than FD okay between these two that guy's the winner and so you go through this and that's how you would figure out who your rubriz is so that's step number one is identifying the root bridge either on paper by looking at the MAC addresses and the priorities or by actually going into a device and issuing the show spanning - tree select a VLAN and then remember this part right here is your own local information now you might think oh well SH why do I you know in this case it clearly tells me who the root bridge is why do I care well imagine that my picture looked like this hold on a second here let me just do a new one okay imagine my picture was like this let's say I had a switch right here switch right here had some laptops connected to it so these are some laptops here so laptop's connected to this so these are two real switches imagine these are two physical switches switch one switch - okay all these laptops are in the same VLAN I don't know what it is let's say VLAN 7 and you have to identify okay before I connect switch 1 and switch 2 together before I connect to cable I want to predict in advance which one of these switches is gonna be my root bridge well if you log on to them right now they will both say that the root bridge because switch one will say hey I'm the only bridge here in VLAN 7 it's just me I'm the root bridge and guess what if you log on a switch - he's gonna say the same thing he's gonna say I'm the only switch in real and seven I have gotten BPD's from anybody else I'm the root bridge so issuing the show spanning - tree root command right now on these two switches and looking at the top part this part right here won't help you because they're both gonna say they're the root bridge that's why you'd have to say alright I need to look at the bottom part here and I need to identify what the bridge ID is of switch 1 and switch 2 and then figure out which is lower which is gonna be my root bridge so that's step number one identifying the root bridge and then once you've identified that root bridge like in this particular case right here we know that all the ports on that root bridge for that VLAN because remember we're just concerned with this particular broadcast I mean this VLAN are gonna be in the forwarding State now what is forwarding mean in in terms of spanning tree we have things called an interface that's participates spanning tree right an interface is either sending or receiving B PDUs is gonna have a certain port role and a port state so let's go back to my white board here for a second so one spanning tree each interface has a so I'll start out with port roll and over here we'll say port state so the port rule the way I like to describe that is what is the job / responsibility of this interface as it pertains to the STP protocol okay is the job of this port to put BP to use on the wire every so often is a job of this port just to be listening for BPD use you know what's it doing as far as the protocol is concerned and the port state is is this port allowed to send and receive user data that's the port state so the first port role we're going to talk about which is tied into the root bridge is a port role called a designated port so the definition of a Disney port is on any given cable the port that is closest and I'll define what closest means the port is closest to the root bridge is the DP it's job is to periodically transmit B PDUs onto the cable okay so that is the role of a designated port it's the port that's closest to the root bridge so if I go back to this we already know the switch on the top is the root bridge so clearly on this cable you can't get any closer the root bridge than being on the root bridge so on this cable right here this is gonna be a designated port this is gonna be a designated port and this is gonna be designated for every single interface on the root bridge will be a designated port because you can't get any closer than being physically on the root bridge and so that means that every so often it's gonna be his job to transmit B PDUs onto that cable now for the purposes of the CC exam on up you should also know the frequency how often does the root bridge put those BP dues onto the cable and that frequency is every two seconds every two seconds bps are put onto the cable all right so that's the job or responsibility of a designated port so that's the port role what about the port state well a designated port is always in the forwarding state which means wide-open to send receive user data all right so it doesn't a port is always in the forwarding state so that's why given this particular topology right here I would mark all these ports as DPS and I put like a little F next to them all right so in order to decipher this topology step number one figure out who your route bridge is going to be step number two go to all the ports on that route Bridge mark them as designated ports and forwarding so I'm going to take a break here and take a look and see if you guys have any questions that I haven't answered yet and then we'll keep moving on with this okay had a spanning tree block ever done it path we're gonna get there that's actually gonna be the last thing we're gonna do is figure out what ends up blocking Internet work training asks a question how can you explain can you explain the proposal and agreement in spanning tree so proposals and agreements what we're talking about today so radhiya Pearlman came up with the original spanning tree she gave it to the I Triple E and they made a specification out of it that specifications what we're talking about today so the original spanning tree from the I Triple E was 802 dot 1d8 or 2.1 david that's what we're talking about today several years after that they made some updates to it and they came out with eight oh two dot one W and that is rapid spanning tree and that's where proposals and agreements come into play in 30 seconds or less I'll just tell you what those are so you and I are two bridges or you and I are two switches we connect a cable between us and 802 dot 1d even though it's just you and honest cable it's gonna take a little bit of time before we finally figure out are you gonna be forwarding am I gonna be forwarding are you gonna be blocking am I gonna be blocking you know what what's the port role gonna be for you and for me that's gonna take anywhere from 30 to 50 seconds depending on things before we finally decide what we're gonna be in rapid spanning tree when this cable comes up as we exchange B PDUs we actually flip a couple of bits in there called proposals and agreements and so what does a quick rapid-fire exchange of bps it takes place in like a second or two we know ultimately what our port role is going to be with just a one two exchange of BP to use for example I might know that I'm gonna be a designated port I'm gonna be forwarding you might realize that you're gonna be blocking or you're gonna be something else in 802 dot one D even though we exchange B PDUs and we might know that we'd still have to wait thirty to fifty seconds because hey there might be somebody else on this cable that just hasn't sent a BP to you yet we need to wait for them in rapid spanning tree we say hey this is a point to Kable this is full duplex here there can't be anybody but us there's no third party we're waiting for so in rapid spanning tree when we identify as full duplex now with just a 1/2 exchange a BP to use we know I'm gonna be forwarding designated you're gonna be blocking so in like two seconds we're done we don't have to wait an additional amount of time in case the third or a fourth switch decides to make a surprise appearance on this cable we know full duplex there's only the two of us so we can use some special bits within the BPD use to say hey let's just real quickly here decide what we're gonna be and then then that is it so that's why they call it rapid spanning tree what else here yes of the name of the lady I might get her name misspelled but I believe it was I believe so I just put it there I think was rowdy at Pearlman not sure if I spelled her last name correctly but you can google her she's got all sorts of books on stuff and yeah we haven't talked about cost yet we're gonna get to that how much overhead or bandwidth their packet size is STP normally claiming on a given link as STP greedy not really these these beep views are quite small as a matter of fact let's just take a look here and pack a tracer one of the nice things about packet resource gots are like I sort of a primitive packet sniffing tool like wide arc it's not Wireshark but it's something like that built-in so I'm packin a sir here in the in the right corner I can click on the simulation pane under edit filters actually I can just click on show none and then under edit filters here I can select okay all I want is miscellaneous and I want STP they'll show me BPD use and once I start collecting BP to use it should show me their size okay so we see they go out every two seconds so I don't have to wait very long so I'll just stop it right now let's select one of these BPD use here and does it tell us how big this guy is ah let's see well this doesn't give us the total here it does show us the size and bytes of each sort of row but you would have to add these up but you can see there's there's not it's not that big if you just do a quick Google search you'll be able to see what the the total size is of then make sure you type in 802 dot 1d bpdu because there are other flavors of spanning tree where the sizes of BPA's are different but a BP new only goes out every two seconds it's not very big so no it does not consume them a lot of bandwidth their overhead on the switch and so there's a question when there's a conflict between two switches believe me they're both the root for one VLAN how do other VLAN packets get flooded well so there should never be a conflict every switch should have a unique bridge ID right so in theory every networking device every switch every Bridge every router every NIC card has its own unique MAC address so in theory you should never see two devices that have the same MAC address now that's in theory every once in a while in the past there have been stories about vendors who accidentally shipped out a bunch of NIC cards with the exact same duplicated MAC addresses but it's highly highly unlikely that in your environment you will have two switches that have the exact same MAC address so given that there will always be a tie breaker if the switches are talking to each other and that's the key thing if they're talking to each other if they're able to exchange B PDUs they will recognize that they have different MAC addresses and whoever has the lowest MAC address will be the winner so there should not be a tie the only time I've seen when I get on like two or three switches and they all say I'm the root I'm the root I'm the root that's because there's some disconnect if 'ti their switches are somehow not able to transmit or receive BPD's to each other so they don't know that the other switch even exists and so that's you'd have to troubleshoot that why are the B pews not making it between the two switches but if the B videos are flowing if you don't have any corrupt links or links with errors or something like that you should not have a tie there should always be somebody who wins and there is no RFC for spanning tree so RFC's are typically for like layer three and above protocols spanning tree is is a layer two protocols so you would do a google search on I Triple E 802 dot one D so 802 dot one D is the I Triple E specification that we're talking about today topology change notifications we're not gonna have time unfortunately to get into that I just have time to show you the topology and how to figure that out that'll have to be a topic for another day all right so let's go back to this alright so given let's see here maybe I can do this one here alright yeah we can use this alright so we want to figure out what our topology is going to be here who's gonna be our root bridge and everything like that so first thing let's go ahead and get rid of some my redundant links here for just a moment that'll come in later is we have to know what the bridge IDs are so let me just put some bridge IDs onto this topology cuz without that we're dead in the water we can't figure it out so by default we're all gonna be 32 768 I'm just gonna put some MAC addresses on here and as I do this I want to see if you can figure out what the root bridge is going to be okay so who can tell me in this topology diagram right here who's gonna be my root bridge let me just put some numbers let's say is it gonna be switch one switch to switch three or switch four well hopefully you said switch 4 because they all have the same priority 32 768 so if we start reading their MAC addresses from left to right they all start with 0 to 1 1 if we go into the next hexadecimal word they mostly have 3 4 but this guy down here has 3 1 and 3 1 is lower than 3 4 so now we know what is gonna be the port role what's gonna be the port role remember here is it's not that where is it here port roles I've talked about so far this could be a quick view of that so what's gonna be the port role of all of his interfaces hopefully you said designated ports and yes Andrew it you are correct all the ports the state the port state is gonna be forwarding ok so let's just put a little circle around that so that was part 1 figure out the root bridge I should say step 1 step number 2 every other switch that's not the root bridge has to say ok so let's say I'm a switch and I've got lots of interfaces and I'm getting the root bridges out there somewhere and I'm getting beep adduce from him on five or six of my interfaces up there there's one that came in on fast he's an at zero one oh there's one that came in on fasting 7 0 7 so I know that I have multiple ways multiple paths to get back to that root bridge the next question I have to ask myself is of all these interfaces it could lead me back to the root bridge which one is the best what is the fastest best path that will get me back to the root bridge and whichever one that is like let's say it's this one fastethernet 0/1 arc fast even at 0 / 9 as a different kind of a port role let's go back to that so that poor troll will be what's called a root port root port and that is port with lowest cumulative cost we'll talk about cost here in just one moment back to root bridge receives B PDUs from upstream switches and a root port just like a designated port the state of that is always forwarding okay so what do I mean here by cost so if we take a look at a topology let's go back to this let's for example let's take the switch number two right here so switch number two at the very beginning he's going to be receiving BP to use this way and BPD's this way and he has to figure out okay which interface is the best one it's gonna be my root port well when radhiya was determining this protocol she could have done it based on hop count like rip does you know how many hops away how many hops of bridges do I have to go through to get to the root bridge she didn't do that so she elected not to do that she could have done it based on time hey let's have all these switches synchronize their clocks and then when a BPD goes out let's put a little timestamp in there when I get it see how many microseconds it took me to get it and she didn't do that she didn't do it based on time instead what she did and she says well every single interface is gonna be assigned of value called cost and cost is directly related to the bandwidth of an interface I put that on here cost is derived / related to the interface bandwidth and remember in spanning-tree lower is better which means an interface with a lower cost means it has a higher bandwidth the faster the speed of an interface the faster it can go the lower the cost it's going to be now once again we're talking about 802 dot 1d here this is all related to that so there are some cost values that you should memorize if you actually look in the 802 dot 1d specification there's about five or six different bandwidth values and they say okay if the bandwidth of a link is this this is what the cost should be and I'll give you the ones that you should memorize so according to that a 10 megabit per second Ethernet link which you probably won't see too many of those anymore has a cost of 100 a 100 megabits per second Fast Ethernet has a cost of 19 a 1 Gigabit Ethernet link has a cost of 4 and a 10 Gigabit Ethernet link has a cost of 2 so you should definitely memorize those values if you're gonna be taking any cisco certification exam now you a logical question you know I have is well what if I have a link that's something outside of that for example what if I'm doing an ether channel and the total bandwidth of my ether channel is three hundred Meg's the 802 dot 1d document nowhere in there does it give you a formula it says these are the recommended values but there's no formula which means it's pretty much up to each individual vendor to derive a formula for themselves for bandwidth that are outside of this scope right here so at 300 megabits second ether channel on a Cisco switch might come up with a different spanning tree cost than the 300 megabit per second Ethernet channel on a Juniper switch you don't know because the specification doesn't say what those should be but these it does so the next part here in figuring our topology is we have to ask ourselves what is the bandwidth of these links now you probably can't see the colors too well in this diagram so I'm just gonna put fast ethernet fast ethernet and this one down here will also be fast ethernet okay so we identified our route bridge so step number two is to go to every other switch and it really necessarily matter what the order is but I usually start with the switches are closest to the root bridge and then work my way out from there and I ask myself okay which ports gonna be the root port so for example when the root bridge sends out of bpdu and actually I will mark this in my other picture that I drew over here another field within the bpdu is what's called the cost to the root so when I forward a bpdu to you let's say the root bridge was behind me I got a beeping you from him I'm forwarding it to you so when this BP - I'm forwarding to you the root bridge ID is his name his bridge ID the sending bridge ID is me because I'm sending it to you and the cost to the root is from my perspective what it costs me to get back to the root bridge the total cumulative cost even a few seven or eight bridges away from me the total cost to get back to him when I add up all the links to get back to him now what if I am the root bridge what if I'm sending you a BPD you and I am the root bridge well then guess what the root bridge ID and the sending bridge ID will both be the same and the cost will be zero right because when I send you a beep and you I say hey my costume I self is nothing is zero so if we go back to this picture right here so as the beep news go out from the root bridge I'll draw it this way and I'll draw it this way it's a little bit larger for you the cost on those will be zero because they're being transmitted directly from the root bridge now if we look at F F F F if we look at switch two he'll say okay I just received a BP u on a fast ethernet port as that BP du came in my neighbor told me that his cost to the root bridge is nothing is zero however that was received on a fast ethernet port so to get back to that neighbor as a cost of 19 so my total cumulative cost to get to the root bridge that way is 19 all right same thing right here down on switch 3 he'll say my neighbor told me zero but it cost me 19 to get to him so my total cumulative cost will be 19 now switch 3 is gonna forward a BPD up like this he's gonna say hey buddy let me tell you who the root bridge is let me tell you my name I'm the sending bridge ID and by the way my cost of the root bridge is 19 now switch number 2 is gonna say okay well he told me his cost is 19 but I received that on a fast ethernet link let me give myself a little bit more room right here so my total cost on that link is gonna be 38 he's gonna say alright and and I'm not getting any BP dues from this guy well actually right now that guy switch number 1 is initially gonna be sending BP you saying I'm the root on the root very soon switch number 2 is gonna say no you're not you lost right now he says the only way I have to get to the real root bridge is off of these two interfaces and there's clearly a winner here 19 is lower than 38 which means that the total bandwidth along this path is better faster than the total bandwidth along this path since it's okay I will mark that as my root port so that will be my root port and that will also be in the forwarding state little circle around that now just a second I'll talk about well what if I have two or more paths back to the root bridge and their cause are identical then what do I do and that can absolutely happen and I'll show you what the tiebreaker is for that in just a second but for right now let's just continue along with this so let me get rid of some of these arrows right here let's get rid of this one now ffff remember this is the very beginning of the Spain tree topology here he will now send a BP due back downstream to his neighbor and say hey if you ever need to go through me to get to the root bridge it's gonna cost you 19 all right switch number two is saying hey for me to get to the root bridge it's 19 and this is a very important point let's say once again that I'm a switch and I have behind me multiple ways to get to the root bridge one particular way is a cost of a hundred on other particular way is a cost of 19 another particular way is a cost of four and I say oh well I need to transmit a BP u to my neighbor down here I need a forward a bpdu downstream to my neighbor and in that bpdu I need to tell him what my cost is to the root bridge am I gonna tell you that my cost is a hundred or 19 or should I tell you what my lowest cost is I'm gonna tell you what my lowest cost is so a lot of times people when they're first learning about spanning tree they're trying to figure out apology they can figure out the root bridge pretty quickly that's that's pretty simple but then when they start thinking about the flow of be PDUs and what the cost values are they get confused because they'll see a switch right here and they'll say okay I know that switch is supposed to be sending a bpdu down this way but that switch he's got a cost of five to get the root bridge this way for a hundred oh and they they get confused and my point is if you're gonna transmit a bpdu to somebody you're gonna tell them what your lowest cost is to get to the root bridge all those other potential paths you have are irrelevant you're gonna figure out what your root port is the lowest cost and whatever that is that's what you're gonna tell your neighbors so that's why ffff right here he's saying hey my cost is 19 because he says hey my root port that's my best path and that path has a cost of 19 now switch number 3 here in the lower left hand corner he's gonna say hmm okay interesting my neighbor just told me that I can get to the root bridge through him he told me it's 19 but to reach that neighbor I have to go across a fast ethernet link which is another hop of 19 so that's 38 so now switch number three says okay clearly my bottom path which is 19 is lower than 38 so I will select that bottom path as my root port so I'll say that's gonna be my root port and I will put that into the forwarding state which leads me to another very key point a lot of times people who are brand new to spanning tree will make the faulty assumption that if I have a switch that's directly connected to the root bridge that direct connection clearly has to be my root port and remember it's not based on hop count it's based on cost so if I had something like this okay and let's say that this switch up here was the root bridge these links are gig and this link over here on the right is Fast Ethernet and here we're trying to figure out from switch threes perspective what is he gonna use as the root port don't be fooled into thinking oh well this link right here because that's directly connected to the root bridge it's not based on that it's based on cost you have to figure okay well that's a fast ethernet link which means it's a cost of 19 to get to the root bridge but if he takes this path that's a cost of 4 plus another cost of 4 so taking that what we would consider roundabout path is actually the better one that's gonna be a total cost of 8 so this would end up being his root port down here the port that's not directly connected to the root bridge it's all based on cost now it just so happens in this topology so far the ports that are connected to the root bridge end up being our root port so I just wanted to emphasize that's not always gonna be the case and of course clearly switch number one here he doesn't have a choice right the only path he could potentially take to get to the root bridge is that port right there and if we think about okay so let me ask you switch number one here whatever this port is I don't know let's just say it's gig 0/1 when we do a show spanning tree command on switch number one what are we gonna see as his cost to the root bridge who can tell me well as the bpdu comes up this way his neighbor is gonna be telling him hey if you go through me my cost is 19 because remember his neighbor's gonna say he's gonna give him his best cost his report this guy up top is gonna say okay what but to get to my neighbor it's for I have a Gigabit link which is four so the switch number one will say well the total cumulative cost is four to get to my neighbor and nineteen behind that so it's 23 exactly I see the answers coming in now fantastic so yes so he'll say 23 is his total cost so that is step number two in deciphering a spanning tree topology step number one was identifying the root bridge step number two is going to every other switch and identifying which of their interfaces was going to be a root port and marking down what the cost of that root port was and is important that you mark down that cost because when we get to step number three you're gonna be referring back to the cost of the root port to figure out these additional links we haven't hit yet all right so let me quickly take a look and see if there's any unanswered questions here okay now there was a question earlier about what do I do when my cost is a tie for example and there's a there's two ways that could be the case there's two possible ties so let's talk about that I'll talk I'll draw two different topologies right here so the topology on the left and a topology on the right and just for simplicity sake let's just assume that all the links are fastethernet they all have a cost of 19 okay so let me put some some identifiers on here so both cases let's say the switch on the top is our root bridge okay and this switch here switch three I'll just call this guy switch three as well so in both cases we're trying to figure out for switch three which interface is going to be his root port is it going to be zero one or is it gonna be zero two let's take the case on the left first so if we take a look at the flow of the be PDUs we know that he's gonna be getting a BP u down from the left and from the right and in both cases these BP you's are gonna have the same cost the upstream neighbor is gonna say my cost is 19 to reach the root bridge so switch number three is gonna derive his total cost he's gonna say well 19 but it cost me an additional 19 to reach you so he's gonna say alright well it cost me 38 to get to the root bridge on that and 38 to get to the root bridge on that port hmm that's not gonna help me both costs are identical so remember this phrase remember the FEM burr the movie from the 1980s Back to the Future for those of you who are alive back then will remember this phrase back to the bpdu whenever there's a tie we're gonna go back to the bpdu we're gonna compare what's in the BPD us against each other and try see if we can find a tiebreaker within the contents of the BPD use that we've received so switch 3 in this case he's gonna take a look at these two BPD's he's gonna say alright cost that didn't help me so the next thing he does is he goes back to the bpdu and he looks at the sending bridge ID field and he compares the sending bridge i field of 1 BP to you to the other BPD you she says okay on the left maybe the sending bridge ID field was 32 768 and the MAC address was 0 2 1 1 3 4 5 6 blah blah blah this other one was 32 768 and his MAC address was 0 to 1 1 FF ei blah blah blah so switch 3 says ok since the cost were the same I'm gonna take a look at the IDs of those 2 neighbors and whichever neighbor has a better name a better ID that's the one I'm gonna pick so switch 3 will say ok well 0 2 1 1 3 is lower than 0 to 1 1 F so simply by that virtue I know mark 0 1 is my root port and I'm gonna put that in the forwarding state so that's the first way you do a tiebreaker if you as a switch have multiple paths to get to the root bridge and to Ormeau those two or more of those paths have the same lowest cost then you're gonna compare the BP to use are coming down in those paths and you're gonna look at the sending bridge ID in the VP to use and try to see is one lower than the other in the case on the left it is and we can make our decision now the case on the right even that's not gonna help us so if we take a look at these BP Jews coming down so in this particular instance both BP use are gonna have the same cost cost is gonna be 0 so his total cumulative cost will be 19 and 19 that's not gonna help us he's gonna take a look at the bridge ID 32 768 dot you know 1 1 1 1 1 1 1 1 whatever it is he's gonna say ok those are the same both of these BP to use have the exact same sending bridge ID now he's gonna go back to the BP to you and now he's gonna look at another field I haven't drawn yet I'm gonna draw that right in here so when I send a bpdu to you when I forward a BP new to you I put my own name as ascending bridge ID and then whatever this port is whatever this interface is that I'm using to transmit it to you spanning tree has an ID for the port we call that the sending port ID and just like my name my bridge ID is composed of two values my priority and my Mac the sending port ID is also composed of two values each interface has a port priority let's put that right here port priority and then there's the second part of this which is us we simply is called the port identifier so the sending port ID field is composed of those two values put together the port priority and the port ID now just like I said you need to know what the default value is for the bridge ID for my overall name you need to memorize that's 32 57 68 you should also know what the default port priority is for the port on the vast majority of Cisco switches I'll just write this down here default port priority is 128 I say the vast majority of Cisco switches because if you're actually dealing with a really old Cisco switch that's running the catalyst hopping system like a catalyst 5,000 they actually had a different port priority but I'm assuming that most of you probably don't have any of those so for the purposes of an exam from the CCNA on up to the CCIE you should just write down and memorize that the default port priority is 128 now what's the port ID you can't predict that this is one of those things that the I Triple E document 802 dot 1d specification says that when a bpdu is transmitted from an interface it should have a port prior and they recommend 128 and it should have a port ID but nowhere in that document does it say how that port ID section should be derived so once again that is different vendor by vendor by vendor and even within the same vendor for example cisco has lots of different business units right all of their switches are not made by the same department cisco is so large they've got like dozens of different business units one business newt will make the nexus 5000 switch another business newt will make the catalyst 35 60 switch and the sixty sixty-five hundred switch and the business units don't always talk to each other about little details like this so you'll actually find that the port ID field that's derived in a catalyst 6500 that number like for example fastethernet 0/1 on a 6500 whatever the port ID is this derive for that will be completely different then the port ID derive for fastethernet 0/1 on a catalyst 35 16 same company different business units but here's what I can tell you if I have let's go back to this no not that where is it this one right here so if I take a look at my neighbors ports and let's say this is 0 / 4 and this is 0 / 7 ok I may not be able to the port priority will be 128 I know that that's the default I can predict that now I don't know and I can't predict what the port ID number will be but what I do know is that on this one switch whatever the port ID of 0-4 is it will be numerically lower than 0-7 let me show you an example of this I mean a real switch here for this so this is gonna be a thirty five sixty I'm showing you let's see what VLANs do exist in this switch hold on a second while I get so he knows how I got this message up here that says spanning tree for VLAN one does not exist that's because none of my interfaces are all right now they're not connected anything so VLAN one doesn't have any ports now it should there we go see like like look at this right here so notice that fastethernet 0 21 it has a port priority of 128 but the port ID otherwise known as number here is 23 how did they come up with 23 for a port that's fast ethan 0:21 I don't know you know fastethernet 0/1 how does it have the number 3 I don't know but what you can tell is if I'm compared if I've got two BP to use if I got a BP u coming out of fast e than zero twenty one and another one coming out of fastethernet 0 24 I won't be able to predict what these numbers are but I can tell that whatever the number is 4 21 is gonna be lower than the number 4 24 if I had another switch I could jump into I would show you that those numbers are completely different so going back to our picture right here if you had automatically assumed oh well the cost is the same and my neighbors bridge ID is the same so therefore it must be fast eosin at 0 1 will be my root port you would have been wrong because it's not based on your own interfaces your own interfaces have nothing to do with it remember it's back to the bpdu you got to go back and look in the bpdu and you have to look at the sending port ID that's in the bpdu and if both these ports have the same priority then it's gonna be 0 / 4 whatever his port ideas for 0 / 4 will be numerically lower than 0 / 7 so that will affect the downstream neighbor so switch 3 in this case we'll say this will be my root port I'm gonna put that in the forwarding state because my upstream neighbor sent me a BPD with a lower port ID than that same upstream neighbor when he sent me a bpdu on this interface that had a worse port ID so that's how you deal with a tie now it looks like some questions have come in let me take a moment here and see if I can answer any of them yeah how do we calculate cost if we have a port channel between a switch you really can't predict that in advance you just have to take a you'd have to take a look at it after it's put up but if I showed you a topology if I said okay here's a picture figure out spanning tree and if in that link there was an ether channel you'd have to ask me because there's no way you could say oh I know that ether channel will be a cost of twelve or five or seven you can't predict that so you'd have to know that in advance it's all based on the bandwidth okay does it look like there's any other questions have come in so far so let's go back to this let me get rid of some of this stuff right here so step number one in deciphering our topology was identifying the root bridge step number two was going to every individual switch and identifying the route ports step number three on every cable every cable between two switches one of the interfaces on that cable has to be a designated port now why is that remember what the job of a designate is right the job of it doesn't he porters to be dumping B PDUs onto that cable every two seconds that's its job if that if bps are not put onto that cable how is the other side of that cables supposed to know what he's supposed to be doing so every cable has to have somebody who's putting beep news onto the cable and that is the job of the designated port now here we've already got a Disney port there so we know bps are going out on the cable that way we've already got doesn't a port there so we know bps are going out that way but what about these remaining two kay well we have to figure out who the destiny port is let's go back to our definition of the designated port I can find it that is I'm gonna get rid of that now let's get rid of that okay so remember the designate port is on any given cable the port that is closest to the root bridge closest via cost not geography not distance cost is the designated port so let's go back to our picture right here alright so let's take a look at this cable this switch here he says the best cost I can come up with if I want to win if I want to be the designated port the best cost I can come up with is my route port over here which is 19 so I'll tell my neighbor that's the best I can do the guy down here he'll say hmm isn't that funny because my route port is also 19 now if there had been a clear winner if one of these guys had obviously been had a lower cost to the root bridge than the other one we would be done whoever had the lowest cost he would take over the job on that cable of being the designated port here we have a tie alright well think about the tiebreaker process right what was the tiebreaker process if the cost was the same the first thing we did as a tiebreaker was we compared names we compared bridge IDs so that's what we're gonna do here these two guys are gonna look at each other's names so if we take a look at their names 3/4 C F F F one is lower than F F F so the switch on the bottom here he's gonna be the winner his cost is the same but he's gonna say I'm gonna win because my priority is the same as yours but my MAC address is lower than yours so he will be the designated bridge on that segment that designated port and he will go into the forwarding state now what about this up here well if we just do process of elimination right we've already determined that this is the route port so we're not gonna change that so process of elimination says hey a root port receives B PDUs RP receives a designate part transmits BP to you so clearly this has to be the designated part but if we just did it once again with with values with numbers start up by comparing costs right this guy here says hey my cost of the root bridge is 23 this guy here says my cost the root bridge is 19 we're done he's a winner the guy in the bottom 19 is our winner so this becomes our dozen T port and it goes into the forwarding state now I'll tell you a little trick whenever you have a point-to-point link like this where there's only two switches on the link if you've already identified one side as being a root port you don't have to bother comparing numbers if one sides a root port the other side is always a designated port that's just how it's always gonna work out if you got root port on one side you're gonna have designate part on the other side so that was step number three step number one once again to recap identify our root bridge step number two go to every switch that's not the root bridge identify their root ports step number three go to every single link and make sure there's a designated port if there isn't one figure out which side of that link will be the designated port and then step number four or whatever is left is gonna be our last port role if I can fit that in right here so we have designated ports we have root ports and now we're gonna have if I can fit in here non designated ports receives BPD use and a non designated part his port state is always blocking is in the blocking State so if I go back to this if we would look our topology here the only port that we haven't touched yet is this one right here so that's gonna be our non designated port I'll say nd and we'll put a B for blocking right there now one other thing to be aware of when it comes to blocking a lot of people when they first start learning about spanning tree they make the incorrect assumption that when a port goes in the blocking state nothing is training it out of that port and if anything comes in dropped killed that's not true blocking ports are still allowed to transmit control information for example they're still allowed to transmit Cisco discovery protocol CDP goes out of a blocking port the dynamic trunking protocol for trunking DTP the VLAN trunking protocol VTP all that TP stuff goes out of a blocking port that can be still transmitted and if any of that stuff comes in it is still processed blocking is just in reference to user data so no no telnet no web browsing no FTP TFTP none of that stuff can go out or come in a blocking port alright so with that so that is how you decipher a spanning tree topology so what I'd like to do now with our remaining few minutes is I would like to give you some topologies and give you like a minute or a minute and a half and see if you can figure them out I'm gonna give it to you and like as like a CCNA type question see if you can figure it out so let's get rid of this we won't do that one first all right so I'm gonna make that bigger so here you have a multiple choice question which ports in this topology will be blocking go through the four steps that I talked about and see if you can figure out in this multiple choice question which of these answers if any will be blocking I will give you one minute to work on this starting now now when you figure out the answer don't type it in otherwise you'll spoil the fun for other people so just keep your answer to yourself I'll give you 30 more seconds okay so let's go through it together so this one hopefully you quickly determine the root bridge as being 4096 that's the lowest priority so that guy is our root so we know that all of his ports are gonna be in the forwarding State so right there we can cross the 0/2 off the list that can't possibly be blocking all right then we identify our route ports if I start with the top switch I think it's pretty clear that 0 4 will be his route port okay so that's that's a gig link so that's gonna be a cost of 4 going the other way will be higher than 4 so this will be forwarding as a root port alright if we take a look at this guy right here well this is a Fast Ethernet link so that's 19 if he goes up and over that's 2 hops of gig which will be a total of 8 4 plus 4 so this will be his forwarding route port 0 6 is not in here 0 7 is not an answer so I don't have to worry about that if we take a look at this guy right here 24 666 once again his direct link as a fast ethernet which is a cost of 19 if he goes over and around that's three lengths of gig for 4 and 4 which will be 12 so this will be his route port okay so now we have to identify so that's step number 2 identifying root port step number 3 is identifying designated ports so I told you whenever you got a report you know the other side of that's always gonna be a designated port so 0 8 that is not correct that will not be blocking over here the other side of a root port gonna be designated so 0 5 can't be blocking now let's take a look at this 0 10 alright so 0 10 well that's not his root port because his root port is over here that on this wire that cannot be the designated port because the Disney poor is directly connected to the root bridge so by process of elimination this is our correct answer the answer see that was our blocking interface let me give you one more like this I'm going to take this off the screen here for a second so I can make a couple of tweaks to it all right so just give me one minute here as I make my changes it's one second all right same thing I'll give you a minute and a half to figure out this one these dashed lines in case you couldn't tell before these dashed lines are the gig links and the solid black lines are fastethernet so you have 90 seconds try to figure out the answer I have 30 seconds left alright times up go ahead and before I show you go ahead and type in your answers I so wanna see how many people came up with with something and if there was any variation in your answers Thank You Dimitri anybody else have an answer besides Dimitri don't be shy thank you Tony thank you crease on okay well let's go through this Thank You Arthur so hopefully everybody decided that this was our route bridge they also 32 768 0 to 3 3 well that's definitely lower than 0 to 4 5 so we can rule that guy out and then among these II D is lower than EF and certainly lower than f1 so that's our route bridge so here we have forwarding designated port designated port the same thing on this and same thing on this okay so we can rule out 0/8 that's not going to be blocking then if we do our route ports for this guy this will be his report because a total cost of 8 4 & 4 is lower than a total cost of 19 and we know the other side of a route port is always gonna be a designated port once again that's if it's a point-to-point link and on this bottom switch here oh let's take the top switch okay so his report will be 0 / 5 so we can't rule that out that can't be the correct answer and on the bottom switch here here's where you had to remember what do we do when we have a tie because the bottom switch said well I've got two links they both have a total cumulative cost of 4 to get to the root bridge so once again we go back to the bpdu first of all he looks at the BP do you see is receiving he says okay is ascending bridge ID different in either one of these BP to use the answer is no the stunning bridge ID is the same what about the sending port IDs he says ah yes they both have a priority of 128 but the port ID of 0-8 is lower than the port idea of 0 11 so I will choose this as my route port all right so now we have all of our route ports now let's go ahead and figure out so that's step number two step number three is every link has to have a designate or twel this one does these ones do okay there's no designate port over here so let's figure that out remember so it's gonna be a comparison of the cost of this guy and the cost of this guy this guy's cost to the ridge you can say well the best cost I have is 8 4 plus 4 that's the best cost I can come up with this guy here will say hey the best cost I have to the root bridge is 4 it says my cost is 4 my cost is 8 therefore I am the winner I'll be the designated port and I'll go forwarding so C is incorrect that will be forwarding so 0/3 will end up being blocking but that's not one of our answers what about this link right here zeroes 2 says hmm I can't be the root port because that's already been determined on this link there's already a designated port so I can't do that so I guess I have to be blocking that's my only choice so a was the correct answer now let's do one more of these and then I'll take any questions our left and then we will wrap it up now this next one is not going to be multiple choice this next one you're probably gonna want to open up you're some sort of screen capture tool like windows snipping tool or something this is more of a you know being able to figure out topology is one thing but being able to actually utilize spanning-tree to predict what path will be taken between any two end points that's a much more useful skill and that's what I want you to do right here so your question is what will the path what path will Ethernet frames take between PC a a and B B we know that in this topology there's only gonna be one path that's forwarding all the way through from one point to the other and once you identify that path you've answered this question so what I would recommend that you do is use some sort of capture tool like windows snipping tool I'm gonna do that right here and maybe with windows snipping tool just do a screenshot of this real quickly and then you know use the pen or something and just Mark out what you think the path is gonna be I'm just making that up right there and then compare my answer with what you come up with okay all right so that being the case I'll give you two minutes to work on this final question you yeah 30 more seconds okay so let's let's work through this one so they all have the same priority so we look at our MAC addresses they all have the first word in common 0 0 1 e and then we take a look at the second word so FC FB F D and F F so FB is lower than all these other ones right here so this will be our oops our root bridge so we'll just mark all of his ports is forwarding okay then we look for Route ports right here we can tell pretty quickly that his direct connection of gig is gonna be his route port that's a cost of for any other path will be higher than that so that will be his report when we take a look at this guy down here his report I think we can safely say it's gonna be one of these fast ethernet links right here which is nineteen any other path he takes is gonna be something higher than 19 and because the cost is the same he's gonna take a look at the beep use he's receiving and the BPU he received with a sending port idea of 5-3 is gonna be preferred over the BPD with the sending port idea of 5'4 so this will be his route port and if we take a look up here at this guy I think we can tell that this is gonna be his route port because 4 + 4 is 8 + 8 is lower than 19 and we know the opposite side of a route port is always a designated port and we're done we don't even have to figure out the rest of the topology so now we know oh and by the way you might say well what about a port that's going to a host well if he just due process of elimination that can't be a route port because we're not getting any BP to use on there it can't be blocking because if it was if it was blocking this host would have no network connectivity at all so it has to be designated port supports leading the hosts are always designated ports but now we're finished we know that between a a and B B there is only going to be one path that's open end to end and if I let's see here it's a little bit larger we can see that in this case the path look like this went through here then up through here and then over through here [Music] up through here and then across every other link was blocking somewhere so that was the solution to that review question so at this point I think you guys are gonna be experts at figuring out or deciphering spanning tree topologies before we bring this session to a close as anybody have any residual questions for me all right well I don't see any other questions coming in so I'm gonna bring today's session to a close I will look oh I will keep the the YouTube live session up for another five or ten minutes so if you do want to post any additional questions or comments in those 5 or 10 minutes I will be able I'll do my best to respond to them but I'm gonna close out the video portion right now so thank you everybody for watching today hopefully you feel a lot more confident with your knowledge of working through spanning-tree and I wish you the the best of luck when taking your CCNA or CCNP exams and keep in touch watch out for future shows that will have in the future so have a good weekend everyone you you [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] you [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music] [Music]
Info
Channel: INEtraining
Views: 11,422
Rating: undefined out of 5
Keywords: ine, internetwork expert, keith bogart, cisco, ccna, routing & switching
Id: ZFzD6iGaRcc
Channel Id: undefined
Length: 170min 10sec (10210 seconds)
Published: Sat Feb 17 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.