园区网络基础集群/堆叠通用部署 案例步骤详解
核心层使用两台框式交换机组建集群,汇聚层使用两台盒式交换机组建堆叠,核心层的集群与汇聚层的堆叠使用Eth-Trunk相连。
园区基础网络组网图
核心层 支持集群功能的框式交换机 S12700E-8
汇聚层 支持堆叠功能的盒式交换机 S6730-H-V2
接入层 S5735-L-V2 V600R022C10
配置部署思路
1配置核心交换机集群和多主检测功能
2配置汇聚交换机堆叠和双主检测功能
3配置交换机上下行Eth-Trunk 涉及核心层交换机、汇聚层交换机、接入层交换机
数据规划
集群方式 业务口集群
交换机台数 2台
每台交换机硬件配置 主控板:2块MPUE 业务板型号:2块LST7X24BX6EO,出于可靠性考虑建议配置2块单板,配置1块单板也可以组建集群集群线览:4根3m SFP+ AOC光线缆
集群主 集群ID为1的框为集群主
集群优先级 集群ID为1的框,集群优先级为150 集群ID为2的框,集群优先级使用缺省值1
多主检测 两台集群交换机之间使用单独的线缆,通过直连方式进行多主检测。线缆连接的接口为XGE1/1/0/10和XGE2/1/0/10.
堆叠软硬件配置规划项目
堆叠方式 业务口堆叠
交换机台数 2台
每台交换机硬件配置 堆叠口:10GE业务口10GE 1/0/2和10GE 1/0/4连线方式:环形连线 堆叠线缆:2根3m SFP+ AOC光线缴
堆叠主 两台交换机的堆叠ID分别修改为1和2,堆叠ID为1的交换机为堆叠主
堆叠优先级 堆叠ID为1的交换机,堆叠优先级为150堆髻ID为2的交换机,堆叠优先级为100
双主检测 两台堆叠交换机之间使用单独的线统,通过直连方式进行双主检测。线缆连接的接口为10GE1/0/10和10GE 2/0/10.
集群和堆叠接口对接规划项目
集群下行连接堆叠的接口
与AGG1相连的接口使用Eth-Trunk 10,物理成员口为XGE 1/1/0/1和XGE 2/1/o/2与AGG2相连的接口使用Eth-Trunk 20,物理成员口为XGE 1/1/0/2和XGE2/1/0/1
堆叠AGG1上行连接集群的接口
Eth-Trunk 10,物理成员口为10GE 1/0/1和10GE 2/0/1
堆叠AGG2上行连接集群的接口
Eth-Trunk 20,物理成员口为10GE 1/0/1和10GE 2/0/1
堆叠AGG1下行连接ACC1的接口
Eth-Trunk 30,物理成员口为10GE 1/0/3和10GE 2/o/3
堆叠AGG2下行连接ACC2的接口
Eth-Trunk 40,物理成员口为10GE 1/0/3和10GE 2/0/3
ACC1上行连接堆叠AGG1的接口
Eth-Trunk 30,物理成员口为10GE 1/0/1和10GE 1/o/2
ACC2上行连接堆叠AGG2的接口
Eth-Trunk 40,物理成员口为10GE 1/0/1和10GE 1/0/2
配置步骤
1.搭建集群环境
a.交换机下电,安装用于集群业务板并根据下面连线图连线集群线缆和多主检测线缆。
集群线缆连线图
“出于可靠性考虑,推荐按照下面方式进行连线:
一块业务板上建议至少有两个物理成员端口加入到一个逻辑集群端口。
上行端口和配置多主检测的端口所在业务板建议属于非组建集群的业务板。”
b.为两台交换机上电,按照数据规划分别对两台框式交换机进行配置。
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] set css id 1
[Switch1] set css priority 150 //框1的集群优先级配置为150
[Switch1] interface css-port 1
[Switch1-css-port1] port interface xgigabitethernet 4/0/1 to xgigabitethernet 4/0/2 enable
[Switch1-css-port1] quit
[Switch1] interface css-port 2
[Switch1-css-port2] port interface xgigabitethernet 5/0/1 to xgigabitethernet 5/0/2 enable
[Switch1-css-port2] quit
[Switch1] display css status saved //查看集群配置是否正确
CSS port media-type: SFP+
Current Id Saved Id CSS Enable CSS Mode Priority Master force
------------------------------------------------------------------------------
1 1 Off LPU 150 Off
[Switch1] css
[Switch1-css] css enable //集群配置确认正确后,使能集群,重启设备,为保证框ID成为主交换机,先重启Switch1
Warning: The CSS configuration will take effect only after the system is rebooted. The next CSS mode is CSS card. Reboot now? [Y/N]:y
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] set css id 2 //框2的集群优先级使用缺省值,不需要配置。
[Switch2] interface css-port 1
[Switch2-css-port1] port interface xgigabitethernet 4/0/1 to xgigabitethernet 4/0/2 enable
[Switch2-css-port1] quit
[Switch2] interface css-port 2
[Switch2-css-port2] port interface xgigabitethernet 5/0/1 to xgigabitethernet 5/0/2 enable
[Switch2-css-port2] quit
[Switch2] display css status saved //查看集群配置是否正确
CSS port media-type: SFP+
Current Id Saved Id CSS Enable CSS Mode Priority Master Force
------------------------------------------------------------------------------
1 2 Off LPU 1 Off
[Switch2] css
[Switch2-css] css enable //集群配置确认正确后,使能集群,重启设备
Warning: The CSS configuration will take effect only after the system is rebooted. The next CSS mode is CSS card. Reboot now? [Y/N]:y
c.交换机重启后,查看集群是否组建成功。
#通过交换机框上主控板的集群指示灯查看集群状态。
Switch1主控板上ACT灯绿色常亮,表示该主控板为集群系统主用主控板,Switch1为主交换机。
Switch2主控板上ACT灯绿色闪烁,表示该主控板为集群系统备用主控板,Switch2为备交换机。
#通过任意主控板上的Console口登录集群系统,使用命令行查看集群组建是否成功。
根据集群优先级,优先级大的Switch1会成为集群系统的主框,执行命令display device查看设备状态时,集群系统名为Switch1。
<Switch1> display device
Chassis 1 (Master Switch)
S12700E-8's Device status:
Slot Sub Type Online Power Register Status Role
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 - LST7X24BX6E0 Present PowerOn Registered Normal NA
2 - LST7X24BX6E0 Present PowerOn Registered Normal NA
3 - - Present PowerOn Unregistered - NA
9 - LST7MPUE0000 Present PowerOn Registered Normal Master
10 - LST7MPUE0000 Present PowerOn Registered Normal Slave
PWR1 - - Present PowerOn Registered Normal NA
CMU1 - EH1D200CMU00 Present PowerOn Registered Normal Master
FAN1 - - Present PowerOn Registered Normal NA
FAN2 - - Present PowerOn Registered Normal NA
Chassis 2 (Standby Switch)
S12700E-8's Device status:
Slot Sub Type Online Power Register Status Role
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 - LST7X24BX6E0 Present PowerOn Registered Normal NA
2 - LST7X24BX6E0 Present PowerOn Registered Normal NA
3 - - Present PowerOn Unregistered - NA
9 - LST7MPUE0000 Present PowerOn Registered Normal Master
10 - LST7MPUE0000 Present PowerOn Registered Normal Slave
PWR1 - - Present PowerOn Registered Normal NA
CMU2 - EH1D200CMU00 Present - Unregistered - NA
FAN1 - - Present PowerOn Registered Normal NA
FAN2 - - Present PowerOn Registered Normal NA
<Switch1> display css status
CSS Enable switch On
Chassis Id CSS Enable CSS Status CSS Mode Priority Master Force
------------------------------------------------------------------------------
1 On Master LPU 150 Off
2 On Standby LPU 1 Off
<Switch1> display css channel all //查看集群链路拓扑是否与硬件连接一致
CSS link-down-delay: 500ms
Chassis 1 || Chassis 2
================================================================================
Num [CSS port] [LPU Port] || [LPU Port] [CSS port]
1 1/1 XGigabitEthernet1/4/0/1 XGigabitEthernet2/4/0/1 2/1
2 1/1 XGigabitEthernet1/4/0/2 XGigabitEthernet2/4/0/2 2/1
3 1/2 XGigabitEthernet1/5/0/1 XGigabitEthernet2/5/0/1 2/2
4 1/2 XGigabitEthernet1/5/0/2 XGigabitEthernet2/5/0/2 2/2
Chassis 2 || Chassis 1
================================================================================
Num [CSS port] [LPU Port] || [LPU Port] [CSS port]
1 2/1 XGigabitEthernet2/4/0/1 XGigabitEthernet1/4/0/1 1/1
2 2/1 XGigabitEthernet2/4/0/2 XGigabitEthernet1/4/0/2 1/1
3 2/2 XGigabitEthernet2/5/0/1 XGigabitEthernet1/5/0/1 1/2
4 2/2 XGigabitEthernet2/5/0/2 XGigabitEthernet1/5/0/2 1/2
<Switch1> system-view
[Switch1] sysname CORE //为便于记忆,修改集群系统的设备名
d.集群组建完成,配置多主检测。
集群组建完成后,为防止集群故障分裂导致多主影响业务,在两台交换机直接连接一条线缆,用于多主检测。线缆对应的接口分别为XGE1/1/0/10和XGE2/1/0/10,如图2所示。
[CORE] interface xgigabitethernet 1/1/0/10
[CORE-XGigabitEthernet1/1/0/10] mad detect mode direct
Warning: This command will block the port, and no other configuration running on this port is recommended. Continue?[Y/N]:y [CORE-XGigabitEthernet1/1/0/10] quit
[CORE] interface xgigabitethernet 2/1/0/10
[CORE-XGigabitEthernet2/1/0/10] mad detect mode direct
Warning: This command will block the port, and no other configuration running on this port is recommended. Continue?[Y/N]:y [CORE-XGigabitEthernet2/1/0/10] return
<CORE> display mad verbose //查看多主检测配置
Current MAD domain: 0
Current MAD status: Detect
Mad direct detect interfaces configured:
XGigabitEthernet1/1/0/10
XGigabitEthernet2/1/0/10
Mad relay detect interfaces configured:
Excluded ports(configurable):
Excluded ports(can not be configured):
2.搭建堆叠环境
这里以搭建堆叠AGG1为例,AGG2的搭建和配置过程与AGG1相同。a.按照数据规划分别对两台盒式交换机进行配置。
如果使用专用堆叠线缆堆叠,此步配置可以省略。
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] stack
[Switch1-satck] stack member 1 priority 150
[Switch1-satck] quit
[Switch1] interface stack-Port 1/1
[Switch1-Stack-Port1/1] port member-group interface 10GE 1/0/2 10GE 1/0/4
[Switch1-Stack-Port1/1] quit
<Switch1> save //堆叠相关的配置不需要保存,会自动写入flash。为防止其他配置丢失,这里建议执行save命令进行保存
The current configuration will be written to flash:/vrpcfg.zip.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 1.......
Save the configuration successfully.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] stack
[Switch2-satck] stack member 1 priority 100
[Switch2-satck] stack member 1 renumber 2
[Switch2-satck] quit
[Switch2] interface Stack-Port 1/1
[Switch2-Stack-Port1/1] port member-group interface 10GE 1/0/2 10GE 1/0/4
[Switch2-Stack-Port1/1] quit
<Switch2> save //堆叠相关的配置不需要保存,会自动写入flash。为防止其他配置丢失,这里建议执行save命令进行保存
The current configuration will be written to flash:/vrpcfg.zip.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 1.......
Save the configuration successfully.
b.交换机下电,根据下面连线图连线堆叠线缆和双主检测线缆。
使用的是S6730-H28X6CZ-V2设备,堆叠接口和步骤1中配置的接口保持一致。
堆叠线缆连线图
c.交换机重启后,查看堆叠是否组建成功。<Switch1> display stack configuration //堆叠组建成功,switch1是堆叠主
Oper : Operation
Conf : Configuration
* : Offline configuration
# : Media mismatch or absence
Attribute Configuration:
--------------------------------------------------------------------------
MemberID Domain Priority DelayTime
Oper(Conf) Oper(Conf) Oper(Conf) Oper(Conf)
--------------------------------------------------------------------------
1(1) 10(10) 150(150) 0(0)
2(2) 10(10) 100(100) 0(0)
--------------------------------------------------------------------------
Stack-Port Configuration:
--------------------------------------------------------------------------------
Stack-Port Member Ports
--------------------------------------------------------------------------------
Stack-Port1/1 10GE1/1/0/2 10GE1/1/0/4
Stack-Port2/1 10GE2/1/0/2 10GE2/1/0/4
--------------------------------------------------------------------------------
Stack-Global Configuration:
--------------------------------------------------------------------------------
AuthMode Password
--------------------------------------------------------------------------------
hmac-sha256 ******
--------------------------------------------------------------------------------
<Switch1> system-view
[Switch1] sysname AGG1 //为便于记忆,修改堆叠系统的设备名
d.堆叠组建完成,配置双主检测。
堆叠组建完成后,为防止堆叠故障分裂导致多主影响业务,在两台交换机直接连接一条线缆,用于双主检测。线缆对应的接口分别为10GE 1/0/10和 10GE 2/0/10 ,如图3所示。
[AGG1] interface 10ge 1/0/10
[AGG1-10GE1/0/10] dual-active detect mode direct
Warning: The interface will block common data packets, except BPDU packets. Continue? [Y/N]: y
[AGG1-10GE1/0/10] quit
[AGG1] interface 10ge 2/0/10
[AGG1-10GE2/0/10] dual-active detect mode direct
Warning: The interface will block common data packets, except BPDU packets. Continue? [Y/N]: y
[AGG1-10GE2/0/10] return
<AGG1> display dual-active //查看双主检测配置
Stack domainID: 10
Dual-active status: Normal
Dual-active detect mode: Direct
Dual-active direct detect interfaces configured:
10GE1/0/10 up (Physical) up (Protocol) 10 (PeerDomain)
10GE2/0/10 up (Physical) up (Protocol) 10 (PeerDomain)
Dual-active relay detect interfaces configured:
--
Excluded ports(configurable):
--
Excluded ports(can not be configured):
3.配置集群和堆叠之间的Eth-Trunk接口,以及堆叠和接入层交换机之间的Eth-Trunk接口。
a.在集群上配置Eth-Trunk接口。<CORE> system-view
[CORE] interface eth-trunk 10 //创建与AGG1相连的Eth-Trunk接口
[CORE-Eth-Trunk10] mode lacp
[CORE-Eth-Trunk10] quit
[CORE] interface xgigabitethernet 1/1/0/1
[CORE-XGigabitEthernet1/1/0/1] eth-trunk 10
[CORE-XGigabitEthernet1/1/0/1] quit
[CORE] interface xgigabitethernet 2/1/0/2
[CORE-XGigabitEthernet2/1/0/2] eth-trunk 10
[CORE-XGigabitEthernet2/1/0/2] quit
[CORE] interface eth-trunk 20 //创建与AGG2相连的Eth-Trunk接口
[CORE-Eth-Trunk20] mode lacp
[CORE-Eth-Trunk20] quit
[CORE] interface xgigabitethernet 1/1/0/2
[CORE-XGigabitEthernet1/1/0/2] eth-trunk 20
[CORE-XGigabitEthernet1/1/0/2] quit
[CORE] interface xgigabitethernet 2/1/0/1
[CORE-XGigabitEthernet2/1/0/1] eth-trunk 20
[CORE-XGigabitEthernet2/1/0/1] quit
b.在堆叠AGG1上配置Eth-Trunk接口。<AGG1> system-view
[AGG1] interface eth-trunk 10 //创建与集群相连的Eth-Trunk接口
[AGG1-Eth-Trunk10] mode lacp-static
[AGG1-Eth-Trunk10] quit
[AGG1] interface 10ge 1/0/1
[AGG1-10GE1/0/1] eth-trunk 10
[AGG1-10GE1/0/1] quit
[AGG1] interface 10ge 2/0/1
[AGG1-10GE2/0/1] eth-trunk 10
[AGG1-10GE2/0/1] quit
[AGG1] interface eth-trunk 30 //创建与接入层交换机ACC1相连的Eth-Trunk接口
[AGG1-Eth-Trunk30] mode lacp-static
[AGG1-Eth-Trunk30] quit
[AGG1] interface 10ge 1/0/3
[AGG1-10GE1/0/3] eth-trunk 30
[AGG1-10GE1/0/3] quit
[AGG1] interface 10ge 2/0/3
[AGG1-10GE2/0/3] eth-trunk 30
[AGG1-10GE2/0/3] quit
c.在堆叠AGG2上配置Eth-Trunk接口。<AGG2> system-view
[AGG2] interface eth-trunk 20 //创建与集群相连的Eth-Trunk接口
[AGG2-Eth-Trunk20] mode lacp-static
[AGG2-Eth-Trunk20] quit
[AGG2] interface 10ge 1/0/1
[AGG2-10GE1/0/1] eth-trunk 20
[AGG2-10GE1/0/1] quit
[AGG2] interface 10ge 2/0/1
[AGG2-10GE2/0/1] eth-trunk 20
[AGG2-10GE2/0/1] quit
[AGG2] interface eth-trunk 40 //创建与接入层交换机ACC2相连的Eth-Trunk接口
[AGG2-Eth-Trunk40] mode lacp-static
[AGG2-Eth-Trunk40] quit
[AGG2] interface 10ge 1/0/3
[AGG2-10GE1/0/3] eth-trunk 40
[AGG2-10GE1/0/3] quit
[AGG2] interface 10ge 2/0/3
[AGG2-10GE2/0/3] eth-trunk 40
[AGG2-10GE2/0/3] quit
d.在接入层交换机ACC1上配置Eth-Trunk接口。<ACC1> system-view
[ACC1] interface eth-trunk 30 //创建与堆叠AGG1相连的Eth-Trunk接口
[ACC1-Eth-Trunk30] mode lacp-static
[ACC1-Eth-Trunk30] quit
[ACC1] interface 10ge 1/0/1
[ACC1-10GE1/0/1] eth-trunk 30
[ACC1-10GE1/0/1] quit
[ACC1] interface 10ge 1/0/2
[ACC1-10GE1/0/2] eth-trunk 30
[ACC1-10GE1/0/2] quit
e.在接入层交换机ACC2上配置Eth-Trunk接口。<ACC2> system-view
[ACC2] interface eth-trunk 40 //创建与堆叠AGG2相连的Eth-Trunk接口
[ACC2-Eth-Trunk40] mode lacp-static
[ACC2-Eth-Trunk40] quit
[ACC2] interface 10ge 1/0/1
[ACC2-10GE1/0/1] eth-trunk 40
[ACC2-10GE1/0/1] quit
[ACC2] interface 10ge 1/0/2
[ACC2-10GE1/0/2] eth-trunk 40
[ACC2-10GE1/0/2] quit
配置脚本
集群和堆叠的配置不记入配置文件,直接写入Flash,所以配置文件中没有堆叠和集群相关的配置,只有多主检测/双主检测和Eth-Trunk接口的配置。
•集群配置文件#
sysname CORE
#
interface Eth-Trunk10
mode lacp
#
interface Eth-Trunk20
mode lacp
#
interface XGigabitEthernet1/1/0/1
eth-trunk 10
#
interface XGigabitEthernet1/1/0/2
eth-trunk 20
#
interface XGigabitEthernet1/1/0/10
mad detect mode direct
#
interface XGigabitEthernet2/1/0/1
eth-trunk 20
#
interface XGigabitEthernet2/1/0/2
eth-trunk 10
#
interface XGigabitEthernet2/1/0/10
mad detect mode direct
#
return
•AGG1堆叠配置文件#
sysname AGG1
#
interface Eth-Trunk10
mode lacp
#
interface Eth-Trunk30
mode lacp
#
interface 10GE 1/0/3
eth-trunk 30
#
interface 10GE 1/0/10
dual-active detect mode direct
#
interface 10GE 2/0/3
eth-trunk 30
#
interface 10GE 2/0/10
dual-active detect mode direct
#
interface 10GE 1/0/1
eth-trunk 10
#
interface 10GE 2/0/1
eth-trunk 10
#
return
•AGG2堆叠配置文件#
sysname AGG2
#
interface Eth-Trunk20
mode lacp
#
interface Eth-Trunk40
mode lacp
#
interface 10GE 1/0/3
eth-trunk 40
#
interface 10GE 1/0/10
dual-active detect mode direct
#
interface 10GE 2/0/3
eth-trunk 40
#
interface 10GE 2/0/10
dual-active detect mode direct
#
interface 10GE 1/0/1
eth-trunk 20
#
interface 10GE 2/0/1
eth-trunk 20
#
return
•ACC1配置文件#
sysname ACC1
#
interface Eth-Trunk30
mode lacp
#
interface 10GE1/0/1
eth-trunk 30
#
interface 10GE1/0/2
eth-trunk 30
#
return
•ACC2配置文件#
sysname ACC2
#
interface Eth-Trunk40
mode lacp
#
interface 10GE1/0/1
eth-trunk 40
#
interface 10GE1/0/2
eth-trunk 40
#
return