搭建集群环境
a.为两台交换机上电,按照数据规划分别对两台框式交换机进行配置
<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 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 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
b.交换机重启后,查看集群是否组建成功
#通过交换机框上主控板的集群指示灯查看集群状态。
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 //为便于记忆,修改集群系统的设备名
c.集群组建完成,配置多主检测
集群组建完成后,为防止集群故障分裂导致多主影响业务,在两台交换机直接连接一条线缆,用于多主检测。线缆对应的接口分别为XGE1/1/0/10和XGE2/1/10
[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):
d.在集群上配置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
集群配置文件
#
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