路由交换技术-链路聚合
作者:互联网
以太网的链路聚合
通过将多个物理端口聚合为一个逻辑端口,能够解决单一链路带宽资源不够的问题。生成树会将其作为一个逻辑接口,不会去阻塞物理端口。
1.提高带宽
2.基于链路的负载
两种动态协商的方案
1.pagp:端口聚合组协议,思科私有协议
2.lacp:链路聚合通道协议 IEEE 802.3ad 公有协议
active 主动协商
passive 被动协商
配置以太通道的注意事项:
1.速率和双工模式
2.工作模式(access or trunk),如果是access端口,VLAN归属必须一致
实验环境
二层以太通道配置如下:
interface Port-channel6
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 6 mode active
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 6 mode active
SW1(config)#default interface range 0/0-1 #清除端口配置
SW1(config)#interface range ethernet 0/0-1 #进入端口组
SW1(config-if-range)#shutdown
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#switchport trunk allowed vlan all
SW1(config-if-range)#channel-group 6 mode active #配置聚合组,并设为active模式
SW1(config-if-range)#no shutdown
SW1#show interfaces port-channel 6
Port-channel6 is up, line protocol is up (connected)
SW1#show etherchannel
Channel-group listing:
----------------------
Group: 6
----------
Group state = L2
Ports: 2 Maxports = 4
Port-channels: 1 Max Port-channels = 4
Protocol: LACP
Minimum Links: 0
SW1(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
SW1#show etherchannel summary
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
6 Po6(SU) LACP Et0/0(P) Et0/1(P)
三层以太通道配置:
interface Port-channel1
no switchport
ip address 10.1.1.1 255.255.255.0
!
interface Ethernet0/0
no switchport
no ip address
duplex auto
channel-group 1 mode active
!
interface Ethernet0/1
no switchport
no ip address
duplex auto
channel-group 1 mode active
Switch#show etherchannel summary
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(RU) LACP Et0/0(P) Et0/1(P)
Switch#ping 10.1.1.2 repeat 10
Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!!!!!!
标签:聚合,switchport,trunk,路由,链路,SW1,config,channel,mode 来源: https://www.cnblogs.com/gzsws/p/13496783.html