JLAB(config)# interface port-channel 1
//進入port-channel 1設定介面
JLAB(config-if)# interface range gi1/0/4-5 //進入gi1/0/4與gi1/0/5共同介面
JLAB(config-if-range)# switchport trunk encapsulation dot1q //套用trunk協定IEEE 802.1Q (或者用ISL)
JLAB(config-if-range)# switchport mode trunk //設定trunk模式
JLAB(config-if-range)# switchport nonegotiate //取消DTP及對方協議用的封面
JLAB(config-if-range)# channel-group 1 mode active //設定LACP協定
JLAB# sh etherchannel
Channel-group listing:
----------------------
Group: 1
----------
Group state =
L2
Ports: 2 Maxports = 16
Port-channels:
1 Max Port-channels = 16
Protocol: LACP
JLAB# sh etherchannel port-channel
Channel-group listing:
----------------------
Group: 1
----------
Port-channels in the group:
---------------------------
Port-channel:
Po1 (Primary Aggregator)
------------
Age of the
Port-channel = 0d:00h:07m:18s
Logical
slot/port = 10/1 Number of ports = 0
HotStandBy port
= null
Port state = Port-channel Ag-Not-Inuse
Protocol = LACP
JLAB# sh etherchannel summary
Flags: D
- down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate
aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of
channel-groups in use: 1
Number of
aggregators: 1
Group
Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1
Po1(SD) LACP Gi1/0/4(D)
Gi1/0/5(D)
|