LACP基础

文档简介:服务器

     以华为LACP协议在交换机的应用为主,横向对比其余厂家配置,以及与其余厂家lacp对接的实现。网络

1、维基百科解释ide

链路聚合(英语: Link Aggregation )是一个计算机网络术语,指将多个物理端口汇聚在一块儿,造成一个逻辑端口,以实现出/入流量吞吐量在各成员端口的负荷分担,交换机根据用户配置的端口负荷分担策略决定网络封包从哪一个成员端口发送到对端的交换机。当交换机检测到其中一个成员端口的链路发生故障时,就中止在此端口上发送封包,并根据负荷分担策略在剩下的链路中从新计算报文的发送端口,故障端口恢复后再次担任收发端口。链路聚合在增长链路带宽实现链路传输弹性工程冗余等方面是一项很重要的技术。ui

2、Eth-Trunk基本配置spa

Image

<HUAWEI> system-view    
[~HUAWEI] interface eth-trunk 1    
[*HUAWEI-Eth-Trunk1] mode lacp-static    
[*HUAWEI-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3    
[*HUAWEI-Eth-Trunk1] commit计算机网络

[~HUAWEI-Eth-Trunk1] quitorm

华为的设备支持 两种Eth-trunk工做模式:blog

  • 手工负载分担模式接口

  • LACP模式:静态和动态文档

    手工负载分担(Manual load-balance)模式下,Eth-Trunk的创建、成员接口的加入由手工配置,没有LACP(link Aggregation Control Protocol)协议报文的参与。该模式下全部活动链路都参与数据的转发,平均分担流量,所以称为负载分担模式。若是某条活动链路故障,链路聚合组自动在剩余的活动链路中平均分担流量,当须要在两个直连设备间提供一个较大的链路带宽而设备又不支持LACP协议时,可使用手工负载分担模式。

    静态LACP(Static LACP)模式是一种利用LACP协议进行聚合参数协商、肯定活动接口和非活动接口的链路聚合方式。

    该模式下,需手工建立Eth-Trunk,手工加入Eth-Trunk成员接口,由LACP协议协商肯定活动接口和非活动接口。

    静态LACP模式也称为M∶N模式。这种方式同时能够实现链路负载分担和链路冗余备份的双重功能。在链路聚合组中M条链路处于活动状态,这些链路负责转发数据并进行负载分担,另外N条链路处于非活动状态做为备份链路,不转发数据。当M条链路中有链路出现故障时,系统会从N条备份链路中选择优先级最高的接替出现故障的链路,同时这条替换故障链路的备份链路状态变为活动状态开始转发数据。

    和静态LACP模式相对应的还包括动态LACP模式。动态LACP模式的链路聚合,从Eth-Trunk的建立到加入成员接口都不须要人工的干预,由LACP协议自动协商完成。通常用在跟服务器对接。

3、LACP 报文格式

Image(1)

Image(2)

Image(3)

4、华为跟其余厂家lacp模式对接表

Cisco 工做模式

Huawei 工做模式

on 

manual(缺省模式)

active(LACP)

lacp-static

passive(LACP)

lacp-static

atuo(PAgP)

不支持对接

desirable(PAgP)

不支持对接


备注:

     其余厂家如H3C、ZTE相似主要的区别就在于huawei LACP-STATIC对应的是其余厂家dynamic模式。

案例:

摘录自华为CE12800文档

  1. 组网图    
    图1 华为设备对接(或替换)CISCO设备      
    Image(4)

  2. 操做步骤

建立链路聚合组,配置LACP模式并将接口加入Eth-Trunk。

# 配置华为设备。

<HUAWEI> system-view 
[~HUAWEI] interface eth-trunk 1 
[*HUAWEI-Eth-Trunk1] mode lacp-static 
[*HUAWEI-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 
[*HUAWEI-Eth-Trunk1] commit 
[~HUAWEI-Eth-Trunk1] quit


 # 配置CISCO设备。

CISCO#configure terminal 
CISCO(config)#interface port-channel 1 
CISCO(config-if)#exit 
CISCO(config)#interface range gigabitEthernet 0/1, gigabitEthernet 0/2, gigabitEthernet 0/3
CISCO(config-if-range)#channel-protocol lacp
CISCO(config-if-range)#channel-group 1 mode active 
CISCO(config-if-range)#exit
CISCO(config)#exit

# 查看华为设备。

[~HUAWEI] display eth-trunk 1Eth-Trunk1's state information is:
Local:            
LAG ID: 1                       Working Mode: Static
System Priority: 32768          System ID: 0025-9e95-7c31
Operating Status: up            Number Of Up Ports In Trunk: 3
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
10GE1/0/1              Selected 1GE      32768   1      20289   10111100  1
10GE1/0/2              Selected 1GE      32768   2      20289   10111100  1
10GE1/0/3              Selected 1GE      32768   3      20289   10100000  1
Partner:
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
10GE1/0/1              32768    0025-9e95-7c11  32768   0      20289   10111100
10GE1/0/2              32768    0025-9e95-7c11  32768   0      20289   10111100
10GE1/0/3              32768    0025-9e95-7c11  32768   0      20289   10100000

# 查看CISCO设备。

CISCO#show etherchannel 1 port-channel
                Port-channels in the group:
                ---------------------------
 
Port-channel: Po1     (Primary Aggregator) 
------------ 
 
Age of the Port-channel   = 0d:05h:03m:48s
Logical slot/port   = 2/1           Number of ports = 3
HotStandBy port  =null 
Port state          = Port-channel Ag-Inuse 
Protocol            =   LACP 
Port security       = Disabled 
 
Ports in the Port-channel: 
 
Index    Load    Port    EC state      No of bits 
------+-------------+-----------+----------------------------------------------- 
   0     00      Gi0/1   Active            0 
   0     00      Gi0/2   Active            0 
   0     00      Gi0/3   Active            0 
 
Time since last port bundled:     0d:00h:44m:09s      Gi0/3
Time since last port Un-bundled:  0d:00h:44m:13s      Gi0/3
相关文章
相关标签/搜索