All right let's go ahead and jump into the lab and just see these macros in
action. So what we have here is we've got a topology that is the same topology
that we had in the previous skill. It's just a square of switches. They're all
set
to 32,000 so it's the default priority everywhere 32k and just because of MAC
addresses switch 3 happens to win the root role. Now again that's just because
it has the lowest MAC address. This is going to be important as we demonstrate
which switches take over is the root in which situations. So let's go ahead and WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
which switches take over is the root in which situations. So let's go ahead and
clear this and let's run a quick demo. So again they're all at 32k. We know
that
switch 3 in theory is the root. Let's just do a show, spanning tree. We'll do
everything in VLAN 1 here so VLAN 1 root and we do see that I'm the root. I
know
that because there's no root port. So that makes me the root even though I've
got
the default 32k priority. So let's go and get on to switch 1 here and we'll try
to make switch 1 the primary and we'll do that using our spanning tree command WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to make switch 1 the primary and we'll do that using our spanning tree command
spanning tree VLAN 1 and then this is where I could set the priority manually
and set one of those increments of 4096 or we'll find that I have this root
command. This is what's going to allow me to set the primary and secondary and
this is our macro. So I'm going to set root priority or root root primary hit
enter and let's see what happened here. If I do a show spanning tree VLAN 1 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
enter and let's see what happened here. If I do a show spanning tree VLAN 1
root.
Now we see that I'm the root because I no longer have a root port and notice my
configured priority. Now we said that it would go as only as low as needed so
you could say well why didn't it go to 28k? Well because again the primary
macro
is intended to work with the secondary and the secondary uses 28. So that's
always said the maximum or the highest value that this is going to use is the
24k value and that's indeed what it shows here. So it shows the 24k let's go WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
24k value and that's indeed what it shows here. So it shows the 24k let's go
back to switch 3 run the same command. We now do have a root port and our root
has that configuration. So switch 3 is no longer the root it is now switch 1.
So
let's go and test the secondary command. I'll get on to switch 2 here and do a
spanning tree VLAN 1 and again we'll just say root secondary and now let's do a
show spanning tree for VLAN 1. So we see that the root is switch 1 here with WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
show spanning tree for VLAN 1. So we see that the root is switch 1 here with
its
priority of 24k and we see that my priority is indeed 28k. So the macros are
working like we thought. So now we know switch 1 is at 24k what happens if I
get
on to switch 3 and run the same command. So let's do or the same macro rather.
So
config T here spanning tree VLAN 1 root primary do show spanning tree root
what happened? Well I didn't filter the VLAN so let's look at VLAN 1 here. So WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
what happened? Well I didn't filter the VLAN so let's look at VLAN 1 here. So
what
happened was it's no longer the root we or it is it is the root and no longer
has
a root port. So we know it took over as the root but notice the priority is the
exact same. Switch 3 we established has the lowest MAC address as the best MAC
address. It already won root when everybody had the same priority. So switch
3 knew that it would win as the root if it just went down to 24k. So that's all
it had to do it didn't have to go any lower than 24k because switch 1 at 24k WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it had to do it didn't have to go any lower than 24k because switch 1 at 24k
had the worst MAC address. So switch 3 became the root at 24k. Switch 1 we can
now run the same command here we see that it does indeed have a root port which
means it's no longer the root. So once again now let's get into a little war
here. Now let's go ahead and configure the same thing spanning tree VLAN 1 root
primary here on switch 1. So before we take a look at what happened what do you
think is going to happen here? We're telling switch 1 to become the root we WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
think is going to happen here? We're telling switch 1 to become the root we
know that switch 1 and switch 3 are both 24k and switch 3 just went down
to tie switch 1 to become the primary. So what switch 1 going to do? Well what
switch 1 is going to do is it's going to say well I can't win at this value so
I'm
going to drop down another 4k. We'd expect it to be 20k rather than 24k so if
I run this command we do see that switch 1 no longer has a root port means it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I run this command we do see that switch 1 no longer has a root port means it
is
the root and it's running 20k. So that's how the primary MACR works it's always
going to keep battling back and forth until it figures out what the ultimately
what the value is that I need to do to become or need to choose to become the
root. So that's how the primary works now notice the primary is now at 20k.
Let's go back and run that secondary command again and see what happens. So WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's go back and run that secondary command again and see what happens. So
we know that we are running a priority of 28k. We're no longer the backup root
by
the way switch 3 still has that priority of 24k. So let's get on here and say
hey
I want you to be the secondary. So remember what we said would happen is
that this isn't going to do much for me. So I just ran that command again
show VLAN 1 spanning tree and I still have a priority of 28k. So that
secondary MACR does nothing to ensure that I am the secondary instead it's WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
secondary MACR does nothing to ensure that I am the secondary instead it's
only going to just be set to 28k period that's all it does it's not
particularly useful relative to the primary but it is useful if we're using
the primary in a default environment that way the primary should be 24k and
the secondary would be 28k. So that is how these MACR's come together we can
continue to play with this. If I wanted to I could get in here and I could say WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
continue to play with this. If I wanted to I could get in here and I could say
you know make a lower priority and see how that comes together as I continue to
put root priorities these root primary and root secondary commands in but I'd
encourage you to get into the lab yourself and play with this to make sure
that we fully understand how these MACR's come together.