STP Load Balancing | Cisco CCNA 200-301

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] and welcome everybody to another Wednesday livestream regarding CCNA it's great to have you I've been tweaked in my office making little things a little bit better hopefully so great to have you here our focus for this session in the world of CCNA is the concept of load balancing with spanning tree now a lot of times companies are going to have and our objectives are three basic things number one I wanted to touch on STP spending tree protocol to remind us how that works just briefly and then secondly take a look at how we can you know map or change the path that is taken by VLANs as they go across layer to network and the reason that's important is because most of that bandwidth a lot of it it's just sitting there not ever being used unless we manipulate it with spanning tree so let's go to the topology and take a look at the diagram do a quick review of spanning tree and then we'll get right into how we can improve spanning tree by doing load balancing and having some VLANs take one path and having other VLANs take another path so we'll use this topology right here and let me go ahead and get out of pen I have a pin and I'm not afraid to use it here we go um let's in fact let me just do this let me bring up another layer and let me use it color like this let's just do a quick reminder of spanning tree so here on this bottom left I have a table that's showing these five switches this is just a replication of those switches so there's five switches here and the switches have these base MAC addresses now one of the things we discussed in our previous livestream on standing tree was that spanning tree is going to elect a route and that route is going to be the device that has the lowest bridge ID and the bridge ID is made up of three basic parts one the priority value which by default is the same on all these switches and then the VLAN plus the VLAN number and then the base MAC address so in this case the one that has the lowest base MAC address is going to be the root bridge for spanning tree so I'd like to pause just for a moment and have you based on this information here these base MAC addresses for switch one two three four and five can you tell me by default if we're using the default priorities which one or one's of these well which one of these switches one two three or four or five would be the route switch for VLAN 10 by default if these are the base MAC addresses right here for those switches so take a moment think that through and you can go ahead and type in that answer if you would in the chat just type in switch ones or switch 2 or switch 3 or switch for search 5 whichever one you believe would be the root bridge in the world of spanning tree and I'll give you just a moment to do that also for those of you who have not been to the session on spanning tree we did it is in the master playlist so feel free to take advantage of that it's there in my channel on YouTube it has a whole section just on spanning tree all right I've got answers coming in Mohamed is the first one I see spot on Mohamed is saying switch 1 switch 1 would be the root bridge for spanning tree and that's because based on all these MAC addresses that to in that position right there means that switch 1 has the lowest base MAC address which means switch 1 has the lowest bridge ID and they would be the root and I I totally agree let's let's take a look and see so I have this topology built let's go ahead and bring it up so here switch 1 if we do a show spanning tree in fact let's do this we could you show spending for tree for VLAN 10 that'll work but we could also we can also do this we could also do a show spanning tree and just say show spanning tree root and that'll show us all the root bridges for all the instances of spending treat that are currently running so let's do that was to show spanning tree and instead of saying first specific VLAN let's go ahead and say show spanning tree root press enter and this is saying which is pretty darn cool by the way this is showing us that we have 1 2 3 4 5 VLANs and we have 5 separate instances of Spang tree and sure enough the root is this guy for all of them so it's got the it's a 200 is that the right MAC address hold on a second let's take a look at our diagram doot-doot doot-doot doot-doot doot-doot yeah there we go so the one ending in a 200 is the MAC address of the switch 1 so switch 1 is the the root for every single one of those VLANs alright so why does that matter and why do we care well if switch 1 is the root let's work through what the path would be and I'll use a slightly different layer and a slightly different color for this let me bring up another layer and let me use let's use red so if switch 1 is the root which it is we just saw that if this is the root for all the all the spanning trees then these ports here off of the root would all be forwarding those be designated ports so be designated here and also the port going up to 0 0 for PC one that also be a designated port so far so good and forwarding and that's because the roots which gets to forward on all this ports all of its ports are forwarding away from the root and that's what a designated port is the designated port is forwarding away from the root and then as we take a look at switch 2 and switch 3 all these links are gigabit and from our discussion previously on spanning tree switch two would have a single root port that's the pork that is forwarding towards the root and so would switch 3 you'd have a root port that's forwarding towards the root and then we have this segment here now this segment here between switch 1 and switch 3 our switch to insert sorry that's that's kind of tricky because you can only have they're both forwarding away or they're both going away from the root not towards the root and you can only have one designated switch per segment so it's either going to be switched to or switch 3 forwarding and so they would Duke it out and if you recall they're gonna Duke it out based on cost so switch 2 and switch 3 are gonna say which one of us has the least cost and then that one has the least cost to get to the root is gonna win but in this case if we take a close look here at switch 2 and switch 3 they both have the same cost to get to the root because they're everything's gigabit here and so between them if if switch twos costs is 4 which it would be to get to the root and switch threes cost is 4 to get to the root then the next tie breaker is the lower of the two bridge IDs so if we go down here to this take and we look at the bridge IDs for switch 2 and switch 3 we can see here the 7 right there is a lower value than C in that same position that's hexadecimal C and as a result switch to would win that election and it would go ahead and it would become the designated port for that segment so to be designated and that means switch 3 has to go ahead and block again this is a review of the spanning tree video we had previously if you want to catch that later now for the rest of this network for this switch switch 1 we can route we would have let's see gig 3/0 on switch 2 would be designated and that's because well well take a look at the other side of this switch for has to make a decision on which is going to be its root port is it going to go up to switch to or is going to go over to switch 3 and because the cost is the same in both directions switch 4 is gonna say well I'm gonna choose the path for my root port that has the better bridge ID and switch to still has a better bridge ID then switch 3 so this would be the root port for a switch for and as far as this segment here switch 3 would be a designated port and our switch for import 2/3 would be blocking this is this is an abbreviated fast version of our longer discussion in the live stream so so far so good let's take a look at the rest of the topology and then switch 4 would be designated ports 4 here so designated designated forwarding away from the root and then on switch 5 it has to make a decision okay who's gonna be my report says switch 5 and way forward on 3 3 or device forward on to 2 and the type unfortunately the cost for coming from switch 4 is the same on both links and the bridge ID is switch for both times is being sent it's the same and so the advertised lowest port priority would win and because the port priorities are all a default of 128 then it ties the tiebreaker is the lowest sending port ID so 1/1 is lower than to 2 and as a result that's why switch 5 would choose 3 three where it heard that advertisement as a root port and it would go ahead and block on 2/2 alright so spanning tree fun fun game to play lots of details going on but that's how it works and also the switch five would be designated on gig 0 0 where PC 2 lives and before weeding there so I'd like to to pause here for a moment and play a little game and the game I'd like to or am I looking here we go the game I'd like to play is what would the path be if pc 1 up in the top left hand corner was gonna forward a packet and at layer 2 that would equate to a frame to PC 2 what would the path be and I'd like us to walk that through and then verify it by going to the interface and verifying the MAC addresses that show up so let's do this might well are based on the math we just did the path would be like this and I will put this in a slightly different color let's use let's use kind of an orange color so if PC one sends a frame the frame should go because here's the route ports it would go from here to here oh man that's gonna look ugly let me fix that control-z there we go and use a different color he's black because we visible better so the path would be from here to here to here to here to this PC so we'll call this path a and that's based on how spanning-tree calculated the layer 2 path based on our switch 1 being the root now we can we can prove that and here's how we could do it over here i've got mac addresses so here's pc one has a mac address ending in six eight zero zero and what we should see is that switch one learns that on gig zero zero and if this is path a that's being used switch twos can learn that MAC address on one one and switch 4 is going to learn that MAC address on three one or these these links and then switch 5 is going to learn that on three three so I'll put little dots there so we should learn PC ones MAC address here here here here and one of the reasons that I'm I'm doing that also in this demonstration is because when I was first learning spanning tree and trunking and VLANs it didn't really sink in that a MAC address from like a PC one would be learned on many different switches as that frame traveled through many different switches and then after all those switches learn where that layer to address lives they can then make forwarding decisions based on that layer to address so for fun I propose we take this topology we look at that MAC address we send some traffic and then we verify that indeed each of those switches has learned that MAC address on that respective interface and that will also help us verify the entire path at layer two that that frame is really taking when it goes through the network all right so let's do that let's go ahead and let's go to the live interface boom right there and let's send some traffic so from pc1 I'm gonna go ahead and do a ping to 1010 0.11 which is PC twos IP address and PC two is also in VLAN 10 which is down and off switch five so that works that's great let's take a look at where that MAC address is now going to show up and then we can also verify the Mac here we do a show IP on this little virtual machine so there's his MAC address ending in six eight zero zero so let's go look for that on switch one so one way of doing that would be show MAC address table like that that works but it was like well there's lots of MAC addresses how can we thin that out we could do a show MAC address table for VLAN 10 and that would thin the herd a little bit but pc1 & pc2 are both in VLAN 10 so what we also could do is just to a show MAC address table VLAN 10 to a pipe and then say please only show lines that include and we can specify the MAC address that we're looking for which is this bad boy right here so I don't want to scare anybody off here I just want to point out that this command is just a handy way of searching specifically on each switch for just that MAC address that way we can focus on okay where which interface did this switch learn it on so let's go ahead and do that so show MAC address table for VLAN 10 include that MAC address and press enter and this is saying on switch 1 I learned this on gig 0/0 let's take a look at our topology so in our topology sure enough right here PC one in the top left it learned that on gig 0 0 and then if we got a switch 2 it should learn that MAC address that same MAC address on port 1/1 and we can verify that right now by taking that same command which I will highlight here and let's go to switch 2 and paste it in oh I did include my exclude let's fix that here are my include airs the command right there so we'll take that go to switch 2 and this is switch 2 saying yeah I learned that on gig 1 1 which is what we predicted and then switch 3 it should learn this well yeah switch 3 is not in the path but it also did learn the MAC address and that's because a broadcast was sent and the connection if we take a look at it the connection here between switch 1 and switch 3 that broadcast would have been forward down here on this link between switch 1 3 so switch 3 if he if he knows the MAC address it should should have learned it on 1/3 so we can verify that as well as we go through this network so we'll go to switch 3 give the command and sure enough once last 3 is it and then if we go to the switch 4 so he's forced to learn it on 3/1 which it did and then if we go to switch 5 which is our last switch in the path it should have learned it on port 3/3 and all that does it just Garan it just helps us to confirm what our path is through the network so that's all we're doing we're just confirming what the path is through the network and verifying that the MAC addresses are learning the interfaces that we thought they would be now for the problem check this out if that's our path for VLAN 10 and we haven't tweaked anything or changed anything that's also going to be our path for VLAN 1 and VLAN 20 and VLAN 30 and B than 40 and any other VLANs we have if we're trying to go from switch one down to switch five and this path here I'll go ahead and put a slightly different color this path here this goes from switch one to switch three to switch for that bandwidth right there it's not being used so it doesn't make too much sense to put all our eggs in one basket because we're having half of our you know several links that are absolutely not being used and we can verify that by going back to the interface and just doing a show VLAN our show spanning tree for I'll show the root bridge and this just confirms that yeah switch one with this base MAC address they're part of the bridge ID it's the same root bridge for all those VLANs these five different VLANs so what we can do to solve that is be you know um see here's what I think because because we have five different instances of spanning tree all running and they're all communicating in turn else with rapid spanning tree and the older traditional 802 at one D as far as Cisco's implementation of it with which is provailen spanning tree we we could go ahead and simply tell one of the other switches like maybe switch three that it's the route four spanning tree for VLAN 20 our VLAN forty and then for those VLANs the traffic would go down that path so we could have VLANs 10 and 30 for example go one path and if you then it's 20 and 40 go another path just by manipulating which switch is going to be the root bridge for those other VLANs and and because we're already running spanning tree there's not a lot of overhead or doing is simply carving out whose give me the route for a specific VLAN and choosing this specific switch we want to be that route so let's take a look and here's what I propose we do I proposed as like get a new color out and a new layer there it is alright I propose and we use blue for this I propose that instead of using the same path a for everything that we carve out a path B that some of our VLANs can use so if we have pcs and then let's just go ahead and we'll call that path B now to use path be what we can do is instead of having switch one be the root for everything we could have switch three be the root bridge for and let's just pick on VLAN 20 ok have switch 3 be the root for VLAN 20 now here's the interesting thing at least I find this very very interesting is that once we tweak or modify the spanning tree the physical topology doesn't change but logically behind the scenes we are absolutely causing different traffic patterns based on who is the root for a specific VLAN so in this discussion let's go ahead and make path B well may our make switch 3 as I look at it switch 3 the route for VLAN 30 VLAN 20 and then let's go ahead and calculate if we do that calculate the path from a PC that's in VLAN 20 as it communicates with another PC PC 6 in VLAN 20 so if this guy is a root let's play the game called whose forwarding and who's not and what role do you have and it goes something like this root bridges they get to forward on every port and when you're forwarding away from the root that's referred to as a designated port so if switch 3 is the root for VLAN 20 then regarding VLAN 20 this port would be a designated port once last 3 would be a forwarding designated port 2 slaps one would be a designated forwarding port great and then if you had access ports also in VLAN 20 maybe it would be designated for those as well and then we got all the losers what do you mean Keith losers well a loser is a switch that didn't win the spanning tree root election for a specific VLAN so here as we talk about VLAN 20 all the other switches except for switch 3 are the losers so all the losers have to identify one and only one root port that's the port they're going to use that has the best cost to forward traffic in the direction of the root bridge so root ports forward towards the root bridge designated ports forward away from the root bridge and so on switch 1 the if all these links are gigabit which they are this would be the closest cost this be the least right here and there would be a root port forwarding and let's put in our root ports first and then switch to that would be a root port forwarding and on switch for this would be a root port forwarding now up here based on which of these two switches is going to be designated for this segment switch one has a lower cot Wow check it out yeah this is great this is this is a very very good discussion so switch one and switch two they both have the same cost to get to the root so their cost is gonna be for each cuz they're only one gigabit link away from the root so when they Duke it out say who gets to be designated for this segment switch one switch to are both saying my cost is for my cost is 4 yeah it's a tie we get it so the next high breaker is if the cost is equal the next tiebreaker is who has the lower bridge ID so let's take a look at who has the lower bridge ID in this topology switch 1 has a base MAC address ending in two 8 a 2 0 0 and switch 2 has a base MAC address ending in 7 2 so switch one has a better base MAC address which makes it a better bridge ID if all the priority is set to equal and as a result for this segment right here switch one would be the designated port it would get two forward and switch two would say bum or let's say spelled bummer with an X it would be blocking because you can't have every non routes which gets one root port exactly and every segment gets one designated port exactly and then everything else is going to be blocking so if we go down switch 4 and switch 2 we have the same scenario switch 4 and switch to both say hey regarding this segment between us we have a problem we need one designated port and they they start to compare their cost switch to says I have a cost of 4 to get to the root switch 2 says I have a cost of 4 switch for says I've Kosta 4 because everything's gigabit and as a result what they'll do is they'll say well that's a tie so who has the lower bridge ID so then we go to switch to and look at its base MAC address as part of its bridge ID which is 7 to here and switch 4 is fours so here switch four has a lower bridge ID than switch two and as a result this port right here would be designated in forwarding and this port on switch 2 would be blocking and then going over to the right that story doesn't change designated designated both forwarding and switch 5 is gonna choose the path with the least cost they're equal it would then choose based on the lowest bridge ID switch 4 is advertising the same bridge ID for both of those ports our both little segments and then it boils down to the lowest advertised port ID which which is a combination of the port priority which is default of 128 and then the port ID so one one looks better to our to a switch 5 so it would be a route port here and that would be blocking here and then on this porc 0/1 switch five would be a designated port that goes up to pc six and switch 1 up here would also be a designated port for that as well now if we did that the path that should be taken then if we follow the trail here would be this and I'll put it in a nice yellow color this would be the path our path B and it's going off that top link there all right so if we made switch 3 the root bridge for spending for you for VLAN 20 traffic for VLAN 20 off of switch 1 going to devices in the same VLAN switch five would be using path B and that my friends is how we do load balancing that's the concept of how we could do load balancing in spanning tree by simply manipulating controlling which of the devices is going to be the root bridge so let's do that let's go to switch 3 and make it the root for VLAN 20 so we'll go to our interface and we'll go to the right switch which is switch 300 there we go oh that was gonna lock up on music now I want a demo all right nobody touch switch 3 back in there what needs to go right there alright so here on switch 3 let's do a quick show spanning tree for VLAN 20 let make sure that it's not the root so for VLAN 20 this device has a root port it's not the root bridge we can also a show spanning tree root that'll also confirm that switch 3 which has the base mac at the base mac address ending in four four zero zero is not our root bridge for anything is still switch one so we have a couple options here to control that will go into configuration mode and we need a spanning tree and we're focusing here on VLAN 20 so we'll say spanning tree LAN 20 and then our options for modifying that would be we could give it a better priority something lower for VLAN 20 then 30 to 32 thousand 768 because it's VLAN 20 it added 20 to that so we can do that or we could just say spanning tree for then 20 root primary and what that does is the fun little game what happens is this switch switch 3 says I know what the root bridge ideas for VLAN 20 I'm listening to those BP to use I know what it is and what I'll do is I will lower my either the I lower my value in the priority and I'll win so we don't have to know exactly what it is the current one because the switch does and it will change the priority to a lower value and it'll become the new root so let's go ahead and do that we'll press Enter and then if we do I do show spanning tree root check this out B then 20 look at that look at that last 4 digits of the bridge ID which is based on the the base MAC address it is now the root for VLAN 20 and as a result our path through the network should now be this one for VLAN 20 and we can verify that by going to PC to right here and on PC 2 if we look down at our table PC 2 has a MAC address ending in six eight zero one let me change my color there right here six eight zero one so if this is the path that's being used we should find that MAC address in the path we should find out put a little dots there we should find it on gig zero one on switch one for VLAN 20 we should then find it here on 1/3 on switch three we should find that MAC address here on 2/3 on switch for and on switch five we should find it on 3/3 based on that path and that would also confirm the path that we are literally taking as we forward unicast frames through this network so let's test it with that MAC address in mind and again six eight zero one let's go to PC two which has the IP address of 1020 0.20 and will ping PC six on the other end of the network at 10.20 0.21 and we'll hope it works and if not if it doesn't work we'll turn this into a troubleshooting exercise either way it's gonna be freaking fantastic okay so let's go to PC 2 and we'll do a show I yeah show IP on this device just to verify its MAC address you're enough six eight zero one and then we'll do a ping out to 10.20 dot zero dot twenty one which is pc six on the other end of the network and that works so that's a good sign also these times I have an emulated environment so you normally at layer two forwarding with hardware it'd be very very very fast in any event we got our connectivity and now let's go find the MAC address so we'll go to switch we'll start a switch number one and we'll hit the up arrow key and we are looking I'm gonna modify this a little bit we're looking for mac address 6801 and we want to include VLAN funny so this is showing up on gig zero one which is perfect I will take that command and let's go ahead and peek it switch to now as we take a look at our topology switch two should not be learning this MAC address on 1/1 because it's blocking on that port so even though switch one might send frames and it will down that port switch 2 is not going to be processing or interpreting user frames so switch two should learn about that MAC address of PC 2 on its gig to slash 0 that's where we'd expect to see it so even though it's not in the path for this unicast traffic PC two's initial broadcast when it didn't ARP was sent to everybody in the VLAN and that's why I switched to would have learned it on to 0 so let's go to switch 2 and we'll right-click and there it is to 0 fantastic and then let's go to switch 3 and we'll look at the topology to confirm around we're on switch three so switch three we'd expect that to be learned PC twos address to be learned on 1/3 so we'll cross our fingers they're perfect 1/3 and then I'll switch four we'd expect that to be learned on and taking a look as my memories not that good anymore so switch 4 we expected to be learned on 2/3 right there so we'll go ahead and try that out and perfect and then I'll switch 5 I remember where that one is that one is port no I will look anyway so on switch 5 we would expect it to learn that on port 3/3 because that's this route port so we'll go ahead and there it is I just wanted to confirm that indeed it is showing up exactly where we thought it would on each of the each of the switches now that does a couple things for us it's a little bit sneaky one is I wanted to confirm with you about spanning tree and how it selects root and then we have designated port flowing away from the root and we have on the non root switches we have one and only one root port and then we have one designated segment for each you should network segment so it can't be two designated ports if we have two ports that want to be designated they Duke it out whoever as lowest-cost wins if the cost is the same whoever whoever has the lowest bridge ID wins and that pecking order has been reinforced here so we then took a look at all the ports for you know how the path would be we then change the spanning tree root for VLAN 20 we made switch 3 be that route and then as a result the path B was being used then we traced that MAC address from PC to all the way through the network so let me check my notes number one I wanted to review with you about some basic spanning tree mission accomplished number two I wanted to verify in the path where the MAC addresses would be learned based on the path that was being used and third we want to solve the problem of having all of our VLANs if we had 100 VLANs by default they're all using the same path every single time because we have one by default one root bridge for all the VLANs so in Cisco's implementation of spanning tree Cisco implements the basics which cisco sees it as I Triple E if you do a show spanning tree it shows I triply but what it really is is per VLAN spanning tree with a separate instance of spanning tree for each and every VLAN for convergence issues we then go to something called 802 dot 1 W which is rapid spanning tree and it converges better has some of the tips and tools that the Cisco enhancements brought in like backbone fast and uplink fast and some faster convergence and agreements between devices and then although we're not going to focus on it here in CCNA I did want to make you aware that if somebody has a hundred VLANs do we and we only have a couple different paths we want to take do we really need like a hundred separate instances the spanning tree all running over now it's just like it's like needing two apps and running a hundred apps just because that's the way it works by default so to solve that we have an option called multiple spanning tree and with multiple spanning tree we run two or three and however many instances you need a spanning tree and then we just say hey be close 20 30 40 50 60 70 you will use this instance they say great and so the routers have a lot less workload because they may have two or three or four instances of spanning tree instead of a hundred and then we just tell the switches which VLANs are going to be using which instances and it's good to go so come see me an encore for all that and we'll talk about that in detail and that that was what I wanted to cover today I wanted to talk about load balancing with spanning tree and we've done it so here's what I plan to do I'd like to go ahead and close off the stream but for those of you who are here live I'm gonna go ahead and stick around and we can do some QA so I'm gonna play some closing music but please don't go away if you want to chat and you can catch the entire playlist at on youtube by simply going to my page and you can go ahead and just go the best or playlist night put all the videos there step-by-step so they're in order so whether it's subnets Sundays excuse me subnets Saturdays or whether it's our streams on Wednesdays or Sundays I put them in the playlist you can enjoy them there yeah so enjoy those and I'll see you in just a few moments for some Q&A if you have it and as always I really appreciate your participation you being here and I'll see you in the next our livestream coming up soon thanks everybody [Music] don't get it out what you put in all in [Music] you lost everything [Music]
Info
Channel: Keith Barker
Views: 17,238
Rating: undefined out of 5
Keywords: 200-301, 200-301 ccna, 200-301 cisco, 200-301 vs 200-125, 200-301 cisco certified network associate (ccna), 200-301 videos, 200-301 exam, 200-301 ccna certification, 200-301 study, 200-301 cisco certified network assoicate (ccna), spanning tree, per vlan spanning tree protocol, per vlan spanning tree configuration, rapid per vlan spanning tree, per vlan spanning tree, cisco, ccna, stp, vlan, networking, cisco ccna 200-301, cisco ccna certification, cisco ccna training
Id: QiY7wR66s4k
Channel Id: undefined
Length: 34min 25sec (2065 seconds)
Published: Wed Feb 12 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.