1 00:00:00,620 --> 00:00:08,180 So in this topology, let's determine why certain ports are set to forwarding and why certain ports 2 00:00:08,180 --> 00:00:09,110 are blocking. 3 00:00:09,110 --> 00:00:11,600 So we'll work through the spanning tree process. 4 00:00:11,900 --> 00:00:16,580 The first decision that needs to be made is election of Route Bridge. 5 00:00:16,790 --> 00:00:22,160 So one of these switches in the topology needs to become the route of the spanning tree. 6 00:00:23,010 --> 00:00:26,640 So on switch one, as we saw previously. 7 00:00:27,840 --> 00:00:34,440 Shows spanning tree shows us that the switch or bridge is the root of the spanning tree. 8 00:00:35,110 --> 00:00:36,430 Switch to. 9 00:00:39,540 --> 00:00:42,300 Is not the root of the spending tree. 10 00:00:43,210 --> 00:00:48,640 So in the output here, we can see that it has a path cost to get to the route switch. 11 00:00:49,570 --> 00:00:55,300 It sees that the route bridge or route switch has a route ID with a priority of this and MAC address 12 00:00:55,300 --> 00:00:59,200 of this, which is different to the local switch MAC address. 13 00:00:59,910 --> 00:01:01,230 So first decision. 14 00:01:01,620 --> 00:01:03,600 How is the route determined? 15 00:01:03,720 --> 00:01:09,270 It's based on lowest bridge ID, which consists of the priority and MAC address. 16 00:01:09,520 --> 00:01:14,940 Switch one has the same priority as switch 232769. 17 00:01:15,120 --> 00:01:18,780 So that can't be used to determine the spanning tree route. 18 00:01:19,050 --> 00:01:22,380 So the tie breaker is based on the MAC address. 19 00:01:22,500 --> 00:01:28,770 So lowest Mac address will win switch one has a lower Mac address when compared to switch two. 20 00:01:28,890 --> 00:01:40,470 Once again, 0011 is the same on both switches, but notice c6ea is greater than c six ac in hexadecimal. 21 00:01:40,470 --> 00:01:43,260 So switch one becomes the root of the spanning tree. 22 00:01:44,030 --> 00:01:45,950 So that's the first decision. 23 00:01:45,950 --> 00:01:48,020 Determine who the route bridge is. 24 00:01:48,530 --> 00:01:51,650 Once again, priority 32768 is the default. 25 00:01:51,830 --> 00:01:55,370 So we've now determined who the root bridges or root switches. 26 00:01:55,700 --> 00:02:02,060 The next decision is that every non root switch needs to determine its root port. 27 00:02:02,120 --> 00:02:05,780 The root port is its best port to get to the root bridge. 28 00:02:06,290 --> 00:02:10,490 The root port is chosen based on lowest path cost. 29 00:02:10,789 --> 00:02:16,970 If there's a tie breaker on that, then it's based on lowest neighbor bridge ID if path costs are the 30 00:02:16,970 --> 00:02:17,630 same. 31 00:02:18,050 --> 00:02:23,540 If that can't be used to determine the root port, then the lowest port priority is used. 32 00:02:23,570 --> 00:02:30,650 The port priority is 128 by default, and if that can't be used, then the lowest port ID is used as 33 00:02:30,650 --> 00:02:31,670 a tiebreaker. 34 00:02:32,380 --> 00:02:35,800 So first decision is based on lowest pot cost. 35 00:02:35,950 --> 00:02:40,270 Here's a table showing you the pot costs of Cisco switches. 36 00:02:40,390 --> 00:02:51,190 They are either based on a 1998 ie triple E cost or 2004 ie triple E cost in the 1998 cost values. 37 00:02:51,220 --> 00:03:00,670 A ten meg link has a cost of 100 hundred meg 19 one Gig four and ten gig two in the I triple E cost 38 00:03:00,670 --> 00:03:02,020 in 2004. 39 00:03:02,020 --> 00:03:05,320 And later, the costs change to the following. 40 00:03:05,950 --> 00:03:13,990 So in our topology, we have gig interfaces on the switches, and if we look at the path cost of various 41 00:03:13,990 --> 00:03:14,350 ports. 42 00:03:14,380 --> 00:03:18,070 Notice the value associated is four. 43 00:03:18,340 --> 00:03:25,390 So these gigabit links have a path cost value of four, which means that the switches are using the 44 00:03:25,390 --> 00:03:31,210 old path cost method to determine the best path to a destination. 45 00:03:32,180 --> 00:03:37,140 Now the first decision is to determine the route port based on the path cost. 46 00:03:37,470 --> 00:03:45,240 In this topology, we have gigabit to zero zero connected directly to switch one gigabit zero one is 47 00:03:45,240 --> 00:03:47,520 also directly connected to switch one. 48 00:03:47,820 --> 00:03:53,730 Gigabit zero three is connected to a hub, which in turn is connected to switch one. 49 00:03:56,390 --> 00:03:59,390 So the path cost of gigabit is zero. 50 00:03:59,420 --> 00:04:03,340 Three would be eight if there was a switch connected here. 51 00:04:03,350 --> 00:04:09,890 But at the moment the path cost is four because we have a hub instead of a switch. 52 00:04:10,130 --> 00:04:17,600 So we have three ports with the same port cost to get to switch one on switch two, we can type show 53 00:04:17,600 --> 00:04:25,160 spending tree three as an example and we can see that gigabit zero zero was chosen as the route port 54 00:04:25,160 --> 00:04:30,710 to get to switch one, but that couldn't have been determined based on the path cost. 55 00:04:30,860 --> 00:04:34,370 It would need to be determined based on something else. 56 00:04:35,950 --> 00:04:38,170 So once again shows spanning tree. 57 00:04:39,040 --> 00:04:49,540 So on switched to its chosen gigabit zero zero as its route port can path cost be used to determine 58 00:04:49,540 --> 00:04:53,020 the best path to the route bridge based on its port numbers? 59 00:04:53,290 --> 00:04:54,850 And the answer is no. 60 00:04:54,970 --> 00:04:57,400 The path cost of this link is for the path. 61 00:04:57,400 --> 00:05:04,690 Cost of this link is for the path cost of this link is four, but that can't be used as the determining 62 00:05:04,690 --> 00:05:05,380 factor. 63 00:05:05,830 --> 00:05:08,800 So the next choice is neighbor bridge ID. 64 00:05:08,830 --> 00:05:14,680 Now this example, switch two is connected to switch one on two ports that are directly connected to 65 00:05:14,680 --> 00:05:15,520 switch one. 66 00:05:15,790 --> 00:05:22,180 So the neighboring bridge ID on both these ports is the same, so that cannot be used as the tiebreaker. 67 00:05:22,540 --> 00:05:28,990 The next decision criteria is based on priority, but the priority of the ports are the same, so that 68 00:05:28,990 --> 00:05:30,790 can be used as a tiebreaker. 69 00:05:31,120 --> 00:05:34,960 So the port number is used as the tiebreaker. 70 00:05:35,560 --> 00:05:38,200 One is a lower number than two. 71 00:05:38,230 --> 00:05:43,990 So hence gigabit is zero zero is chosen as the root port in this topology. 72 00:05:44,140 --> 00:05:50,980 Now once the root ports are chosen on a per segment basis, a designated port needs to be chosen. 73 00:05:51,400 --> 00:06:01,090 The easiest way to work this out is imagine that you have a PC in the middle of the cable and it needs 74 00:06:01,090 --> 00:06:05,890 to get to the root bridge using either the port on the left or the port on the right. 75 00:06:06,160 --> 00:06:11,410 So if I had a PC in this topology, which port would it use to get to the root bridge? 76 00:06:11,500 --> 00:06:17,470 And hopefully it's fairly obvious that this port is closer to the root bridge than this port. 77 00:06:17,620 --> 00:06:24,040 And hence on this segment, gigabit zero zero to gigabit zero zero this port. 78 00:06:24,640 --> 00:06:26,830 Put zero zero on switch. 79 00:06:26,830 --> 00:06:28,780 One is the designated port. 80 00:06:29,200 --> 00:06:36,040 A designated port is the best port to use on a per segment basis to get to the root bridge. 81 00:06:36,250 --> 00:06:42,040 So this port is the best port to use on this top segment to get to the Root Bridge. 82 00:06:42,370 --> 00:06:44,020 What about the segment? 83 00:06:44,230 --> 00:06:47,920 So in this segment, imagine once again that you had a PC here. 84 00:06:48,190 --> 00:06:51,820 What's its best port to use to get to the root bridge? 85 00:06:52,530 --> 00:06:57,720 Well, it would be the sport here on switch one and once again on switch one. 86 00:06:57,720 --> 00:07:05,460 We can see that by typing shows spanning tree notice gigabit is zero one on switch one is the designated 87 00:07:05,460 --> 00:07:07,680 port for this segment. 88 00:07:08,100 --> 00:07:13,110 The same is true for this segment, which is the best port to use to get to the root bridge. 89 00:07:13,500 --> 00:07:19,140 It's going to be gigabit zero three on switch one. 90 00:07:20,050 --> 00:07:25,900 And on this segment, looking at layer two switches running spanning tree, this port is the best port 91 00:07:25,900 --> 00:07:28,480 to use to get to the root bridge. 92 00:07:28,750 --> 00:07:31,990 So we've not chosen a designated port for the stop link. 93 00:07:32,320 --> 00:07:33,430 The second link. 94 00:07:33,700 --> 00:07:37,000 These links through the hub as well as this link. 95 00:07:37,390 --> 00:07:45,160 The last remaining link is this link and the best port to use to get to the root bridge is this port 96 00:07:45,190 --> 00:07:49,770 on switch to any other ports on the network will go blocking. 97 00:07:49,780 --> 00:07:58,900 So this port gigabit zero one is put in the blocking state and so is gigabit zero three also put in 98 00:07:58,900 --> 00:08:03,220 the blocking state now in rapid spanning tree or rapid PVS? 99 00:08:03,220 --> 00:08:06,580 DT These are known as alternate ports. 100 00:08:06,970 --> 00:08:13,000 In other words, on this hub, as an example, if we had a PC connected to it, if this link went down, 101 00:08:13,330 --> 00:08:20,020 PCs could send traffic into the network using this alternate port because it would now transition to 102 00:08:20,020 --> 00:08:23,620 the forwarding state when this link goes down.