一、两台设备以集群卡方式组建集群

华为CSS配置案例(集群卡方式)_华为CSS配置实例


1.组网需求

核心层SwitchA和SwitchB两台交换机采取集群卡集群方式进行组网,其中SwitchA为主交换机,SwitchB为备交换机。汇聚层Switch通过Eth-Trunk连接到集群系统,同时集群系统通过Eth-Trunk接入上行网络。


2.配置思路


  • 为SwitchA和SwitchB分别安装集群卡并连接集群线缆。
  • 在SwitchA和SwitchB上分别配置集群连接方式,配置集群ID分别为1和2,配置集群优先级分别为100和10,以提高SwitchA成为主交换机的可能。
  • 先使能SwitchA的集群功能,然后再使能SwitchB的集群功能,以保证SwitchA成为主交换机。
  • 检查集群组建是否成功。
  • 配置集群系统的下行Eth-Trunk,增加转发带宽,提高可靠性


3.操作步骤
3.1 配置集群连接方式、集群ID及集群优先级

# 配置SwitchA的集群连接方式为集群卡集群,集群ID为1,集群优先级为100。

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] set css mode css-card
[SwitchA] set css id 1
[SwitchA] set css priority 100

# 配置SwitchB的集群连接方式为集群卡集群,集群ID为2,集群优先级为10。

<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] set css mode css-card
[SwitchB] set css id 2
[SwitchB] set css priority 10
3.2 查看集群配置信息

查看SwitchA上的集群配置信息。

[SwitchA] display css status saved
Current Id   Saved Id     CSS Enable   CSS Mode    Priority    Master force     
------------------------------------------------------------------------------  
1            1            Off          CSS card    100         Off

查看SwitchB上的集群配置信息。

[SwitchB] display css status saved
Current Id   Saved Id     CSS Enable   CSS Mode    Priority    Master force     
------------------------------------------------------------------------------  
1            2            Off          CSS card    10          Off


3.3使能集群功能

使能SwitchA的集群功能并重新启动SwitchA。

[SwitchA] css enable
Warning: The CSS configuration will take effect only after the system is rebooted. T
he next CSS mode is CSS card. Reboot now? [Y/N]:y

使能SwitchB的集群功能并重新启动SwitchB。

[SwitchB] css enable
Warning: The CSS configuration will take effect only after the system is rebooted. T
he next CSS mode is CSS card. Reboot now? [Y/N]:y


3.4检查集群组建是否成功

# 查看指示灯状态。
SwitchA集群卡上MASTER灯常亮,表示该集群卡所在的主控板为集群系统主用主控板,SwitchA为主交换机
SwitchB集群卡上MASTER灯常灭,表示SwitchB为备交换机
# 通过任意主控板上的Console口本地登录集群,使用命令行查看集群组建是否成功。

<SwitchA> display device
Chassis 1 (Master Switch)                                                       
S7712's Device status:                                                                                                              
Slot  Sub Type         Online    Power      Register       Status     Role                                                          
-------------------------------------------------------------------------------                                                     
1     -   ES0D0X12SA00 Present   PowerOn    Registered     Normal     NA    
9     -   ES1D2S08SX1E Present   PowerOn    Registered     Normal     NA    
12    -   ES0D0X12SA00 Present   PowerOn    Registered     Normal     NA    
13    -   ES1D2SRUE000 Present   PowerOn    Registered     Normal     Master                                                        
      1   ES1D2VS04000 Present   PowerOn    Registered     Normal     NA                                                            
14    -   ES1D2SRUE000 Present   PowerOn    Registered     Normal     Slave                                                         
      1   ES1D2VS04000 Present   PowerOn    Registered     Normal     NA                                                            
PWR1  -   -            Present   PowerOn    Registered     Normal     NA                                                            
PWR2  -   -            Present   PowerOn    Registered     Normal     NA                                                            
CMU1  -   EH1D200CMU00 Present   PowerOn    Registered     Normal     Master                                                        
FAN1  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN2  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN3  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN4  -   -            Present   PowerOn    Registered     Normal     NA   
Chassis 2 (Standby Switch)                                                      
S7712's Device status:                                                                                                              
Slot  Sub Type         Online    Power      Register       Status     Role                                                          
-------------------------------------------------------------------------------                                                     
1     -   ES0D0X12SA00 Present   PowerOn    Registered     Normal     NA    
9     -   ES1D2S08SX1E Present   PowerOn    Registered     Normal     NA    
12    -   ES0D0X12SA00 Present   PowerOn    Registered     Normal     NA    
13    -   ES1D2SRUE000 Present   PowerOn    Registered     Normal     Master                                                        
      1   ES1D2VS04000 Present   PowerOn    Registered     Normal     NA                                                            
14    -   ES1D2SRUE000 Present   PowerOn    Registered     Normal     Slave                                                         
      1   ES1D2VS04000 Present   PowerOn    Registered     Normal     NA                                                            
PWR1  -   -            Present   PowerOn    Registered     Normal     NA                                                            
PWR2  -   -            Present   PowerOn    Registered     Normal     NA                                                            
CMU1  -   EH1D200CMU00 Present   PowerOn    Registered     Normal     Master                                                        
FAN1  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN2  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN3  -   -            Present   PowerOn    Registered     Normal     NA                                                            
FAN4  -   -            Present   PowerOn    Registered     Normal     NA

以上显示信息中,能够查看到两台成员交换机的单板状态,表示集群建立完成。

# 查看集群链路状态是否正常。

<SwitchA> display css channel
CSS link-down-delay: 0ms                                                                                                            
                                                                                                                                    
                Chassis 1               ||               Chassis 2                                                                  
================================================================================                                                    
Num Slot HG      Port    (Status)       ||    Port    (Status)       Slot HG                                                        
1   1/13 0/13 -- 1/13/0/1(UP 10G)    ---||--- 2/13/0/1(UP 10G)    -- 2/13 0/12                                                      
2   1/13 0/14 -- 1/13/0/4(UP 10G)    ---||--- 2/13/0/4(UP 10G)    -- 2/13 1/13                                                      
3   1/14 0/13 -- 1/14/0/1(UP 10G)    ---||--- 2/14/0/1(UP 10G)    -- 2/14 0/12                                                      
4   1/14 0/14 -- 1/14/0/4(UP 10G)    ---||--- 2/14/0/4(UP 10G)    -- 2/14 1/13

以上显示信息中,集群链路均为UP,表示集群链路正常,至此可以说明集群组建完全成功。


二、配置Eth-Trunk实例

华为CSS配置案例(集群卡方式)_华为CSS配置实例_02

1.组网需求

集群系统上行端口上配置集群Eth-Trunk。为了提高可靠性,可将SwitchC和SwitchD双归接入集群系统,并配置集群系统下行端口的集群Eth-Trunk。


2.配置思路
  • 在集群系统和上游设备上创建集群Eth-Trunk并加入成员接口,实现扩展上行链路的带宽。
  • 在集群系统和下游设备上创建集群Eth-Trunk并加入成员接口,实现设备间的备份,提高网络可靠性。
  • 使能流量本地优先转发功能,避免转发效率低、集群成员交换机之间的带宽承载压力大的问题,实现在本设备Eth-Trunk成员接口无故障或流量不大的情况下,流量优先从本设备Eth-Trunk成员接口转发出去


3.操作步骤
3.1配置集群系统与上游设备的Eth-Trunk

 在集群系统上行端口创建Eth-Trunk,并加入Eth-Trunk成员接口。

<HUAWEI> system-view
[HUAWEI] sysname CSS
[CSS] interface eth-trunk 10
[CSS-Eth-Trunk10] quit
[CSS] interface gigabitethernet 1/1/0/4
[CSS-GigabitEthernet1/1/0/4] eth-trunk 10
[CSS-GigabitEthernet1/1/0/4] quit
[CSS] interface gigabitethernet 2/1/0/4
[CSS-GigabitEthernet2/1/0/4] eth-trunk 10
[CSS-GigabitEthernet2/1/0/4] quit

 在SwitchE上创建Eth-Trunk,并加入Eth-Trunk成员接口。

<HUAWEI> system-view
[HUAWEI] sysname SwitchE
[SwitchE] interface eth-trunk 10
[SwitchE-Eth-Trunk10] quit
[SwitchE] interface gigabitethernet 1/0/1
[SwitchE-GigabitEthernet1/0/1] eth-trunk 10
[SwitchE-GigabitEthernet1/0/1] quit
[SwitchE] interface gigabitethernet 1/0/2
[SwitchE-GigabitEthernet1/0/2] eth-trunk 10
[SwitchE-GigabitEthernet1/0/2] quit
3.2配置集群系统与下游设备的Eth-Trunk

 在集群系统下行端口上创建与SwitchC之间的Eth-Trunk,并加入Eth-Trunk成员接口。

[CSS] interface eth-trunk 20
[CSS-Eth-Trunk20] quit
[CSS] interface gigabitethernet 1/1/0/3
[CSS-GigabitEthernet1/1/0/3] eth-trunk 20
[CSS-GigabitEthernet1/1/0/3] quit
[CSS] interface gigabitethernet 2/1/0/5
[CSS-GigabitEthernet2/1/0/5] eth-trunk 20
[CSS-GigabitEthernet2/1/0/5] quit

 在SwitchC上创建Eth-Trunk,并加入Eth-Trunk成员接口。

<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] interface eth-trunk 20
[SwitchC-Eth-Trunk20] quit
[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] eth-trunk 20
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] eth-trunk 20
[SwitchC-GigabitEthernet1/0/2] quit

 在集群系统下行端口上创建与SwitchD之间的Eth-Trunk,并加入Eth-Trunk成员接口。

[CSS] interface eth-trunk 30
[CSS-Eth-Trunk30] quit
[CSS] interface gigabitethernet 1/1/0/5
[CSS-GigabitEthernet1/1/0/5] eth-trunk 30
[CSS-GigabitEthernet1/1/0/5] quit
[CSS] interface gigabitethernet 2/1/0/3
[CSS-GigabitEthernet2/1/0/3] eth-trunk 30
[CSS-GigabitEthernet2/1/0/3] quit

 在SwitchD上创建Eth-Trunk,并加入Eth-Trunk成员接口。

<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[SwitchD] interface eth-trunk 30
[SwitchD-Eth-Trunk30] quit
[SwitchD] interface gigabitethernet 1/0/1
[SwitchD-GigabitEthernet1/0/1] eth-trunk 30
[SwitchD-GigabitEthernet1/0/1] quit
[SwitchD] interface gigabitethernet 1/0/2
[SwitchD-GigabitEthernet1/0/2] eth-trunk 30
[SwitchD-GigabitEthernet1/0/2] quit
3.3在集群成员交换机上使能Eth-Trunk接口流量本地优先转发功能。

默认开启

[CSS] interface eth-trunk 10
[CSS-Eth-Trunk10] local-preference enable
[CSS-Eth-Trunk10] quit
[CSS] interface eth-trunk 20
[CSS-Eth-Trunk20] local-preference enable
[CSS-Eth-Trunk20] quit
[CSS] interface eth-trunk 30
[CSS-Eth-Trunk30] local-preference enable
[CSS-Eth-Trunk30] quit
[CSS] quit
3.4检查配置结果

上述配置成功后,在任意视图下执行命令display trunkmembership eth-trunk,可以看到Eth-Trunk接口的成员口信息。例如:
以集群系统上Eth-Trunk 10的显示为例。

<CSS> display trunkmembership eth-trunk 10
Trunk ID: 10
Used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of Up Ports in Trunk = 2
Operate status: up
Interface GigabitEthernet1/1/0/4, valid, operate up, weight=1
Interface GigabitEthernet2/1/0/4, valid, operate up, weight=1


三、配置直连方式多主检测

华为CSS配置案例(集群卡方式)_华为CSS配置实例_03

操作步骤
1.配置接口采用直连方式多主检测功能

 配置接口GigabitEthernet1/2/0/0采用直连方式多主功能。

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/2/0/0
[HUAWEI-GigabitEthernet1/2/0/0] 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
[HUAWEI-GigabitEthernet1/2/0/0] quit

 配置接口GigabitEthernet2/10/0/0采用直连方式多主检测功能。

[HUAWEI] interface gigabitethernet 2/10/0/0
[HUAWEI-GigabitEthernet2/10/0/0] 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
[HUAWEI-GigabitEthernet2/10/0/0] quit
[HUAWEI] quit
2.检查配置结果

查看集群系统多主检测详细配置信息。

<HUAWEI> display mad verbose

<HUAWEI> display mad verbose
Current MAD domain: 0
Current MAD status: Detect
Mad direct detect interfaces configured:
 GigabitEthernet1/2/0/0
 GigabitEthernet2/10/0/0
Mad relay detect interfaces configured:
Excluded ports(configurable):
Excluded ports(can not be configured):
 40GE1/4/0/0
 40GE1/4/0/1
 40GE1/5/0/0
 40GE1/5/0/1
 40GE2/7/0/1
 40GE2/7/0/0
 40GE2/11/0/0
 40GE2/11/0/1
3.验证多主检测功能

在配置完多主检测功能后,如果集群系统上还没有配置业务,可以通过人为制造集群分裂来验证多主检测功能是否配置成功。

  1. 首先在集群系统下查看所有UP的端口,以便分裂后进行验证。
<HUAWEI> display interface brief | include up 
PHY: Physical
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol  InUti OutUti   inErrors  outErrors
Ethernet0/0/0/0             up    up        0.03%  0.01%          0          0
GigabitEthernet1/2/0/0      up    up           0%     0%          0          0
GigabitEthernet1/2/0/5      up    up           0%     0%          0          0
GigabitEthernet2/9/0/5      up    up           0%     0%          0          0
GigabitEthernet2/10/0/0     up    up           0%     0%          0          0
NULL0                       up    up(s)        0%     0%          0          0
40GE1/4/0/0                 up    up           0%     0%          0          0
40GE1/4/0/1                 up    up           0%     0%          0          0
40GE1/5/0/0                 up    up           0%     0%          0          0
40GE1/5/0/1                 up    up           0%     0%          0          0
40GE2/7/0/0                 up    up           0%     0%          0          0
40GE2/7/0/1                 up    up           0%     0%          0          0
40GE2/11/0/0                up    up           0%     0%          0          0
40GE2/11/0/1                up    up           0%     0%          0          0
  1. 在用户视图下,打开告警信息开关。
<HUAWEI> terminal monitor
<HUAWEI> terminal trapping
  1. 人为制造集群分裂:可通过将所有集群端口Down的方式或直接拔掉所有集群线缆的方式(以业务口集群为例,将所有物理成员端口Shutdown)。
    # 先查看业务口集群端口信息。
<HUAWEI> display css css-port all
B : broadcast   *down : administratively down
Logic Port          Num  Phy Port                      Status
   css-port1/1      2    40GE1/4/0/0                   up
                         40GE1/4/0/1                   up
(B)css-port1/2      2    40GE1/5/0/0                   up
                         40GE1/5/0/1                   up

Logic Port          Num  Phy Port                      Status
   css-port2/1      2    40GE2/7/0/1                   up
                         40GE2/7/0/0                   up
(B)css-port2/2      2    40GE2/11/0/0                  up
                         40GE2/11/0/1                  up

# 将集群端口Shutdown。

<HUAWEI> system-view
[HUAWEI] interface css-port 1/1
[HUAWEI-css-port1/1] shutdown interface 40GE1/4/0/0
[HUAWEI-css-port1/1] shutdown interface 40GE1/4/0/1
[HUAWEI-css-port1/1] quit
[HUAWEI] interface css-port 1/2
[HUAWEI-css-port1/2] shutdown interface 40GE1/5/0/0
[HUAWEI-css-port1/2] shutdown interface 40GE1/5/0/1
Warning: Shutting down the last active CSS port in master chassis will cause CSS split, Continue? [Y/N]:y
[HUAWEI-css-port1/2] return
  1. 终端屏幕上出现发现多主的告警:MAD/4/MULTIACTIVEDETECTED(t):OID 1.3.6.1.4.1.2011.5.25.246.1.1 Multi-active scenario is detected.
  2. 查看当前集群系统的状态、多主检测信息以及端口状态。
    # 查看当前集群系统的状态,可以看出集群系统由两框集群变成单框集群。
<HUAWEI> display css status
CSS Enable switch On

Chassis Id   CSS Enable   CSS Status      CSS Mode    Priority    Master Force
------------------------------------------------------------------------------
1            On           Single         LPU           100         Off

# 查看当前集群系统(即框1)的多主检测信息,可以看到状态为Detect

<HUAWEI> display mad verbose
Current MAD domain: 0
Current MAD status: Detect
Mad direct detect interfaces configured:
 GigabitEthernet1/2/0/0
Mad relay detect interfaces configured:
Excluded ports(configurable):
Excluded ports(can not be configured):
 40GE1/4/0/0
 40GE1/4/0/1
 40GE1/5/0/0
 40GE1/5/0/1

# 查看当前集群系统(即框1)上端口状态为Up的端口,可以发现该框的其他业务端口状态未发生改变。

<HUAWEI> display interface brief | include up
PHY: Physical
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol  InUti OutUti   inErrors  outErrors
Ethernet0/0/0/0             up    up        0.01%  0.01%          0          0
GigabitEthernet1/2/0/5      up    up           0%     0%          0          0
NULL0                       up    up(s)        0%     0%          0          0
  1. 通过串口登录框ID为2的设备。
    # 查看本框上多主检测信息,可以看到此框处于Recovery状态。
<HUAWEI> display mad verbose
Current MAD domain: 0
Current MAD status: Recovery
Mad direct detect interfaces configured:
 GigabitEthernet2/10/0/0
Mad relay detect interfaces configured:
Excluded ports(configurable):
Excluded ports(can not be configured):
 40GE2/7/0/1
 40GE2/7/0/0
 40GE2/11/0/0
 40GE2/11/0/1

# 查看本框上端口状态为Up的端口,可以发现该框已没有Up的端口。

<HUAWEI> display interface brief | include up
PHY: Physical
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol  InUti OutUti   inErrors  outErrors
NULL0                       up    up(s)        0%     0%          0          0
  1. 通过以上步骤,可以验证多主检测配置成功。
  2. 将所有物理成员端口Up或者将集群线缆重新插上,使集群系统重新建立,从而进行业务的配置。