28-H3C SR6600-F路由器 以太网链路聚合典型配置举例
本章节下载: 28-H3C SR6600-F路由器 以太网链路聚合典型配置举例 (239.42 KB)
Copyright © 2018 新华三技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
|
目 录
本文档介绍以太网链路聚合特性的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解以太网链路聚合特性。
如图3-1所示,Device A与Device B通过以太网链路互连。要求在Device A和Device B上分别配置三层链路聚合组,并为对应的三层聚合接口配置IP地址和子网掩码,从而提高两设备之间的带宽与可靠性。
图3-1 三层聚合配置示例图
本举例是在R7607版本上进行配置和验证的。
链路聚合分为静态聚合和动态聚合两种模式,用户可根据这两种模式的特点,结合具体组网情况选择其中一种进行配置。
· 静态聚合组在完成配置后,端口的选中/非选中状态不受网络环境的影响,比较稳定,但不能根据对端的状态调整成员端口的选中/非选中状态。
· 动态聚合组能够根据对端和本端的信息调整端口的选中/非选中状态,比较灵活,但其成员端口的选中/非选中状态容易受网络环境的影响。
# 创建三层聚合接口1。(根据具体情况选择下面两种方式之一)
· 采用静态聚合模式
<DeviceA> system-view
[DeviceA] interface route-aggregation 1
· 采用动态聚合模式
[DeviceA] interface route-aggregation 1
[DeviceA-Route-Aggregation1] link-aggregation mode dynamic
# 为三层聚合接口1配置IP地址和子网掩码。
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# 将接口GigabitEthernet2/1/1~GigabitEthernet2/1/3加入聚合组1。
[DeviceA] interface range gigabitethernet 2/1/1 to gigabitethernet 2/1/3
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
Device B上的配置与Device A相同,配置过程略。
# 通过display link-aggregation verbose命令来显示聚合组的相关信息,以验证配置是否成功。
· 采用静态聚合模式的聚合组信息
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
Port Status Priority Oper-Key
--------------------------------------------------------------------------------
GE2/1/1 S 32768 1
GE2/1/2 S 32768 1
GE2/1/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
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Dynamic
Loadsharing Type: Shar
System ID: 0x8000, 000f-e267-6c6a
Local:
Port Status Priority Oper-Key Flag
--------------------------------------------------------------------------------
GE2/1/1 S 32768 1 {ACDEF}
GE2/1/2 S 32768 1 {ACDEF}
GE2/1/3 S 32768 1 {ACDEF}
Remote:
Actor Partner Priority Oper-Key SystemID Flag
--------------------------------------------------------------------------------
GE2/1/1 1 32768 1 0x8000, 000f-e267-57ad {ACDEF}
GE2/1/2 2 32768 1 0x8000, 000f-e267-57ad {ACDEF}
GE2/1/3 3 32768 1 0x8000, 000f-e267-57ad {ACDEF}
结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过LACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。
· Device A:
#
¡ 采用静态聚合模式
#
interface route-aggregation1
ip address 192.168.1.1 255.255.255.0
#
¡ 采用动态聚合模式
#
interface route-aggregation1
ip address 192.168.1.1 255.255.255.0
link-aggregation mode dynamic
#
interface GigabitEthernet2/1/1
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/2
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/3
port link-mode route
port link-aggregation group 1
#
· Device B:
Device B上的配置文件与Device A类似。
如图4-1所示:
· Device A与Device B通过各自的三层以太网接口GigabitEthernet2/1/1~GigabitEthernet2/1/4相互连接。
· 在Device A和Device B上分别配置两个三层静态链路聚合组,并为对应的三层聚合接口都配置IP地址和子网掩码。
· 通过在聚合组1上按照源IP地址进行聚合负载分担、在聚合组2上按照目的IP地址进行聚合负载分担的方式,来实现数据流量在各成员端口间的负载分担。
本举例是在R7607版本上进行配置和验证的。
聚合负载分担类型支持全局配置或在聚合组内配置两种方式;对于一个聚合组来说,优先采用该聚合组内的配置。本例在聚合组内配置。
# 创建三层聚合接口1,配置该接口对应的聚合组内按照源IP地址进行聚合负载分担,并为其配置IP地址和子网掩码。
[DeviceA] interface route-aggregation 1
[DeviceA-Route-Aggregation1] link-aggregation load-sharing mode source-ip
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# 创建三层聚合接口2,配置该接口对应的聚合组内按照目的IP地址进行聚合负载分担,并为其配置IP地址和子网掩码。
[DeviceA] interface route-aggregation 2
[DeviceA-Route-Aggregation2] link-aggregation load-sharing mode destination-ip
[DeviceA-Route-Aggregation2] ip address 192.168.2.1 24
[DeviceA-Route-Aggregation2] quit
# 将接口GigabitEthernet2/1/1和GigabitEthernet2/1/2加入聚合组1,接口GigabitEthernet2/1/3和GigabitEthernet2/1/4加入聚合组2。
[DeviceA] interface range gigabitethernet 2/1/1 gigabitethernet 2/1/2
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
[DeviceA] interface range gigabitethernet 2/1/3 gigabitethernet 2/1/4
[DeviceA-if-range] port link-aggregation group 2
[DeviceA-if-range] quit
Device B的配置与Device A相同,配置过程略。
# 查看Device A上所有聚合组的详细信息。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Static
Loadsharing Type: Shar
Port Status Priority Oper-Key
--------------------------------------------------------------------------------
GE2/1/1 S 32768 1
GE2/1/2 S 32768 1
Aggregate Interface: Route-Aggregation2
Aggregation Mode: Static
Loadsharing Type: Shar
Port Status Priority Oper-Key
--------------------------------------------------------------------------------
GE2/1/4 S 32768 2
以上信息表明,聚合组1和聚合组2都是负载分担类型的三层静态聚合组,各包含有两个选中端口。
# 查看Device A上所有聚合接口所对应聚合组内采用的聚合负载分担类型。
[DeviceA] display link-aggregation load-sharing mode interface
Route-Aggregation1 Load-Sharing Mode:
source-ip address
Route-Aggregation2 Load-Sharing Mode:
destination-ip address
以上信息表明,三层聚合组1按照报文的源IP地址进行聚合负载分担,三层聚合组2按照报文的目的IP地址进行聚合负载分担。
· Device A:
#
interface Route-Aggregation1
ip address 192.168.1.1 255.255.255.0
link-aggregation load-sharing mode source-ip
#
interface Route-Aggregation2
ip address 192.168.2.1 255.255.255.0
link-aggregation load-sharing mode destination-ip
#
interface GigabitEthernet2/1/1
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/2
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/3
port link-mode route
port link-aggregation group 2
#
interface GigabitEthernet2/1/4
port link-mode route
port link-aggregation group 2
#
· Device B:
Device B上的配置文件与Device A类似。
如图5-1所示:
· 两个楼宇之间分别使用H3C Device A(简称Device A)与Cisco Device B(简称Device B)通过各自的三层以太网接口相互连接。
· 为提高设备间链路带宽与可靠性,并考虑不同厂商设备互联的兼容性,配置动态链路聚合,在Device A和Device B上分别配置三层链路聚合组,并为对应的三层聚合接口配置IP地址和子网掩码。
· Device A:创建三层聚合接口,配置该接口为动态聚合模式。将端口加入到聚合接口中。
· Device B:创建通道组,配置封装协议为LACP,并配置LACP工作模式为主动(Active)。
本举例是在R7607版本上进行配置和验证的。
· 由于静态聚合组中端口选中状态不受对端端口是否在聚合组中及是否处于选中状态的影响。这样有可能导致两端设备所确定的Selected状态端口不一致,当两端都支持配置静态和动态聚合组的情况下,建议用户优选动态聚合组。
· 对于Cisco设备,需配置通道组为LACP协议,并将通道组类型配置为Active。关于更多通道组端口状态请查阅Cisco相关资料。
# 创建三层聚合接口1,并采用动态聚合模式。
<DeviceA> system
[DeviceA] interface route-aggregation 1
[DeviceA-Route-Aggregation1] link-aggregation mode dynamic
# 为三层聚合接口1配置IP地址和子网掩码。
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# 将接口GigabitEthernet2/1/1~GigabitEthernet2/1/3加入聚合组1。
[DeviceA] interface range gigabitethernet 2/1/1 to gigabitethernet 2/1/3
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] quit
# 为端口通道接口1配置IP地址和子网掩码。
DeviceB>enable
DeviceB#configure terminal
DeviceB(config)#interface port-channel 1
DeviceB(config-if)#ip address 192.168.1.2 255.255.255.0
# 将通道协议模式配置为LACP(缺省为PagP模式)。
DeviceB(config-if)#channel-protocol lacp
DeviceB(config-if)#exit
# 进入以太网接口视图。
DeviceB(config)#interface range gigabitethernet 1/1 – 3
#将端口批量加入通道组。
DeviceB(config-if-range)#no switchport
DeviceB(config-if-range)#channel-group 1 mode active
DeviceB(config-if-range)#exit
(1) Device A
# 通过display link-aggregation verbose命令来显示聚合组的相关信息,以验证配置是否成功。
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Route-Aggregation1
Aggregation Mode: Dynamic
Loadsharing Type: Shar
System ID: 0x8000, 000f-e267-6c6a
Local:
Port Status Priority Oper-Key Flag
--------------------------------------------------------------------------------
GE2/1/1 S 32768 1 {ACDEF}
GE2/1/2 S 32768 1 {ACDEF}
GE2/1/3 S 32768 1 {ACDEF}
Remote:
Actor Partner Priority Oper-Key SystemID Flag
--------------------------------------------------------------------------------
GE2/1/1 1 32768 1 0x8000, 000f-e267-57ad {ACDEF}
GE2/1/2 2 32768 1 0x8000, 000f-e267-57ad {ACDEF}
GE2/1/3 3 32768 1 0x8000, 000f-e267-57ad {ACDEF}
结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过LACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。
(2) Device B
# 通过show etherchannel summary与 show etherchannel port-channel命令来显示端口聚合的简要信息,以验证配置是否成功。
DeviceB#show etherchannel summary
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 Gi1/1(P) Gi1/2(P) Gi1/3(P)
DeviceB#show etherchannel port-channel
Channel-group listing:
----------------------
Group: 1
----------
Port-channels in the group:
---------------------------
Port-channel: Po1 (Primary Aggregator)
------------
Age of the Port-channel = 00d:00h:26m:35s
Logical slot/port = 2/1 Number of ports = 3
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 Gi1/1 Active 0
0 00 Gi1/2 Active 0
0 00 Gi1/3 Active 0
Time since last port bundled: 00d:00h:12m:13s Gi0/2
· Device A:
#
interface route-aggregation1
ip address 192.168.1.1 255.255.255.0
link-aggregation mode dynamic
#
interface GigabitEthernet2/1/1
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/2
port link-mode route
port link-aggregation group 1
#
interface GigabitEthernet2/1/3
port link-mode route
port link-aggregation group 1
#
· Device B:
Building configuration...
Current configuration : 1444 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
!
interface GigabitEthernet1/1
no switchport
channel-protocol lacp
channel-group 1 mode active
!
interface GigabitEthernet1/2
no switchport
channel-protocol lacp
channel-group 1 mode active
!
interface GigabitEthernet1/3
no switchport
channel-group 1 mode active
!
interface Port-channel 1
no switchport
channel-protocol lacp
ip address 192.168.1.2 255.255.255.0
略
· H3C SR6600-F 路由器 二层技术-以太网交换配置指导-R7607
· H3C SR6600-F 路由器 二层技术-以太网交换命令参考-R7607
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!