1 00:00:00,000 --> 00:00:04,000 In a previous video, we optimize Spanning Tree 2 00:00:04,000 --> 00:00:08,000 to make switch 1 the root for VLANs 1 and 10 3 00:00:08,000 --> 00:00:10,000 and switch 2 the root for VLAN 20. 4 00:00:10,000 --> 00:00:15,000 On switch 1 as an example sh spanning-tree vlan 1 5 00:00:15,000 --> 00:00:19,000 shows me that the switch is forwarding on all ports 6 00:00:19,000 --> 00:00:26,000 and the same is true for VLAN 10 but for VLAN 20 7 00:00:26,000 --> 00:00:30,000 the switch is blocking on gigabit 0/1. 8 00:00:30,000 --> 00:00:35,000 The same is true on switch 2 sh spanning-tree vlan 1 9 00:00:35,000 --> 00:00:40,000 switch is blocking on gigabit 0/1 for VLAN 10 10 00:00:40,000 --> 00:00:44,000 switch is blocking on gigabit 0/1 11 00:00:44,000 --> 00:00:48,000 but is forwarding on all ports for VLAN 20. 12 00:00:48,000 --> 00:00:56,000 So in other words, traffic that sent by say this PC to NPM is gonna be sent 13 00:00:56,000 --> 00:01:03,000 to switch 2 and then its gonna be forwarded across gigabit 0/0 to get to NPM. 14 00:01:03,000 --> 00:01:06,000 That’s ok if you only have a few PCs 15 00:01:06,000 --> 00:01:11,000 but if you had multiple access switches with their host in VLAN 20 16 00:01:11,000 --> 00:01:14,000 their traffic would be sent to this switch 17 00:01:14,000 --> 00:01:17,000 and traffic would have to go across this gigabit link 18 00:01:17,000 --> 00:01:23,000 which will become a bottleneck to get to say multiple servers on the left-hand side. 19 00:01:23,000 --> 00:01:28,000 So traffic that's traversing from 1 core switch to another 20 00:01:28,000 --> 00:01:31,000 is being limited to using this gigabit 0/0 link. 21 00:01:31,000 --> 00:01:37,000 So what we're going to do is we're going to bond or bind these 2 physical interfaces 22 00:01:37,000 --> 00:01:40,000 into a logical EtherChannel or link aggregation 23 00:01:40,000 --> 00:01:46,000 so that Spanning Tree sees the 2 physical ports as a single port 24 00:01:46,000 --> 00:01:48,000 and doesn’t block either of the ports. 25 00:01:48,000 --> 00:01:54,000 So once again on switch 1 notice that gigabit 0/1 is blocking 26 00:01:54,000 --> 00:02:01,000 that will change in a moment when we create our link aggregation or EtherChannel. 27 00:02:01,000 --> 00:02:04,000 So to configure an EtherChannel I’m gonna type 28 00:02:04,000 --> 00:02:11,000 conf t type interface range gigabitEthernet 0/0 - 1 29 00:02:11,000 --> 00:02:15,000 so I’m gonna make configuration changes on both of these interfaces at the same time. 30 00:02:15,000 --> 00:02:18,000 I’m gonna shut the ports down and then I’m gonna type 31 00:02:18,000 --> 00:02:28,000 switchport trunk encapsulation dot1q switchport mode trunk 32 00:02:28,000 --> 00:02:33,000 channel channel-group 1 33 00:02:33,000 --> 00:02:40,000 in other words, I’m going to put both of these interfaces into EtherChannel 1 34 00:02:40,000 --> 00:02:42,000 you can create multiple EtherChannels on a switch. 35 00:02:42,000 --> 00:02:46,000 So as an example, I could have 2 interfaces down to this access switch 36 00:02:46,000 --> 00:02:51,000 and bonded them together in link aggregation 2 or EtherChannel 2 37 00:02:51,000 --> 00:02:54,000 but in this example, I’m gonna use EtherChannel 1 38 00:02:54,000 --> 00:02:56,000 I’m going to specify a mode 39 00:02:56,000 --> 00:03:03,000 and in this example, I’m going to use LACP active mode. 40 00:03:03,000 --> 00:03:07,000 Now in EtherChannel you have 3 ways of doing this 41 00:03:07,000 --> 00:03:11,000 if you set it to on it means that you manually create an EtherChannel 42 00:03:11,000 --> 00:03:14,000 and there’s no negotiation with the other side 43 00:03:14,000 --> 00:03:22,000 the interface are simply added to an EtherChannel, you could also use LACP or PAgP 44 00:03:22,000 --> 00:03:27,000 now LACP or Link Aggregation Control Protocol is an industry standard protocol 45 00:03:27,000 --> 00:03:29,000 that allows switches to negotiate 46 00:03:29,000 --> 00:03:35,000 the forming of link aggregated ports or EtherChannels as Cisco calls it. 47 00:03:35,000 --> 00:03:41,000 Port aggregation protocol or PAgP is a Cisco propriety protocol 48 00:03:41,000 --> 00:03:45,000 That allows you to configure link aggregated ports. 49 00:03:45,000 --> 00:03:50,000 So you either set it on with no negotiation with the neighboring device. 50 00:03:50,000 --> 00:03:54,000 So switch 1 as an example, will not negotiate with switch 2 51 00:03:54,000 --> 00:04:01,000 to form a link aggregation or an EtherChannel or you specify LACP or PAgP 52 00:04:01,000 --> 00:04:04,000 now when using LACP you have 2 options. 53 00:04:04,000 --> 00:04:11,000 Active means that it will negotiate with the other side to form a link aggregation. 54 00:04:11,000 --> 00:04:16,000 So it's actively trying to form a link aggregation with the remote end. 55 00:04:16,000 --> 00:04:22,000 Passive means that the device is waiting for LACP messages neighboring device 56 00:04:22,000 --> 00:04:24,000 before it forms a link aggregation. 57 00:04:24,000 --> 00:04:27,000 So you want to ensure that you don’t set both sides to passive 58 00:04:27,000 --> 00:04:30,000 because that means that both sides are waiting 59 00:04:30,000 --> 00:04:33,000 for the other side to form the link aggregation 60 00:04:33,000 --> 00:04:38,000 and because neither of them are initiating the link aggregation it won’t be formed. 61 00:04:38,000 --> 00:04:41,000 So you can either set both sides to active or 1 side to active 62 00:04:41,000 --> 00:04:43,000 and the other side to passive 63 00:04:43,000 --> 00:04:46,000 but don’t set both sides to passive. 64 00:04:46,000 --> 00:04:49,000 In our example, we're going to set both sides to active 65 00:04:49,000 --> 00:04:52,000 now with PAgP you have a similar kind of idea. 66 00:04:52,000 --> 00:04:57,000 PAgP desirable mode means that the switches going to ask 67 00:04:57,000 --> 00:04:59,000 the other side to set up the link aggregation. 68 00:04:59,000 --> 00:05:04,000 Auto means that it will wait for the other side to initiate the link aggregation. 69 00:05:04,000 --> 00:05:06,000 So in our example 70 00:05:06,000 --> 00:05:11,000 we’ve set link aggregation or the port channel mode to active. 71 00:05:11,000 --> 00:05:16,000 So were using LACP or LACP or link aggregation 72 00:05:16,000 --> 00:05:18,000 to form a link aggregation with the remote side. 73 00:05:18,000 --> 00:05:21,000 Now from a Spanning Tree point of view 74 00:05:21,000 --> 00:05:24,000 we're going to set the link type to point-to-point 75 00:05:24,000 --> 00:05:29,000 to allow Spanning Tree to negotiate things quicker 76 00:05:29,000 --> 00:05:32,000 we don’t want to use a shared link 77 00:05:32,000 --> 00:05:37,000 we want to use point-to-point links to enhanced the Spanning Tree convergence timers. 78 00:05:37,000 --> 00:05:41,000 In Rapid Spanning Tree if a link you shared 79 00:05:41,000 --> 00:05:44,000 in other words, the duplex is half it uses timers 80 00:05:44,000 --> 00:05:47,000 such as blocking, listening, learning and forwarding 81 00:05:47,000 --> 00:05:49,000 but if it's a point-to-point link 82 00:05:49,000 --> 00:05:52,000 Spanning Tree doesn’t have to wait for timers to expire 83 00:05:52,000 --> 00:05:54,000 for ports to start forwarding 84 00:05:54,000 --> 00:05:56,000 so you need to use point-to-point links 85 00:05:56,000 --> 00:06:00,000 if you want to make use of rapid convergence and Rapid Spanning Tree. 86 00:06:00,000 --> 00:06:03,000 So I’m going to no shut the interfaces at this port. 87 00:06:03,000 --> 00:06:07,000 Let’s do something similar on switch 2 88 00:06:07,000 --> 00:06:10,000 now you might want to wait till both sides 89 00:06:10,000 --> 00:06:13,000 are I configured before you no shut the interfaces 90 00:06:13,000 --> 00:06:16,000 because otherwise, you get messages such as the following. 91 00:06:16,000 --> 00:06:20,000 LACP is not enabled on the remote end 92 00:06:20,000 --> 00:06:24,000 so my link aggregation or EtherChannel hasn’t been formed, 93 00:06:24,000 --> 00:06:32,000 so let’s look at the output of the show EtherChannel summary command 94 00:06:32,000 --> 00:06:40,000 Notice at the moment we have 2 ports that have been added to EtherChannel 1 95 00:06:40,000 --> 00:06:46,000 we're using the LACP protocol but notice D means that the ports down. 96 00:06:46,000 --> 00:06:52,000 So we are setting up a layer 2 link aggregation, not a layer 3 97 00:06:52,000 --> 00:06:55,000 so we are using switching rather than routing. 98 00:06:55,000 --> 00:06:59,000 So we'll use trunks across this ports as an example 99 00:06:59,000 --> 00:07:06,000 but the ports are currently down because the switch cannot negotiate with the other end. 100 00:07:06,000 --> 00:07:08,000 The link aggregation is not working. 101 00:07:08,000 --> 00:07:11,000 sh run will show me my configuration 102 00:07:11,000 --> 00:07:15,000 notice there's my port channel and on my 2 interfaces 103 00:07:15,000 --> 00:07:20,000 notice these 2 interfaces are part of the link aggregation or port channel 104 00:07:20,000 --> 00:07:22,000 which is port channel 1 105 00:07:22,000 --> 00:07:30,000 we're using LACP it’s a trunk port so using a layer 2 interface 106 00:07:30,000 --> 00:07:35,000 and we're running Spanning Tree across this making them point to point links. 107 00:07:35,000 --> 00:07:40,000 That’s means that Spanning Tree will converge quicker. 108 00:07:40,000 --> 00:07:44,000 sh etherchannel port-channel 109 00:07:44,000 --> 00:07:48,000 shows me some additional information 110 00:07:48,000 --> 00:07:52,000 such as the number of ports in the link aggregation being 0 111 00:07:52,000 --> 00:07:56,000 no ports are currently in this port channel. 112 00:07:56,000 --> 00:08:00,000 So let’s configure switch 2 and see if it makes any difference. 113 00:08:00,000 --> 00:08:09,000 So here switch 2, conf t int range gigabitEthernet 0/0 - 1 114 00:08:09,000 --> 00:08:14,000 so these 2 core ports shut the interfaces down. e 115 00:08:14,000 --> 00:08:28,000 switchport trunk encapsulation dot1q switchport mode trunk channel-group 116 00:08:28,000 --> 00:08:32,000 we're going to use the same number in this case so EtherChannel 1 117 00:08:32,000 --> 00:08:34,000 doesn’t have to be the same on both sides. 118 00:08:34,000 --> 00:08:40,000 The mode we're going to use is active because we want to use LACP 119 00:08:40,000 --> 00:08:46,000 and we want this ports to also initiate link aggregation with remote side. 120 00:08:46,000 --> 00:08:51,000 spanning-tree link-type point-to-point 121 00:08:51,000 --> 00:08:53,000 sh run 122 00:08:53,000 --> 00:08:57,000 let’s see what we’ve configured and then I'll no shut the interface. 123 00:08:57,000 --> 00:09:00,000 So there's our port channel or EtherChannel. 124 00:09:00,000 --> 00:09:05,000 Here’s our configuration on the first port 125 00:09:05,000 --> 00:09:08,000 and configuration on the second port. 126 00:09:08,000 --> 00:09:12,000 Now something that's really important is make sure 127 00:09:12,000 --> 00:09:16,000 that the configuration on all ports is the same. 128 00:09:16,000 --> 00:09:19,000 So in other words, the speed and the duplex 129 00:09:19,000 --> 00:09:23,000 the switch type all your settings need to be the same on both sides 130 00:09:23,000 --> 00:09:27,000 to guarantee that the link aggregation comes up. 131 00:09:27,000 --> 00:09:34,000 So I’ve no shut the port or rather no shut the port 132 00:09:34,000 --> 00:09:38,000 let’s see if the negotiation takes place correctly. 133 00:09:38,000 --> 00:09:41,000 So we can see the interface came up 134 00:09:41,000 --> 00:09:45,000 there’s gigabit 0/0 coming up, here’s gigabit 0/1 coming up 135 00:09:45,000 --> 00:09:48,000 so line status has changed to up 136 00:09:48,000 --> 00:09:57,000 sh etherchannel summary, our 2 parts are bundled in a port channel. 137 00:09:57,000 --> 00:10:03,000 So P using the protocol LACP, it’s a layer 2 EtherChannel. 138 00:10:03,000 --> 00:10:08,000 So S for layer 2 and the ports are in used. So that's good. 139 00:10:08,000 --> 00:10:11,000 Let’s look at the port channel 140 00:10:11,000 --> 00:10:19,000 so we see more information now than we saw on switch 1 previously. 141 00:10:19,000 --> 00:10:22,000 So our port channel is port channel 1 142 00:10:22,000 --> 00:10:25,000 the number of ports in the channel are 2 143 00:10:25,000 --> 00:10:30,000 we can see the 2 ports that are active in the channel 144 00:10:30,000 --> 00:10:33,000 are gigabit 0/0 and gigabit 0/1 145 00:10:33,000 --> 00:10:38,000 the last port that was bundled is 0/1, so back on switch 1 146 00:10:38,000 --> 00:10:43,000 previously notice no ports were part of the port channel 147 00:10:43,000 --> 00:10:46,000 but here the port channel did come up. 148 00:10:46,000 --> 00:10:49,000 So if we do the command again 149 00:10:49,000 --> 00:10:53,000 we now see that 2 ports are in the port channel 150 00:10:53,000 --> 00:10:55,000 or link aggregation or EtherChannel 151 00:10:55,000 --> 00:11:00,000 and both ports gigabit 0/0 and 0/1 are active. 152 00:11:00,000 --> 00:11:03,000 So we’ve now bundled these 2 ports in a link aggregation 153 00:11:03,000 --> 00:11:05,000 how does that affect Spanning Tree? 154 00:11:05,000 --> 00:11:08,000 so sh spanning-tree vlan 20 155 00:11:08,000 --> 00:11:13,000 Notice VLAN 20 is forwarding on all ports on switch 1 156 00:11:13,000 --> 00:11:20,000 Vlan 1 all ports are forwarding, vlan 10 all ports are forwarding. 157 00:11:20,000 --> 00:11:25,000 Now previously on switch 1 gigabit 0/1 was blocking 158 00:11:25,000 --> 00:11:28,000 but notice now all ports are forwarding. 159 00:11:28,000 --> 00:11:34,000 The root port of switch 1 is the port channel or EtherChannel. 160 00:11:34,000 --> 00:11:38,000 Notice the path cost has gone down from 4 to 3 161 00:11:38,000 --> 00:11:40,000 because it sees this as a better path. 162 00:11:40,000 --> 00:11:43,000 Port is forwarding it’s the root port. 163 00:11:43,000 --> 00:11:50,000 On switch 2 sh spanning-tree vlan 1 164 00:11:50,000 --> 00:11:52,000 all ports are forwarding 165 00:11:52,000 --> 00:11:56,000 port channel 1 or EtherChannel 1 is the root port 166 00:11:56,000 --> 00:12:00,000 and were forwarding, cost has also gone down to 3 167 00:12:00,000 --> 00:12:04,000 same for VLAN 10 and for VLAN 20. 168 00:12:04,000 --> 00:12:07,000 All ports are forwarding on this core switches. 169 00:12:07,000 --> 00:12:11,000 So for redundancy and for higher throughput 170 00:12:11,000 --> 00:12:15,000 between our core switches, we want to enable link aggregation 171 00:12:15,000 --> 00:12:18,000 or EtherChannel also called port channels. 172 00:12:18,000 --> 00:12:22,000 Link aggregation or the bonding of multiple ports 173 00:12:22,000 --> 00:12:26,000 will give us the ability to load balance traffic across the link aggregation. 174 00:12:26,000 --> 00:12:31,000 It also means that Spanning Tree is not blocking 1 of the ports 175 00:12:31,000 --> 00:12:34,000 so we get much better throughput across the links. 176 00:12:34,000 --> 00:12:38,000 It also provides redundancy because if one of the ports goes down 177 00:12:38,000 --> 00:12:40,000 the port channel will still be up. 178 00:12:40,000 --> 00:12:46,000 So as an example, for VLAN 20 on switch 1 the root port is port 1 179 00:12:46,000 --> 00:12:50,000 if I go into gigabit 0/0 and shut the port down 180 00:12:50,000 --> 00:12:56,000 and then type show etherchannel summary 181 00:12:56,000 --> 00:13:00,000 we can see that one of the ports has gone down 182 00:13:00,000 --> 00:13:03,000 but one of the port is still in the port channel 183 00:13:03,000 --> 00:13:07,000 and from a Spanning Tree point of view 184 00:13:07,000 --> 00:13:10,000 the port channel is still up and still forwarding. 185 00:13:10,000 --> 00:13:13,000 The difference here, however, is the cost has increased 186 00:13:13,000 --> 00:13:16,000 because one of the ports has gone down. 187 00:13:16,000 --> 00:13:21,000 go back into the interface and no shut it. 188 00:13:21,000 --> 00:13:24,000 Look at Spanning Tree again 189 00:13:24,000 --> 00:13:31,000 port is coming up, the root port is still port 0/1 190 00:13:31,000 --> 00:13:37,000 looking at the summary notice both ports are part of the link aggregation now. 191 00:13:37,000 --> 00:13:42,000 So as we can see the port channel is still used by Spanning Tree 192 00:13:42,000 --> 00:13:45,000 it may take it a while for everything to converge 193 00:13:45,000 --> 00:13:50,000 if we'll look at the port channel details. 194 00:13:50,000 --> 00:14:00,000 Notice both ports are now active in the port channel a minute and 26 seconds ago 195 00:14:00,000 --> 00:14:04,000 gigabit 0/0 was unbundled from the port channel 196 00:14:04,000 --> 00:14:11,000 and then 47 seconds ago it was bundled back into the link aggregation or EtherChannel. 197 00:14:11,000 --> 00:14:17,000 So that’s an example of setting up a layer 2 link aggregation between 2 switches 198 00:14:17,000 --> 00:14:20,000 which provides for additional redundancy 199 00:14:20,000 --> 00:14:25,000 additional throughput and stops Spanning Tree blocking ports unnecessarily.