In the previous videos, we've configured these interfaces
between the switches as trunk ports
and configured the links to the routers and switches as access ports.
This port as an example is in VLAN 10
this port is in VLAN 20, this port is in VLAN 1
and this port is in VLAN 1 and these core ports are trunk ports permitting all VLANs.
Now, this is a layer 2 infrastructure running between our switches.
In a layer 2 network when you have redundant links as we do here
we need to run Spanning Tree to prevent loops in your topology.
Spanning Tree is enabled by default on Cisco switches
so when I type sh run | include span
you’ll notice that the switch is configured to run Rapid PVST+
and is using an extended system IDs.
so when I use the command sh spanning-tree vlan 1 as an example
you can see the output for VLAN 1
the default priority for this switch is 32768 in decimal
that’s 8000 in hexa decimal.
So the switch is using the default Spanning Tree priority
but because its using extended systems IDs
and this is VLAN 1
the priority of the switch is 32769 in other words 32768 +
the VLAN number, we could see that as an example for VLAN 10
priority 32768 + extended system ID
so the priority of this switch is 32778.
For VLAN 20 we can see that the priority is 32788.
So looking at VLAN 10 as an example, switch has this priority.
The roots of the Spanning Tree also has that priority.
The Spanning Tree that we're using is Rapid PVST
this is the address of the root bridge
this our local address or local MAC address.
So the bridge ID is this number + this number
but the local switch is not the root bridge.
Another switch is the root bridge
and the port used to get to the root bridge is port 0/0.
so from switch 1 points of view, the root bridge is somewhere here
so we could have a look as an example
as switch 2 to see if that switch is the root.
So on switch 2, sh spanning-tree vlan 10
shows us that this switch is the root bridge.
In other words, this bridge is the root
switch 2 is the Spanning Tree root for VLAN 10.
Notice it doesn’t show a path cost to get to the root
it shows us that switch is the root and we can also see that by looking at the address.
notice the MAC address of the root is the same
as the MAC address of the local bridge or local switch.
All interfaces on this switch are designated ports and all ports are forwarding
whereas if we look at switch 1 once again, the switch has a root port.
the root port is forwarding and the switches root port is gigabit 0/0
we can see that once again by looking at the output here
but hopefully, at this point, you can see a problem in this topology.
This core switch is blocking on all ports except gigabit 0/0.
So if we draw this topology and mark which port are forwarding and blocking
we'll be able to see what’s actually happening in the network.
Looking at topology as follows, it looks like you have a lot of redundancy
and traffic from this host as an example may take an optimal path to get to destination
but that may not actually be true because of the ports that Spanning Tree are blocking
by default, so let’s have a look at what’s going on in this topology.