When we're configuring our spanning tree environment, we are going to want to
be very
intentional about which of our switches is the root.
And keep in mind, this is on a per VLAN basis.
So in a Cisco environment, we might choose VLANs 10, 20, and 30 for the root on
the left.
And then on the right, we might choose this to be the root for 15 and 25 and 35
, something
along those lines.
I say Cisco environment, because at this point, we're still running per VLAN WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I say Cisco environment, because at this point, we're still running per VLAN
spanning
tree, we have the capability of still doing this with industry standard MST,
which we'll
talk about later in the course.
But for right now, we're running PVST plus, and we want to make sure that we
are, again,
very intentional about the root configuration.
Well, the root configuration is going to require us to configure a root
priority on a per VLAN
basis.
This is going to be very important for us.
And so we've got that command that we looked at.
We can set the spanning tree priority on a per VLAN basis. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We can set the spanning tree priority on a per VLAN basis.
And so I could set this to be, let's say, 4,0, 40, 96.
I could set the backup root to be 8K for these VLANs 10, 20, and 30.
Meanwhile, it is the root for these VLANs at 4K and the backup root over here
at 8K.
Those are the kinds of configurations that are very common in the real world,
where I've
got a priority that makes me the root for certain VLANs and then a priority
that makes
me the backup root for the other VLANs and vice versa on the other switch. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
me the backup root for the other VLANs and vice versa on the other switch.
We'll especially see this in a campus environment where we have distribution
switches because
it's pretty common for us to have a pair of distribution switches like this
that go
down to our access layer.
So it's well and good that I can go out here and I can use my configuration
command
to set specific priority values.
However, Cisco also gives us these macros.
And they expect us to understand how these macros work. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And they expect us to understand how these macros work.
It's something that shows up in a lot of Cisco materials and for that matter,
it's something
that we can be using in the real world.
Now keep in mind what a macro is.
A macro is really not a command so much as background commands.
It's going to run commands in the background after we run the macro and these
commands
go into our configuration.
Once I run a macro, I'm never going to see the macro inside of the config. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Once I run a macro, I'm never going to see the macro inside of the config.
If I do a show run, the macro won't show up.
It's these commands that end up running behind the scenes that get put into our
configuration.
But these are pretty handy because they do more than just run background
commands for
us, they also perform an evaluation of the current environment.
Specifically, we have two primary macros we're going to talk about.
The first one is our root primary macro.
Root primary macros intention is to set the switch as the root. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Root primary macros intention is to set the switch as the root.
This is what we're trying to accomplish.
However, keep in mind that we don't know what priorities are out there right
now.
There could be a current root that's configured with a priority of 20k or
something along
those lines.
This is why this macro is going to go out.
It's going to discover the current root and it's going to figure out what its WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It's going to discover the current root and it's going to figure out what its
priority
is and that's the important part.
Then from there, what it's going to do is it's going to set a priority that
makes it
the root.
This is a little bit of a conversation.
What priority is going to be required to set this switch as the root?
What's interesting about this is if I have a lower MAC address, then that means
all I
have to do is to tie the current priority.
If the current switch has a value of 12k, then I can just set myself to 12k and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
If the current switch has a value of 12k, then I can just set myself to 12k and
I'm
good.
If I have a higher MAC address, well that means that I would lose the tie
breaker.
I'm going to go 4000 less than the current root priority.
Because of this, the mileage may vary a little bit.
I might run this command and it sets it to one value on one switch but a
different value WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
different value
on a different switch.
But importantly, notice that in either one of these situations, it's going to
go the
minimum distance.
It's going to go down as few priority slots as needed in order to make us the
priority.
It's not just going to drop all the way down.
It's going to go the minimum amount.
The other caveat in this is that it will not pick zero as an option.
So if the current root is 4000, 4096, and it has a better MAC address than me, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So if the current root is 4000, 4096, and it has a better MAC address than me,
I can't
actually become the root.
I can go as low as 4000.
And at that point, I can't go below the current root because zero isn't an
option.
It might say, well, it'd be nice if zero is an option except if the current
root had
a priority of zero, it would have the same problem.
So either way, we're going to hit the limit for this command if there are pre-
configured
priorities out there.
Usually, generally speaking, we want to use this command in a default WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Usually, generally speaking, we want to use this command in a default
environment.
If there are other switches out there that have configured priority values,
then again,
we've got some things in place to make this work still, but it isn't exactly
necessarily
going to do what we expect.
But it is very important for us to understand what it is that this command is
actually doing.
Now there is another priority macro that we can use, which is known as root
secondary.
Root secondary is intended to set the switch, as we might imagine, as a backup WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Root secondary is intended to set the switch, as we might imagine, as a backup
root.
Now what is a backup root?
Well, from a spanning tree perspective, it's a big nothing.
I mean, there is no concept of a backup root in spanning tree.
But what there is is the idea that if my primary root dies, then the switch
with the
next highest priority will take over.
And so that's what we're trying to configure here, back up to this conversation WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so that's what we're trying to configure here, back up to this conversation
in a real
world with distribution switches, we probably want our other distribution
switch to take
over.
And so that's why we said we do 4,000 for one set of VLANs, but I'm going to do
8,000
for the other set.
So if I really look at it from these VLANs perspective, I have a 4,000 for the
root, but
then the backup root is set for 8,000.
And the assumption here is all these other switches are set to the default of
32K.
So is this switch doing anything for VLANs 10, 20, and 30?
And the answer is absolutely not. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And the answer is absolutely not.
It's just participating in the topology, just like any other switch would.
But if I do lose my root, then this switch will take over as the new primary
until that
root comes back online.
And so always keep that in mind that the root is extremely dynamic in spanning
tree.
And that can be good when I want to take over as root, but it can also be
really bad.
And we're going to see later on how we can protect our topology against a new
root showing
up.
And we didn't actually want that root to take over as the root spanning tree WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we didn't actually want that root to take over as the root spanning tree
doesn't natively
protect us against that.
But Cisco does give us some protection mechanisms.
So back to the conversation at hand, I want to be able to configure essentially
this concept
where the switch I'm on is going to take over as root for the primary when it
goes down.
So what I want to do is have a value that is better than the default value of
32K, but
not as good as what's configured with this macro. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
not as good as what's configured with this macro.
These macros are intended to be used together.
Well we mentioned that this macro will go as low as not zero.
So as low as 4K.
So the range here, let's change colors back to the original blue.
So the range for the primary, we know starts at 4K because it can't go lower
than that.
But it also has a maximum value of 24K, meaning it will not choose 28 and 32 is WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But it also has a maximum value of 24K, meaning it will not choose 28 and 32 is
the default.
So we wouldn't want to choose that either.
Well that leaves that value right in the middle.
So the secondary is going to simply set the priority to 28K.
Now notice this isn't a particularly sophisticated macro.
We just said that the primary macros can go out and perform this discovery.
The secondary macro doesn't do that at all.
It truly is just intended to work with the root primary in a default WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It truly is just intended to work with the root primary in a default
environment.
In a default environment, all of the switches are 32K.
The primary is going to be somewhere in this range and therefore 28K is exactly
what I
would need in order to set myself up to be the backup root.
So that's all we're doing.
We're setting it at 28K.
And even if this command doesn't make me the secondary, we don't really have a
great way
of knowing that.
I mean keep in mind this might be a very large network. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I mean keep in mind this might be a very large network.
And so I might get onto this switch and tell it, "Hey, you're the secondary."
The primary is up here at let's say 24K.
And I have no idea that this switch over here is also at 24K just with a worse
MAC address.
I have no way of knowing that because the BPDUs are flowing downstream this way
.
I would never have any idea that that switch is out there.
Now this scenario, the primary goes down.
My network is split in half.
But the point is simply I don't see the BPDUs from all of the other switches. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But the point is simply I don't see the BPDUs from all of the other switches.
I can only see what the root is, which is why I can perform this discovery for
the current
root.
For the secondary, I'm just going to have to trust that this value will work.
And I'm not going to know for sure just by entering the macro that this did
indeed make
me the secondary root.
Now let's just take one quick moment and talk about the real world.
In the real world, we typically don't use these macros a whole lot. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
In the real world, we typically don't use these macros a whole lot.
They are convenient, sure, but for the most part we want to be very intentional
with how
we're configuring our environment.
And I will say that in my configurations, designs, everything I've ever done, I
like
to use something like 4K for the primary root, 8K for the backup root.
And the macros don't really tie very well into this.
But this is the best way to protect ourselves from other switches getting
plugged in that
maybe have lower priority values. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
maybe have lower priority values.
I wouldn't necessarily want to rely on 24K and 32K when somebody could plug a
switch
into the network that is configured for 4K.
And so we don't want to have to worry about that.
We just want to stick with something that's very intentional, that protects as
well as
we can.
And for the most part, the macros aren't going to provide that.
But that said, they are absolutely within the scope of this exam, within the
scope of
the blueprint and within the scope of this course.
So we want to make sure we understand how these macros actually work under the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we want to make sure we understand how these macros actually work under the
hood,
what values they could possibly assign.
And hey, playing around with it in the lab is a really good way to make sure
that we
cement that knowledge.