1 00:00:00,670 --> 00:00:01,210 A part. 2 00:00:01,210 --> 00:00:06,220 Cost is the cost to get to the route bridge or route switch. 3 00:00:06,550 --> 00:00:13,120 Path costs are calculated from the cost of a port and the number of links to get to the root bridge. 4 00:00:13,480 --> 00:00:19,210 As an example, a one gigabit per second link may have a cost of four. 5 00:00:19,810 --> 00:00:24,730 If a switch is directly connected to the router switch, the path cost would be four. 6 00:00:24,880 --> 00:00:29,440 Because there's a single link with a cost of four. 7 00:00:30,180 --> 00:00:38,640 However, if switch three had a link to switch two with a port cost of four and switch two had a link 8 00:00:38,640 --> 00:00:42,660 to switch one, which is the route with a port cost of four. 9 00:00:43,020 --> 00:00:50,280 The cost of switch three to get to switch one using these links would be eight because it's four plus 10 00:00:50,280 --> 00:00:50,940 four. 11 00:00:50,970 --> 00:00:52,650 To get to the root bridge. 12 00:00:53,240 --> 00:00:59,570 Support costs are incremented in a similar way to hop count in a protocol such as rep. 13 00:00:59,840 --> 00:01:09,500 So path cost is calculated from the sum total of port costs to get to the root bridge based on a path 14 00:01:09,500 --> 00:01:11,870 of multiple links to the root bridge. 15 00:01:12,050 --> 00:01:17,540 So port costs do have default values on a per port and per VLAN basis. 16 00:01:17,840 --> 00:01:23,930 You can change the port cost values, but they do have defaults defined by the triple e. 17 00:01:24,140 --> 00:01:30,920 There are two standards the triple E cost 1998 and triple E cost 2004. 18 00:01:31,190 --> 00:01:37,700 Some Cisco switches still use the old path cost and you can change the switch to use the new path cost 19 00:01:37,700 --> 00:01:41,390 by using the command spanning tree path cost method long. 20 00:01:42,740 --> 00:01:43,700 In this topology. 21 00:01:43,700 --> 00:01:47,750 I have five switches switch one, two, three, four and five. 22 00:01:48,110 --> 00:01:53,570 Nothing has been configured on these switches except for the switch names, so they are running a default 23 00:01:53,570 --> 00:01:54,740 configuration. 24 00:01:55,070 --> 00:02:00,200 I've connected hubs to the switches so that we can do Wireshark captures in this topology. 25 00:02:00,500 --> 00:02:04,940 But please note this is not a recommended spanning tree topology. 26 00:02:05,240 --> 00:02:10,310 It's simply used to demonstrate some of the features and functions of spanning tree. 27 00:02:10,550 --> 00:02:14,840 So let's determine who the root switches on switch. 28 00:02:14,840 --> 00:02:18,110 One show spanning tree. 29 00:02:19,360 --> 00:02:22,000 Is the switch, the root of the spending tree? 30 00:02:22,180 --> 00:02:23,590 The answer is no. 31 00:02:23,620 --> 00:02:30,580 We can see that the switch has a mac address of the following, but the route has a mac address of the 32 00:02:30,580 --> 00:02:31,300 following. 33 00:02:31,600 --> 00:02:38,830 The local switch also has a path cost to get to the route switch via Port one, which is gigabit zero 34 00:02:38,830 --> 00:02:39,550 zero. 35 00:02:39,610 --> 00:02:47,440 In other words, it's cost to get to the route bridge is four based on the triple E 1998 specification. 36 00:02:48,270 --> 00:02:53,880 Scrolling down, we can see that gigabit zero zero is the root port for the switch. 37 00:02:54,300 --> 00:03:01,380 So in other words, because the port cost is four, it's most likely that switch two is the root switch. 38 00:03:02,030 --> 00:03:08,720 Because this port has a cost of fall and the port cost to get to the roots, which is four. 39 00:03:08,750 --> 00:03:12,680 In other words, there'll be a single link to get to the root bridge. 40 00:03:14,000 --> 00:03:16,400 One switch two shows spanning tree. 41 00:03:17,870 --> 00:03:22,700 The switch is the route and we can see it displayed clearly in this output. 42 00:03:22,940 --> 00:03:29,570 You can also see that the Mac address of the root and the local bridge or local switches the same. 43 00:03:31,670 --> 00:03:34,550 What you'll also notice is that all ports of forwarding. 44 00:03:35,150 --> 00:03:37,670 So this is the route switch currently. 45 00:03:37,820 --> 00:03:41,600 Let's see what BPD use are being advertised by that switch. 46 00:03:44,310 --> 00:03:45,780 So he has a BPD you. 47 00:03:49,580 --> 00:03:54,650 The destination of the frame is the well known Mac address for spending tree. 48 00:03:55,660 --> 00:03:56,950 In the spending tree output. 49 00:03:56,950 --> 00:04:04,870 We can see that the switch is running rapid spanning tree will change that in a moment, but notice 50 00:04:04,870 --> 00:04:06,940 the path cost is zero. 51 00:04:07,770 --> 00:04:14,700 That's the route identifier and the local bridge identifier of the switch and the values are set the 52 00:04:14,700 --> 00:04:15,360 same. 53 00:04:17,130 --> 00:04:19,019 Other information, including the max age. 54 00:04:19,019 --> 00:04:22,170 Hello time and for delay are shown in the output. 55 00:04:22,590 --> 00:04:24,120 So I'll stop that. 56 00:04:25,530 --> 00:04:26,910 Why shock capture? 57 00:04:27,120 --> 00:04:31,170 So Switch two is currently advertising that it's the root of the topology. 58 00:04:31,620 --> 00:04:36,210 Let's have a look at what switch three shows with regards to path cost. 59 00:04:38,400 --> 00:04:39,750 Shows spanning tree. 60 00:04:41,290 --> 00:04:45,300 It also has a path cost of four and it's using port one. 61 00:04:45,310 --> 00:04:48,910 In other words, gigabit is zero zero as its root port. 62 00:04:49,360 --> 00:04:51,440 So this port is the root port. 63 00:04:51,460 --> 00:04:58,210 To get to the root of the spanning tree and this is the length of switches using with a path cost of 64 00:04:58,210 --> 00:04:58,870 four. 65 00:04:59,110 --> 00:05:00,820 What about switch for. 66 00:05:01,810 --> 00:05:03,160 Shows spanning tree. 67 00:05:04,050 --> 00:05:07,800 We can see here that the path cost is eight, not four. 68 00:05:08,040 --> 00:05:11,850 And the port that it's using is gigabit is zero zero. 69 00:05:12,240 --> 00:05:18,510 So in other words, this port is the port that it's using to get to the root bridge. 70 00:05:18,600 --> 00:05:23,610 It has a path cost of four because this link has a cost of four. 71 00:05:23,760 --> 00:05:26,250 And this link has a cost of four. 72 00:05:27,340 --> 00:05:28,810 On Switch three. 73 00:05:30,030 --> 00:05:37,620 We could use the command show interface spanning tree interface gigabit zero three cost. 74 00:05:38,930 --> 00:05:43,820 To see that it's advertising a cost of fall on the sport. 75 00:05:44,500 --> 00:05:49,330 So from its point of view, it's got a cost of four plus four to get to the Route Bridge. 76 00:05:50,520 --> 00:05:56,490 We can also use the command show spanning tree route to see that the local switch is using gigabit zero 77 00:05:56,490 --> 00:05:58,920 zero as its root port. 78 00:05:59,040 --> 00:06:01,440 The cost to get to the root is eight. 79 00:06:01,710 --> 00:06:05,310 The root ID or bridge ID is the following. 80 00:06:05,580 --> 00:06:07,890 So four plus four gives us eight. 81 00:06:08,250 --> 00:06:09,690 What about switch five? 82 00:06:10,170 --> 00:06:12,690 So switch five shows spanning tree. 83 00:06:16,590 --> 00:06:17,790 There's the command. 84 00:06:19,070 --> 00:06:22,640 The output shows us that the cost to the route is 12. 85 00:06:23,150 --> 00:06:27,960 In other words, four plus four plus four is 12. 86 00:06:27,980 --> 00:06:32,870 So as you can see, the plot cost is incrementing on a per link basis. 87 00:06:35,270 --> 00:06:41,240 Once again show Spending Tree Root podcast to get to the root is 12. 88 00:06:41,660 --> 00:06:45,500 The local root port is gigabit zero zero. 89 00:06:45,770 --> 00:06:54,890 That port has a port cost of four because the switches are using the 1998 cost at one gigabit per second. 90 00:06:54,890 --> 00:06:57,980 Port has a path cost of four by default. 91 00:06:58,370 --> 00:06:59,750 So let's make some changes. 92 00:06:59,750 --> 00:07:05,960 We'll make switch one the route, see how that affects the BPD use advertised by switch two and we'll 93 00:07:05,960 --> 00:07:12,290 change the path cost method to long to see how that affects the path costs of the switches.