Sw1(config)#int range e0/1 -2 Sw1(config-if-range)#channel-group 1 mode on =========================== Sw2(config)#int range e0/1 -2 Sw2(config-if-range)#channel-group 1 mode on
Sw1#sh etherchannel summary Flags: D - down P - bundled in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only) R - Layer3 S - Layer2 U - in use N - not in use, no aggregation f - failed to allocate aggregator
M - not in use, minimum links not met m - not in use, port not aggregated due to minimum links not met u - unsuitable for bundling w - waiting to be aggregated d - default port
A - formed by Auto LAG
Number of channel-groups in use: 1 Number of aggregators: 1
Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) - Et0/1(P) Et0/2(P) Sw2#sh int port-channel 1 Port-channel1 is up, line protocol is up (connected) Hardware is EtherChannel, address is aabb.cc00.2010 (bia aabb.cc00.2010) MTU 1500 bytes, BW 20000 Kbit/sec, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255
负载均衡
多条线路捆绑了之后,流量可以选择不同的负载均衡方式
默认的行为:源目IP地址对(src-dst-ip)
1 2 3 4 5 6 7
Sw2(config)#port-channel load-balance ? dst-ip Dst IP Addr dst-mac Dst Mac Addr src-dst-ip Src XOR Dst IP Addr src-dst-mac Src XOR Dst Mac Addr src-ip Src IP Addr src-mac Src Mac Addr