So let's look at optimizing spanning tree, Packet Tracer once again makes this easy.
We can see that these ports are blocking in spanning tree and so is this port. To confirm that on core
1 we can use the command show spanning tree various VLANs will be shown with this command here's
VLAN 1 we can see that port gigabit 1 0 23 is forwarding 24 is blocking 1 0 1 is forwarding but 2 and
3 are blocking for VLAN 1. For VLAN 10 the result is the same for VLAN 20 result is the same.
Same is true for VLAN 30 and VLAN 100. Again
the problem is if lots of PCs in the access layer want to send traffic to lots of servers over here
in the network, all their traffic has to go via core 2, and then it's gonna be sent across the
single gigabit 1 0 23 link to the servers that's not an optimal way of doing it. Now in a lot of cases
access switches have multiple VLANs and you can improve the performance by sending some traffic using
this uplink and some traffic using this uplink. At the moment no user traffic uses this uplink at
all because this port is blocking, no traffic uses this uplink because this port is blocking, no
traffic uses this uplink because this port is blocking and the same is true about gigabit 1 0 24. The
only traffic that is permitted out of a spanning tree port and accepted in on a spanning tree port are
network protocols such as CDP, LLDP, spanning tree and a few others. Normal user traffic cannot use any
of these links effectively and logically those ports have been disconnected from the network so those
links are therefore redundancy but we are wasting the bandwidth on those links so let's optimize these
spanning tree network. We've been told that core 1 should be the root for odd VLANs and core 2 the
root for even VLANs. Now in the exam, it will be more clear than that but let's assume that our odd
VLANs or VLAN 1 10 and 30 and our even VLANs are 20 and 100.
So on core 1 spanning tree, VLAN 1, root primary you can do it that way or you can specify priority
and specify a priority.
I like to use the property of 0 that lowers the spanning tree priority to the lowest possible
number. In the exam, it'll be more clear about which option you should use.
So for VLAN 1 10 and 30 I'm gonna make this switch the root.
Notice how the colors have changed all ports are now forwarding they're green whereas before they won't
green. On core 2 for those VLANs we wanna have that switch as the backup root you wanna keep
your core switches as roots. So spanning tree VLAN 1 priority notice it needs to be in multiples of
4096, so for VLAN 1, VLAN 10 and VLAN 30 we're going to make that switch
the backup root. So now when we look at core 1 show spanning tree VLAN 1.
Notice this switch is the root switch for VLAN 1.
It has a priority of one.
The reason why it's a priority of one is that the priority is determined by the actual priority plus
the VLAN
number notice priorities 0 plus extended system ID. So 0 plus 1 is 1 giving the local switch a priority
of 1 and the switch is the root
so that's the priority of the root switch.
When we look at the ports
notice all ports are forwarding.
What about the second switch core 2? Show spanning tree VLAN 1 what you'll notice is all ports are forwarding
except for gigabit
1 0 24.
Now the indicators in packet tracer are green because it's not showing us the output for all VLANs
the VLANs do differ.
So as an example back on core 1 show spanning tree VLAN 20.
Notice a lot of ports are still blocking on this switch.
So core 1 is not the root for VLAN 20.
Another switch is the root for VLAN 20 if we have a look on core 2 show spanning tree VLAN 20 this
switch is the root for that VLAN, VLAN 20 and it has all ports forwarding. So packet tracer
and the real switch will not show amber or orange
if you're using per VLAN spanning tree and a trunk port is blocking on some VLANs and not on other
VLANs.
Okay, so show run pipe include spanning tree that's the configuration thus far under the switch show
run pipe include spanning tree that's our configuration. Notice we can specify all VLANs in one
go by doing the following. So we want this switch to be the root for VLANs 20 and VLANs 100.
So spanning tree VLAN 20 and 100 priority 0, on this side spanning tree VLAN 20
100 priority 4096.
It's good practice to have your core switches being root switches and backup routes for other VLANs.
So show spanning tree VLAN 20 notice it's still going through different states previously however
we had a lot of blocking ports for VLAN 20 on core 1 that will hopefully now improve and there you
go.
The only port that's blocking is gigabit 1 0 24 for that VLAN.
All other ports are forwarding so that's much better.
We've been able to optimize spanning tree by making core 1 the root for some VLANs and core 2
the root for other VLANs.
That means that if we had VLAN 10 and 20 connected to this switch, VLAN 10 traffic would take this
uplink VLAN 20 traffic would take this uplink and on the switch VLAN 10 would go to core 1
VLAN 20 would go to core 2 and on this switch VLAN 30 would go to core 1, VLAN 20 would go to core
2. We still have a problem however because the links between the two switches are still blocking.
So again show spanning tree VLAN 20 notice on core 1 this port is blocking for VLAN 20 and
it's blocking for VLAN 100 hundred, on this side show spanning tree VLAN 1 port 24 is blocking for
VLAN 1 for VLAN 10 and for VLAN 30 we wanna combine or join these two links in an ether channel
to get better throughput.
So that's what we're gonna do in the next video.