A part cost is the cost to get to the root bridge or route switch path costs are calculated from the
cost of a port and the number of links to get to the root bridge.
As an example a one gigabits per second link may have a cost of four.
If a switch is directly connected to the route to switch the path cost would be fall because theres
a single link with a cost of four.
However if switch three had a link to switch to where the port costs to fall and switch to had a link
to switch 1 which is the route with a port cost or for the cost of switch three to get to switch one
using these links would be 8 because its four plus full.
To get to the root bridge support costs are incremented in a similar way to hop count in a protocol
such as support.
Cost is calculated from the sum total of Port costs to get to the root bridge.
Based on a path of multiple links to the bridge support costs a do have default values on a per port
and PV land basis.
You can change the port cost valleys but they do have defaults defined by the I triple E There are two
stents the triple E cost 1998 and I triple E cost 2000 for some Cisco switches still use the old Poth
cost and you can change the switch to use the new path cost by using the command spending tree path
cost method long in the apology.
I have five switches switch one two three four and five.
Nothing has been configured on these switches except for the switched names so they are running a default
configuration of connected hubs to the switches so that we can do Y shot captures an apology but please
note this is not a recommended spending tree topology.
Its simply used to demonstrate some of the features and functions of spending tree.
So lets determine who the root switches on which one shows spanning tree is the switch.
The root of the spending tree.
The answer is No.
We can see that the switch has a MAC address of the following but the root has a MAC address of the
following.
The local switch also has a path cost to get to the root switch via port 1 which is gigabit 0 0.
In other words it's cost to get to the root Brydges for based on the triple E 1998 spec..
Scrolling down we can see that gigabit 0 0 is the root port for the switch.
So in other words because the path cost is for it's most likely that switch to is the root switch because
the support has a cost of 4 and the path cost to get to the root switch is full.
In other words they'll be a single link to get to the root bridge.
One switch to show spanning tree this switch is the root and we can see it displayed clearly in the
output.
You can also see that the MAC address of the root and the local bridge or local switch is the same.
What you also notice is that all ports are forwarding.
So this is the route such currently.
Let's see what BPT use are being advertised by that switch.
So he has a BPT you
the destination of the frame is the well-known MAC address for spending three in the spending tree output.
We can see that the switches running rapid spanning tree will change that in a moment.
But notice the part.
Cost is zero.
That's the root identifier and the local bridge identifier of the switch and the values are set the
same of information including the max age holloed time and for delay as shown in the output.
So I'll stop at that.
Was Shot capture So switch to is currently advertising that it's the root of the typology.
Let's have a look at what switched three shows with regards to parthe cost shows spending tree.
It also has a past cost of four and it's using pt. 1.
In other words gigabit is 0 0 as its root port.
So this port is the root port to get to the root of the spending tree.
And this is the link the search is using with a path cost to fall.
What about switch for shows spending tree.
We can see here that the path cost is 8 not full and to the point that it's using is gigabit is 0 0.
So in other words this port is the port that it's using to get to the root bridge.
It has a path cost Costa for because this link has a cost of four and this link has a cost of full on
switch three we could use the command show interface spending tree interface gigabit zero three cost
to see that it's advertising a cost of four on the support.
So from its point of view it's got to cost a full plus for to get to the bridge.
We can also use the command show spanning tree route to see that the local switches using gigabit 00
as it's a route port.
The cost to get to the route is eight the route ID or bridge IDs the following.
So four plus four gives us eight.
What about switch five switch five shows spending tree.
There's the command the output shows us that the path cost to the route is 12.
In other words four plus four plus for these 12.
So as you can see the pot cost is incrementing on a per link basis.
Once again show spending tree root Poth cost to get to the root is twelf the local root port is gigabit
00 that port has a port cost of four because the switches are using the 1998 cost of one gigabit per
second port has a cost of four by default.
So let's make some changes will make switch one route.
See how that affects the PPD use advertised bus which would change the path cost method too long to
see how that affects the path costs of the switches.