链路聚合:
链路聚合:
链路聚合 (Link Aggregation),也称为端口捆绑、端口聚集或链路聚集,链路聚合是将多个端口聚合在一起形成1个汇聚组,以实现出/入负荷在各成员端口中的分担。从外面看起来,1个汇聚组好像就是1个端口。
优点:
提高链路带宽
提高可靠性:同组成员彼此动态备份
要求:
加入链路聚合的端口的带宽,速度,vlan等设置都要一样
链路聚合 | 手工模式 | LACP | PAGP |
---|
名称 | | 链路聚合控制协议(IEEE802.3ad) | 端口聚合协议 | 开放性 | | 开放标准 | 思科私有 | 标准 | | Etherchannel and IEEE 802.3ad | Etherchannel | 模式 | Static On Mode | Active/Passive | Auto/Desirable |
SW1和SW2的f0/20-f0/23作为链路聚合的端口,PC1和PC2作为vlan1互相通信:
SW1:
Switch(config)
Switch(config-if-range)
Switch(config-if-range)
Switch(config-if-range)
Switch(config-if-range)
Switch(config-if)
Switch(config-if)
Switch(config-if)
Switch(config-if)
Switch(config)
SW2也是同样的配置:
SW1:
Switch(config)
Switch(config-if-range)
Switch(config-if-range)
Switch(config-if-range)
Switch(config-if)
Switch(config-if)
Switch(config-if)
Switch(config-if)
查看端口通道信息:
Switch
Channel-group listing:
----------------------
Group: 1
----------
Port-channels in the group:
---------------------------
Port-channel: Po1 (Primary Aggregator)
------------
Age of the Port-channel = 00d:04h:03m:59s
Logical slot/port = 2/1 Number of ports = 4
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel
Protocol = LACP
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/23 Active 0
0 00 Fa0/20 Active 0
0 00 Fa0/21 Active 0
0 00 Fa0/22 Active 0
Time since last port bundled: 00d:04h:02m:35s Fa0/22
Switch
Switch
查看聚合链路状态:
Switch
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(SU) LACP Fa0/20(P) Fa0/21(P) Fa0/22(P) Fa0/23(P)
两个PC互PING:
链路状态:
交换机之间的线路被捆绑成一个逻辑链路,不会被STP阻断,所有的链路都是开启状态。
手工模式:
设置如图上所示
手工模式设置链路聚合,在设置好端口聚合之前要先把端口关闭,设置好之后再打开端口:
Switch(config)
Switch(config-if-range)
Switch(config-if-range)
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
Switch(config-if-range)
Switch(config-if-range)
Creating a port-channel interface Port-channel 1
Switch(config-if-range)
Switch(config-if-range)
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
sw1:
查看链路信息:
Switch
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(SU) - Fa0/1(P) Fa0/2(P) p代表加入链路汇聚成功,H代表热备份,lacp最多支持8+8备份模式
查看汇聚端口:
Switch
Channel-group listing:
----------------------
Group: 1
----------
Port-channels in the group:
---------------------------
Port-channel: Po1
------------
Age of the Port-channel = 00d:00h:05m:01s
Logical slot/port = 2/1 Number of ports = 2
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel
Protocol = PAGP
Port Security = Disabled
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/1 On 0
0 00 Fa0/2 On 0
Time since last port bundled: 00d:00h:03m:40s Fa0/2
Switch
PAGP:
配置都一样,channel-protocol pagp
只要有一边设置成channel-group 1 mode Desirable,就可以组成聚合链路
|