In a previous video, we optimize Spanning Tree
to make switch 1 the root for VLANs 1 and 10
and switch 2 the root for VLAN 20.
On switch 1 as an example sh spanning-tree vlan 1
shows me that the switch is forwarding on all ports
and the same is true for VLAN 10 but for VLAN 20
the switch is blocking on gigabit 0/1.
The same is true on switch 2 sh spanning-tree vlan 1
switch is blocking on gigabit 0/1 for VLAN 10
switch is blocking on gigabit 0/1
but is forwarding on all ports for VLAN 20.
So in other words, traffic that sent by say this PC to NPM is gonna be sent
to switch 2 and then its gonna be forwarded across gigabit 0/0 to get to NPM.
That’s ok if you only have a few PCs
but if you had multiple access switches with their host in VLAN 20
their traffic would be sent to this switch
and traffic would have to go across this gigabit link
which will become a bottleneck to get to say multiple servers on the left-hand side.
So traffic that's traversing from 1 core switch to another
is being limited to using this gigabit 0/0 link.
So what we're going to do is we're going to bond or bind these 2 physical interfaces
into a logical EtherChannel or link aggregation
so that Spanning Tree sees the 2 physical ports as a single port
and doesn’t block either of the ports.
So once again on switch 1 notice that gigabit 0/1 is blocking
that will change in a moment when we create our link aggregation or EtherChannel.
So to configure an EtherChannel I’m gonna type
conf t type interface range gigabitEthernet 0/0 - 1
so I’m gonna make configuration changes on both of these interfaces at the same time.
I’m gonna shut the ports down and then I’m gonna type
switchport trunk encapsulation dot1q switchport mode trunk
channel channel-group 1
in other words, I’m going to put both of these interfaces into EtherChannel 1
you can create multiple EtherChannels on a switch.
So as an example, I could have 2 interfaces down to this access switch
and bonded them together in link aggregation 2 or EtherChannel 2
but in this example, I’m gonna use EtherChannel 1
I’m going to specify a mode
and in this example, I’m going to use LACP active mode.
Now in EtherChannel you have 3 ways of doing this
if you set it to on it means that you manually create an EtherChannel
and there’s no negotiation with the other side
the interface are simply added to an EtherChannel, you could also use LACP or PAgP
now LACP or Link Aggregation Control Protocol is an industry standard protocol
that allows switches to negotiate
the forming of link aggregated ports or EtherChannels as Cisco calls it.
Port aggregation protocol or PAgP is a Cisco propriety protocol
That allows you to configure link aggregated ports.
So you either set it on with no negotiation with the neighboring device.
So switch 1 as an example, will not negotiate with switch 2
to form a link aggregation or an EtherChannel or you specify LACP or PAgP
now when using LACP you have 2 options.
Active means that it will negotiate with the other side to form a link aggregation.
So it's actively trying to form a link aggregation with the remote end.
Passive means that the device is waiting for LACP messages neighboring device
before it forms a link aggregation.
So you want to ensure that you don’t set both sides to passive
because that means that both sides are waiting
for the other side to form the link aggregation
and because neither of them are initiating the link aggregation it won’t be formed.
So you can either set both sides to active or 1 side to active
and the other side to passive
but don’t set both sides to passive.
In our example, we're going to set both sides to active
now with PAgP you have a similar kind of idea.
PAgP desirable mode means that the switches going to ask
the other side to set up the link aggregation.
Auto means that it will wait for the other side to initiate the link aggregation.
So in our example
we’ve set link aggregation or the port channel mode to active.
So were using LACP or LACP or link aggregation
to form a link aggregation with the remote side.
Now from a Spanning Tree point of view
we're going to set the link type to point-to-point
to allow Spanning Tree to negotiate things quicker
we don’t want to use a shared link
we want to use point-to-point links to enhanced the Spanning Tree convergence timers.
In Rapid Spanning Tree if a link you shared
in other words, the duplex is half it uses timers
such as blocking, listening, learning and forwarding
but if it's a point-to-point link
Spanning Tree doesn’t have to wait for timers to expire
for ports to start forwarding
so you need to use point-to-point links
if you want to make use of rapid convergence and Rapid Spanning Tree.
So I’m going to no shut the interfaces at this port.
Let’s do something similar on switch 2
now you might want to wait till both sides
are I configured before you no shut the interfaces
because otherwise, you get messages such as the following.
LACP is not enabled on the remote end
so my link aggregation or EtherChannel hasn’t been formed,
so let’s look at the output of the show EtherChannel summary command
Notice at the moment we have 2 ports that have been added to EtherChannel 1
we're using the LACP protocol but notice D means that the ports down.
So we are setting up a layer 2 link aggregation, not a layer 3
so we are using switching rather than routing.
So we'll use trunks across this ports as an example
but the ports are currently down because the switch cannot negotiate with the other end.
The link aggregation is not working.
sh run will show me my configuration
notice there's my port channel and on my 2 interfaces
notice these 2 interfaces are part of the link aggregation or port channel
which is port channel 1
we're using LACP it’s a trunk port so using a layer 2 interface
and we're running Spanning Tree across this making them point to point links.
That’s means that Spanning Tree will converge quicker.
sh etherchannel port-channel
shows me some additional information
such as the number of ports in the link aggregation being 0
no ports are currently in this port channel.
So let’s configure switch 2 and see if it makes any difference.
So here switch 2, conf t int range gigabitEthernet 0/0 - 1
so these 2 core ports shut the interfaces down. e
switchport trunk encapsulation dot1q switchport mode trunk channel-group
we're going to use the same number in this case so EtherChannel 1
doesn’t have to be the same on both sides.
The mode we're going to use is active because we want to use LACP
and we want this ports to also initiate link aggregation with remote side.
spanning-tree link-type point-to-point
sh run
let’s see what we’ve configured and then I'll no shut the interface.
So there's our port channel or EtherChannel.
Here’s our configuration on the first port
and configuration on the second port.
Now something that's really important is make sure
that the configuration on all ports is the same.
So in other words, the speed and the duplex
the switch type all your settings need to be the same on both sides
to guarantee that the link aggregation comes up.
So I’ve no shut the port or rather no shut the port
let’s see if the negotiation takes place correctly.
So we can see the interface came up
there’s gigabit 0/0 coming up, here’s gigabit 0/1 coming up
so line status has changed to up
sh etherchannel summary, our 2 parts are bundled in a port channel.
So P using the protocol LACP, it’s a layer 2 EtherChannel.
So S for layer 2 and the ports are in used. So that's good.
Let’s look at the port channel
so we see more information now than we saw on switch 1 previously.
So our port channel is port channel 1
the number of ports in the channel are 2
we can see the 2 ports that are active in the channel
are gigabit 0/0 and gigabit 0/1
the last port that was bundled is 0/1, so back on switch 1
previously notice no ports were part of the port channel
but here the port channel did come up.
So if we do the command again
we now see that 2 ports are in the port channel
or link aggregation or EtherChannel
and both ports gigabit 0/0 and 0/1 are active.
So we’ve now bundled these 2 ports in a link aggregation
how does that affect Spanning Tree?
so sh spanning-tree vlan 20
Notice VLAN 20 is forwarding on all ports on switch 1
Vlan 1 all ports are forwarding, vlan 10 all ports are forwarding.
Now previously on switch 1 gigabit 0/1 was blocking
but notice now all ports are forwarding.
The root port of switch 1 is the port channel or EtherChannel.
Notice the path cost has gone down from 4 to 3
because it sees this as a better path.
Port is forwarding it’s the root port.
On switch 2 sh spanning-tree vlan 1
all ports are forwarding
port channel 1 or EtherChannel 1 is the root port
and were forwarding, cost has also gone down to 3
same for VLAN 10 and for VLAN 20.
All ports are forwarding on this core switches.
So for redundancy and for higher throughput
between our core switches, we want to enable link aggregation
or EtherChannel also called port channels.
Link aggregation or the bonding of multiple ports
will give us the ability to load balance traffic across the link aggregation.
It also means that Spanning Tree is not blocking 1 of the ports
so we get much better throughput across the links.
It also provides redundancy because if one of the ports goes down
the port channel will still be up.
So as an example, for VLAN 20 on switch 1 the root port is port 1
if I go into gigabit 0/0 and shut the port down
and then type show etherchannel summary
we can see that one of the ports has gone down
but one of the port is still in the port channel
and from a Spanning Tree point of view
the port channel is still up and still forwarding.
The difference here, however, is the cost has increased
because one of the ports has gone down.
go back into the interface and no shut it.
Look at Spanning Tree again
port is coming up, the root port is still port 0/1
looking at the summary notice both ports are part of the link aggregation now.
So as we can see the port channel is still used by Spanning Tree
it may take it a while for everything to converge
if we'll look at the port channel details.
Notice both ports are now active in the port channel a minute and 26 seconds ago
gigabit 0/0 was unbundled from the port channel
and then 47 seconds ago it was bundled back into the link aggregation or EtherChannel.
So that’s an example of setting up a layer 2 link aggregation between 2 switches
which provides for additional redundancy
additional throughput and stops Spanning Tree blocking ports unnecessarily.