SW-1
SW-1# configure terminal
SW-1(config)# interface Ethernet0/0
SW-1(config-if)# switchport trunk allowed vlan 5,6
SW-1(config-if)# exit
SW-1(config)# interface Ethernet0/1
SW-1(config-if)# switchport trunk native vlan 77
SW-1(config-if)# end
SW-1# copy running-config startup-config
SW-2
SW-2# configure terminal
SW-2(config)# interface Ethernet0/1
SW-2(config-if)# switchport trunk native vlan 77
SW-2(config-if)# exit
SW-2(config)# interface Ethernet0/2
SW-2(config-if)# switchport trunk allowed vlan 6
SW-2(config-if)# end
SW-2# copy running-config startup-config
SW-3
SW-3# configure terminal
SW-3(config)# interface range Ethernet0/0 - 1
SW-3(config-if-range)# channel-group 34 mode active
SW-3(config-if-range)# end
SW-3# copy running-config startup-config
SW-4
SW-4# configure terminal
SW-4(config)# interface range Ethernet0/0 - 1
SW-4(config-if-range)# channel-group 34 mode passive
SW-4(config-if-range)# end
SW-4# copy running-config startup-config
Verification commands:
SW-1# show interfaces trunk
SW-2# show interfaces trunk
SW-3# show etherchannel summary
SW-4# show etherchannel summary
SW-3# show interfaces port-channel 34
SW-4# show interfaces port-channel 34
The command switchport trunk allowed vlan 5,6 replaces the default allowed-VLAN list on SW-1 Ethernet0/0 so that only VLANs 5 and 6 can cross that trunk. The same command with VLAN 6 restricts SW-2 Ethernet0/2 to VLAN 6. Cisco documents that all VLANs are permitted on a trunk by default and that switchport trunk allowed vlan vlan-list defines the permitted list. The native VLAN must match at both ends of an 802.1Q trunk, so VLAN 77 is configured on Ethernet0/1 of both SW-1 and SW-2.
For LACP, active initiates negotiation and passive only responds. Therefore, SW-3 must use channel-group 34 mode active, while SW-4 must use channel-group 34 mode passive. Cisco confirms that active-to-passive forms an EtherChannel, whereas passive-to-passive does not. Because the physical interfaces are already identically configured as trunks, no trunk commands should be replaced during channel creation. The channel-group command creates and binds the physical members to logical Port-Channel 34.
Submit