CCNA Quiz: Spanning Tree Explained: Which ports are blocked and why? CCNA | CCNP

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] can you answer this quiz question which ports in this topology are blocking if you need some time please pause the video at this point and see if you can answer this question we've got five switches in this topology which ports are blocked by spanning tree okay so let's see if we can answer the question practically I have both of this topology ingenious three I've configured the switch priorities and the switch MAC addresses now in spanning tree the first thing you need to determine is the route switch which switch is the route switch that will affect which ports are blocked in spanning tree now first a bit of history spanning tree was developed to stop the loops originally in transparent bridged networks if you remember the predecessor or the ancestor if you like two switches were bridges bridges or what are called transparent bridges flood unknown unicast traffic broadcast traffic and multicast traffic a layer 2 switches do the same thing so switches still act like bridges of years ago they just do things quicker or faster so if you have problems in a bridge network you would have the same problems in a switched network they would just happen more quickly switches use a six or application-specific integrated circuits to forward traffic very quickly using hardware whereas bridges used to do things in software now why is that important in a transparent switched Network which we have today the loops are a problem as an example if a PC was connected to the switch and sent a traffic to the switch and let's say it's a broadcast frame and it arrived on let's say port Gigabit is zero for not shown in this diagram but let's assume that a PC sent traffic to the switch the switch would flood the broadcast out of all ports the broadcast that went out of this port would be flooded by the switch which would be flooded by the switch and in other words a single broadcast now comes back to the switch on two ports but in addition that single broadcast is flooded by switch 3 out of both these ports it's then flooded by the switch out of both these ports it then arrives as multiple broadcasts on gigabit 0 to back on switch to so switch to received a single broadcast on gigabit zero 4 that's now been flooded through the network and multiple broadcasts are now received by switch to that process will continue we'll have a loop here in the network we also have a loop here we have a loop here and we have other loops which essentially can result in a broadcast storm and can bring down the network spanning tree needs to block ports in the network to ensure that there are no loops in a transparent bridged or transparent switch to network as we have today so again the first step is to determine the route switch in the topology which switch is the route of switch that's based on the bridge ID which consists of the switch priority and the switch MAC address the lowest priority wins if the priorities are equal then a tiebreaker is done based on lowest MAC address so in this topology the switch switch to switch 4 and switch 5 have the lowest priorities so we need to determine the route switch or route bridge based on the lowest MAC address this MAC address is higher than this MAC address which is higher than this MAC address so switch 2 will be the route switch in this topology so I'll write a route here to denote this as the routes which I'll change the text color to let's say green so that we can see that this is the route switch so roots which is that the next step in spanning tree is a determine the route ports all switches which are not the route to switch have a route port which is their best port to use to get back to the roots which now that's based on path cost each switch will determine its route based on the path cost in other words the lowest path cost to get back to the route if I was driving from San Francisco to Los Angeles I probably wouldn't drive via New York it's a longer path I'll drive directly from San Francisco to Los Angeles so the same principle applies here notice all these links have the same speed so they will individually have the same path cost now the path cost of these links is for using the current version of spanning tree I don't want to show you the show commands yet because it'll give away the answer so let's see if we can work it out manually and then I'll show you the answers using show commands basically his best path is this link cost a fall rather than going this way which is a cost of fall and then rounded this way which will have a total cost of 8 or going right round which will have a cost of 4 plus 4 plus 4 plus 4 so from his point of view best path to get to the root bridge is via gigabit zero 0 so this will be the switches root port now what about switch 3 it can either go this way that's got a path cost of 4 this is a path cost of force are going that way is 8 it's quicker to go using one of these lengths now the switch can't use path cost to determine which port to use to get to the roots which path cost of both of these links is the same so we need something as a tiebreaker between those two ports the way spanning tree does that is based on neighbor bridge ID a neighbor with a lowest bridge ID will win that doesn't work in this example because both of these links are connected to the same neighbor switch in other words switch to the next decision is based on priority lowest priority wins so what are the priorities of these two links by default to the priorities 128 so if we look at - switch - we can see the priority of the links by topping show spanning tree so notice gigabit is 0-3 gigabit is 0-1 this is on switch 2 again these interfaces have a priority of 128 notice priority over there 128 on both these links so priority can't be used as the tiebreaker so the next decision criteria is based on interface number the lowest interface number ones so gigabit is 0-3 this interface has an interface number of 4 in the output here this interface gigabit is 0 1 has an interface number of 2 this is a lower interface then this interface so this interface will be used as the best path to the root bridge so on the other side of the link that's gigabit 0 1 so if i duplicate to this this is going to be the root port to use to get to switch to and let's verify that so on switch 3 here's switch 3 show spanning tree notice the root port is gigabit as 0 1 in this output so this interface is the root port it's the best port to use to get to the roots which so that's correct for our calculations now one thing I'll point out here based on feedback that I've been given is on switch - if I went on to gigabit zero 3 notice the current priority is 128 switch 3 currently has gigabit is one as the root port so what I'm going to do on this interface is type spanning-tree various options here that let's type port priority and I'll make this priority 64 needs to be in increments of a 32 so I've lowered the priority of this interface previously switch 3 had its route port set to Gigabit a01 type show spanning tree again notice root port is now gigabit 0 3 the root port has moved based on the priority so the priority of the neighboring switch or upstream switch in other words the switch closer to the roots which determines the root port of the switch so notice the root port is now changed to gigabit a03 that port is now forwarding and gigabit zero 1 is now blocking if I set the priority back to the default so notice show spanning tree priority is back to 128 what we should notice is the root port switches back again so currently gigabit zero 3 is the root port but after a while as you can see there the port has transitioned to a blocking port this port is back to being the root port in the topology so the neighboring switch priority or neighboring switch port number determines the route port of the switch now on switch for this is fairly easy the path cost share is 4 if we went this way it would be 4 plus 4 plus 4 which is 12 so this is going to be the route port that's a simple calculation what about on such 5 notice path cost here is 4 plus 4 which is 8 path cost using either of these links is for either of these links is 4 so that's also 8 you can't use the path cost as the determining factor so we need to use something else and again the neighboring bridge ID determines which port is the route port the switches priority is lower than the switches priority so one of these two ports is going to be the route port and then we look again at the priority and the port number the lowest port number wins so I would say that this port is going to be the route port but let's prove that so here switch five on switch five shows spanning tree notice gigabit as 0 1 is the route port so we've worked out the routes which we've worked out the route ports the next decision is to determine the designated ports that's a done per interface or per link or per segment so this is a physical link that's a segment this is a separate physical link that's another segment it's on a per segment basis we need to work out designated ports designated ports are the best ports to use to get to the root bridge when you're on that segment now all ports on the route bridge are designated ports you can't get closer to the root bridge then the root bridge itself so you can immediately say that all ports on the root bridge are designated ports think about it this way if I were sending traffic to the root switch on this link the best way to get to the routes which is via this interface and something I like to use is imagine that you had a PC on that link this PC doesn't exist but for the moment imagine that I had a PC in the middle of this link which is the best way to get to the root bridge on this link it's going to be easier to go this way than it is to go right round so this is a better path than going round but you can immediately just say that all ports connected to the root bridge are designated ports once again if I had a PC in the middle of this link it would make more sense to go this way to get to the root bridge than to go right round okay so that's simple but what about these links again just imagine that you put a PC in the middle is it easier to go this way path cost is 4 so that's 4 plus let's say 1/2 to 6 so 4 plus 2 is 6 to go left do go right would be 2 plus 4 plus 4 so that would be 10 it's going to be quicker to go left rather than right so these would be designated ports on these links is it better to go this way or is it better to go this way kostya is let's say 2 for half a link plus 2 is a cost of 6 this way would be 2 plus 4 plus 4 that would be 10 it's going to be quicker or better to go this way so these are designated ports on that on those segments now here's an interesting one is it better to go this way or is it better to go this way notice this has a cost of 2 so half of the link this has a cost of 4 so that's 6 this has a cost of two both of these have a cost of four so it's also six so we can't use path cost as the determining factor for this segment or for this link remember the analogy is this PC is in the middle of the link it doesn't exist it's just a way to work it out so going left is six going right or six you can't use path cost as the determining factor we have to look at the neighbor bridge ID neighbor bridge ID here is three two seven six eight this one is 16384 this has a lower bridge ID this number is higher than this number so the designated port is going to be this one not this one this has a lower priority once again than this switch switch three is going to be the switch used to get to the root bridge so this will be the designated port once again so I can delete my PC because I don't need it anymore I've looked at every segment and got designated ports so again if you using common spanning tree or the older version of spanning tree you choose one root switch per topology if you're using per VLAN spanning tree you choose one root switch per VLAN so in this example let's assume you're using VLAN one this would be the root switch for VLAN 1 then per switch that's not the routes which we choose one root port for that a VLAN so for VLAN 1 switch 4 has this as its root port switch 1 has this as its root port switch 3 has this as its root port switch 5 has this as its root port and then on a per segment basis we need to choose a designated port so on every link or every segment we need to choose a designated port we've done that now so all other ports get blocked now again this is this can be pervy LAN if you using per VLAN spanning tree you can change which ports become the route ports designated ports and so forth on a per VLAN basis but based on what we've done here seeming only one VLAN these ports will get blocked and let's see if we got it right so let's start with switch 1 switch 1 you can see the answer there gigabit is 0 1 is an alternate port is it's blocking so that's a blocking port using Cisco terminology so again there's the output that port is blocking what about switch 3 on switch three shows spanning tree gigabit zero three is blocking that's known as an alternate port just to reiterate gigabit zero zero is a designated port we can see that there gigabit zero 1 is the root port that's correct both gigabit zero two and gigabit one zero are designated ports the blocking port is gigabit zero three as we can see over here so we've worked that out properly let's look at such five switch five show spanning tree again gigabit to zero zero is a designated port that's not used in the topology gigabit zero 1 is the root port gigabit is 0 2 0 3 and 1 0 are blocking ports now this is the problem with common spanning tree or the old version of spanning tree this switch has 4 links but only one of them is being used so what you can do with per VLAN spanning tree or rapid per VLAN spanning tree or multiple instant spanning tree is do a bit of a load balancing or load sharing because it's not pure load balancing you could make the switch the route for some VLANs and this the root for other VLANs so that some traffic is sent across this link for let's say odd VLANs and other traffic is sent across this link for even VLANs you can even do more work and then get load balancing across multiple links like both these links or both of these links again it's not load balancing as in per packet load balancing its load sharing because as an example you could have a VLAN for phones where and where some traffic is sent but then in data VLAN where even more traffic is sent so it's not equal load balancing you're kind of sharing the links between different VLANs this is not a great design this design or this lab is just used to teach you how to work out which ports are route ports designated ports and blocking ports okay so there you go we've worked it out that's the answer to this quiz question I hope you enjoyed this video if you did please like it please if you don't mind subscribe to my youtube channel if you haven't already that really helps me I'm David bumble want to wish you all the very best [Music] you [Music]
Info
Channel: David Bombal
Views: 12,605
Rating: 5 out of 5
Keywords: CCNA, ccna, gns3, STP, spanning tree, spanning-tree, root switch, root ports, designated ports, blocking ports, switching, briding, CCNP, CCNA Training, CCNP Training, CCENT, ICND1, INE, CCNA Study, CCNP Study, cisco ccna, cisco, ccie, icnd1 exam, infrastructure, icnd1, ccna training, ccnp, cisco certification, david bombal, GNS3, gns3 labs, gns3 tutorial, how does spanning tree work, stp, spanning tree protocol, ccna routing and switching, ccna exam, ccna lab, gns3 ccna
Id: ZV3sIZAtaz4
Channel Id: undefined
Length: 20min 29sec (1229 seconds)
Published: Mon Mar 04 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.