Print

华三&华为链路聚合配置案例

配置步骤

华为:

在DeviceA和DeviceB上分别创建Eth-Trunk1并配置为手工模式。

# 配置DeviceA。

<HUAWEI> system-view

[HUAWEI] sysname DeviceA

[DeviceA] interface eth-trunk 1

[DeviceA-Eth-Trunk1] portswitch

[DeviceA-Eth-Trunk1] mode manual load-balance

# 配置DeviceB。

<HUAWEI> system-view

[HUAWEI] sysname DeviceB

[DeviceB] interface eth-trunk 1

[DeviceB-Eth-Trunk1] portswitch

[DeviceB-Eth-Trunk1] mode manual load-balance

#

向DeviceA和DeviceB的Eth-Trunk接口中加入成员接口。

# 配置DeviceA。

[DeviceA-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 

[DeviceA-Eth-Trunk1] quit

# 配置DeviceB。

[DeviceB-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 

[DeviceB-Eth-Trunk1] quit

#

在任意视图下执行display eth-trunk 1命令,检查Eth-Trunk是否创建成功,及成员接口是否正确加入。

 

[DeviceA] display eth-trunk 1

Eth-Trunk1's state information is: 

Working Mode: Normal           Hash Arithmetic: profile default

Least Active-linknumber: 1     Max Bandwidth-affected-linknumber: 128

Operating Status: up           Number of Up Ports in Trunk: 3

--------------------------------------------------------------------------------

PortName                        Status       Weight

10GE1/0/1                       Up           1

10GE1/0/2                       Up           1

10GE1/0/3                       Up           1

从以上信息看出Eth-Trunk 1中包含3个成员接口10GE1/0/1、10GE1/0/2、10GE1/0/3,成员接口的状态都为Up。Eth-Trunk 1的“Operating Status”为Up

 

在DeviceA和DeviceB上分别创建Eth-Trunk1并配置为静态LACP模式。

# 配置DeviceA。

 

<HUAWEI> system-view

[HUAWEI] sysname DeviceA

[DeviceA] interface eth-trunk 1

[DeviceA-Eth-Trunk1] mode lacp-static

[DeviceA-Eth-Trunk1] quit

# 配置DeviceB。

 

<HUAWEI> system-view

[HUAWEI] sysname DeviceB

[DeviceB] interface eth-trunk 1

[DeviceB-Eth-Trunk1] mode lacp-static

[DeviceB-Eth-Trunk1] quit

向DeviceA和DeviceB的Eth-Trunk接口中加入成员接口。

# 配置DeviceA。

 

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE1/0/1] eth-trunk 1

[DeviceA-10GE1/0/1] quit

[DeviceA] interface 10ge 1/0/2

[DeviceA-10GE1/0/2] eth-trunk 1

[DeviceA-10GE1/0/2] quit

[DeviceA] interface 10ge 1/0/3

[DeviceA-10GE1/0/3] eth-trunk 1

[DeviceA-10GE1/0/3] quit

# 配置DeviceB。

[DeviceB] interface 10ge 1/0/1

[DeviceB-10GE1/0/1] eth-trunk 1

[DeviceB-10GE1/0/1] quit

[DeviceB] interface 10ge 1/0/2

[DeviceB-10GE1/0/2] eth-trunk 1

[DeviceB-10GE1/0/2] quit

[DeviceB] interface 10ge 1/0/3

[DeviceB-10GE1/0/3] eth-trunk 1

[DeviceB-10GE1/0/3] quit

 

华三:

采用静态聚合模式:创建二层聚合接口1

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] quit

·     采用动态聚合模式:创建二层聚合接口1,并配置动态聚合模式

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceA-Bridge-Aggregation1] quit

# 将端口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3加入到聚合组1中。

[DeviceA] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/3

[DeviceA-if-range] port link-aggregation group 1

[DeviceA-if-range] quit

# 配置二层聚合接口1为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] port link-type trunk

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

[DeviceA-Bridge-Aggregation1] quit

 

采用静态聚合模式:创建二层聚合接口1

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] quit

·     采用动态聚合模式:创建二层聚合接口1,并配置动态聚合模式

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] link-aggregation mode dynamic

[DeviceB-Bridge-Aggregation1] quit

# 将端口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3加入到聚合组1中。

[DeviceB] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/3

[DeviceB-if-range] port link-aggregation group 1

[DeviceB-if-range] quit

# 配置二层聚合接口1为Trunk端口,并允许VLAN 10和VLAN 20的报文通过。

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] port link-type trunk

Configuring Ten-GigabitEthernet1/0/1 done.

 

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

[DeviceB-Bridge-Aggregation1] port trunk permit vlan 10 20

Configuring Ten-GigabitEthernet1/0/1 done.

Configuring Ten-GigabitEthernet1/0/2 done.

Configuring Ten-GigabitEthernet1/0/3 done.

[DeviceB-Bridge-Aggregation1] quit

#

# 通过display link-aggregation verbose命令来显示聚合组的相关信息,以验证配置是否成功。

·     采用静态聚合模式的链路聚合配置信息

[DeviceA] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

Aggregation Interface: Bridge-Aggregation1

Aggregation Mode: Static

Loadsharing Type: Shar

Management VLANs: None

  Port             Status  Priority  Oper-Key

  XGE1/0/1(R)      S       32768     1

  XGE1/0/2         S       32768     1

  XGE1/0/3         S       32768     1

结果说明:本端加入到静态聚合组内的成员端口都处于Selected状态,与对端对应端口是否是Selected状态无关。

·     采用动态聚合模式的链路聚合配置信息

[DeviceA] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

Aggregation Interface: Bridge-Aggregation1

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

System ID: 0x8000, 000f-e234-5678

Local:

  Port                Status   Priority Index    Oper-Key               Flag

GE1/0/1            S        32768    2        1                      {ACDEF}

  XGE1/0/2            S        32768    3        1                      {ACDEF}

  XGE1/0/3            S        32768    4        1                      {ACDEF}

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

  XGE1/0/1(R)         32768    2        1        0x8000, a4e5-c316-0100 {ACDEF}

  XGE1/0/2            32768    3        1        0x8000, a4e5-c316-0100 {ACDEF}

  XGE1/0/3            32768    4        1        0x8000, a4e5-c316-0100 {ACDEF}

结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过LACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。