Cisco switch configuration link aggregation
The networking is shown in the figure below, using the GNS3 emulator to run two Cisco Layer 3 switches.
SW1 configuration:
SW1(config)#int range g0/0-2
SW1(config-if-range)#switchport
SW1(config)#int range g0/0-1
SW1(config-if-range)#channel-protocol lacp
SW1(config-if-range)#channel-group 1 mode active
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#switchport trunk allow vlan all
SW2 configuration:
SW2(config)#int range g0/0-2
SW2(config-if-range)#switchport
SW2(config)#int range g0/0-1
SW2(config-if-range)#channel-protocol lacp
SW2(config-if-range)#channel-group 1 mode active
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#switchport trunk allow vlan all
PC configuration IP address
PC1> ip 192.168.1.1 255.255.255.0
PC2> ip 192.168.1.2 255.255.255.0
View port status
SW1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset up up
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/2 unassigned YES unset up up
......
Port-channel1 unassigned YES unset up up
verify connectivity
PC1> ping 192.168.1.2
84 bytes from 192.168.1.2 icmp_seq=1 ttl=64 time=6.181 ms
84 bytes from 192.168.1.2 icmp_seq=2 ttl=64 time=6.007 ms
84 bytes from 192.168.1.2 icmp_seq=3 ttl=64 time=5.537 ms
84 bytes from 192.168.1.2 icmp_seq=4 ttl=64 time=8.162 ms
84 bytes from 192.168.1.2 icmp_seq=5 ttl=64 time=7.173 ms