en configure terminal interface Port-channel1 description TO_HOST_A switchport mode trunk exit interface Port-channel2 description TO_HOST_B switchport mode trunk exit interface range ethernet 0/0-1 channel-group 1 mode active no shutdown exit interface range ethernet 0/2-3 channel-group 2 mode active no shutdown exit
查看LACP状态 do show lacp neighbor Flags: S - Device is requesting Slow LACPDUs F - Device is requesting Fast LACPDUs A - Device is in Active mode P - Device is in Passive mode
Channel group 1 neighbors
Partner's information: LACP port Admin Oper Port Port Port Flags Priority Dev ID Age key Key Number State Et0/0 SA 255 5000.0003.0000 13s 0x0 0x9 0x2 0x3D Et0/1 SA 255 5000.0003.0000 13s 0x0 0x9 0x1 0x3D Channel group 2 neighbors Partner's information:
LACP port Admin Oper Port Port Port Flags Priority Dev ID Age key Key Number State Et0/2 SA 255 5000.0004.0000 13s 0x0 0x9 0x2 0x3D Et0/3 SA 255 5000.0004.0000 13s 0x0 0x9 0x1 0x3D
en conf t vlan 10 int vlan 10 ip add 192.168.1.254 255.255.255.0 no shut interface Port-channel1 switchport trunk allowed vlan add 10 exit interface Port-channel2 switchport trunk allowed vlan add 10 exit show ip inter bri Interface IP-Address OK? Method Status Protocol Ethernet0/0 unassigned YES unset up up Ethernet0/1 unassigned YES unset up up Ethernet0/2 unassigned YES unset up up Ethernet0/3 unassigned YES unset up up Ethernet1/0 unassigned YES unset up up Ethernet1/1 unassigned YES unset up up Ethernet1/2 unassigned YES unset up up Ethernet1/3 unassigned YES unset up up Port-channel1 unassigned YES unset up up Port-channel2 unassigned YES unset up up Vlan10 192.168.1.254 YES manual up up