The main function of Port-channel in practical work is to bundle two or more ports into a virtual channel.
Interface Port-channel1
Description Port (1/0/5-6)
Switchport Trunk Encapsulation dot1q
Switchport Trunk allowed VLAN 10
Switchport mode Trunk
!
Interface Port-channel2
Description Port (1/0/7-8)
Switchport Trunk Encapsulation dot1q
Switchport Trunk allowed VLAN 10
Switchport mode Trunk
!
Interface Port-channel3
Description Port (1/0/9-10)
Switchport Trunk Encapsulation dot1q
Switchport Trunk allowed VLAN 10
Switchport mode Trunk
!
Interface Port-channel4
Description Port (1/0/11-12)
Shutdown
These are the configurations I made on the Cisco 3750, where:
Description Port (1/0/5-6) is a description of this virtual channel that tells the virtual channel to use port 1/0/5 and 6 ports
Switchport Trunk Encapsulation dot1q is a forced virtual channel using dot 1q to encapsulate packets
Switchport trunk allowed VLAN 10 is a VLAN that forces virtual channels to pass through, in this case only VLAN10 can pass through this channel
Switchport mode trunk is mandatory for triuk modes
The specific commands are as follows:
3750-route#configure Terminal
3750-route (config) #interface Port-channel 1
3750-route (config-if) #switchport mode trunk
3750-route (config-if) #switchport trunk Encapsulation dot1q
3750-route (config-if) #switchport trunk allowed VLAN 10
3750-route (config-if) #description xxxxxx
After you create Port-channel 1, you also need to configure the appropriate ports on the
interface gigabitethernet1/0/5
switchport Trunk Encapsulation dot1q
switchport mode trunk
channel-group 1 mode on
Interface gigabitethernet1/0/6
switchport Trunk Encapsulation dot1q
switchport mode trunk
channel-group 1 mode on
The last command is especially important here.
Channel-group 1 mode on is Port-channel 1 can call this port, in other words: This port belongs to Port-channel 1
The specific commands are as follows:
3750-route#configure Terminal
3750-route (config) #interface range gigabitethernet 1/0/5-6
3750-route (config-if) #switchport mode trunk
3750-route (config-if) #switchport trunk Encapsulation dot1q
3750-route (config-if) #description notes
3750-route (config-if) #channel-group 1 mode on
This article is from the Samba installation blog, so be sure to keep this source http://418195597.blog.51cto.com/686741/1829548
Cisco Port-channel set up port bundling methods