> For the complete documentation index, see [llms.txt](https://kerwin.gitbook.io/ruijie/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kerwin.gitbook.io/ruijie/jiao-huan-chan-pin/vsu/10.x/1.-vsu-ji-ben-pei-zhi.md).

# 1. VSU基本配置

**1、VSU基本配置**

**1、对主备核心交换机进行初始配置**

核心交换机1：

```
Switch1>en

Switch1# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch1(config)# switch virtual domain 1

Switch1(config-vs-domain)# switch 1

Switch1(config-vs-domain)#switch 1 priority 200    
//默认优先级为100，配置为较高的优先级，VSU建立成功后将会成为管理主机。

Switch1(config-vs-domain)# exit

Switch1(config)# vsl-aggregateport 1        
//VSL链路至少需要2条，一条链路可靠性较低，当出现链路震荡时，VSU会非常不稳定。

Switch1(config-vsl-ap-1)# port-member interface TenGigabitEthernet 2/1           
//配置VSL链路，VSU主备核心之间的心跳链路和流量通道

Switch1(config-vsl-ap-1)# port-member interface TenGigabitEthernet 2/2

Switch1(config-vsl-ap-1)# exit
```

说明：如果现场S86采用M8600-VSU-02XFP线卡，则其板卡上的端口自动加入VSL，无须进行配置，且单机模式下无法正常识别到，show ver slot看到是cannot startup的状态需要切换为VSU模式后，后线卡才能正常识别。

核心交换机2：

```
Switch2# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch2(config)# switch virtual domain 1  
//domaind id 必须和第一台一致

Switch2(config-vs-domain)#switch 2    
//第二台设备必须更改ID为2

Switch2(config-vs-domain)#switch 2 priority 150

Switch2(config-vs-domain)# exit

Switch2(config)# vsl-aggregateport 1      
//VSL链路至少需要2条，一条链路可靠性较低，当出现链路震荡时，VSU会非常不稳定。

Switch2(config-vsl-ap-1)# port-member interface TenGigabitEthernet 2/1        
//配置VSL链路，VSU主备核心之间的心跳链路和流量通道

Switch2(config-vsl-ap-1)# port-member interface TenGigabitEthernet 2/2

Switch2(config-vsl-ap-1)# exit
```

说明：如果现场S86采用M8600-VSU-02XFP线卡，则其板卡上的端口自动加入VSL，无须进行配置，且单机模式下无法正常识别到，show ver slot看到是cannot  startup的状态需要切换为VSU模式后，后线卡才能正常识别。

**2、连接好VSL链路，并确定接口已经UP**

**3、保存两台设备的配置，并一起切换为VSU模式**

核心交换机1

```
Switch1# wr

Switch1# switch convert mode virtual         
//转换为VSU模式

Are you sure to convert switch to virtual mode[yes/no]：yes

Do you want to recovery“config.text”from“virtual_switch.text”[yes/no]：no  
```

核心交换机2

```
Switch2# wr

Switch2# switch convert mode virtual  
//转换为VSU模式

Are you sure to convert switch to virtual mode[yes/no]：yes

Do you want to recovery“config.text”from“virtual_switch.text”[yes/no]：no
```

选择转换模式后，设备会重启启动，并组建VSU。

注意：整套VSU建立的时间通常需要10分钟左右，请耐心等待。如果VSL链路此时尚没有连接，或对端交换机还未重启，

则交换机默认会在10分钟内一直等待对端启动并持续打印log提示：

```
*Aug  6 13:17:17: %VSU-5-RRP_TOPO_INIT: Topology initializing, please wait for a moment
*Aug  6 13:18:17: %VSU-5-RRP_TOPO_INIT: Topology initializing, please wait for a moment.
```

**4、确认VSU建立成功**

1.VSU的管理需要在其中的主机上进行

2\. VSU主机的引擎Primary灯绿色常亮，VSU从机的Primary灯灭，可以用来判断主从机关系（ 设备优先级提前有指定，高优先级的设备会成为主机）

3\. VSU组建后从机Console口默认不能进行管理，可执行@@@@C打开输出开关,建议使用session device 2 slot （m1,m2 ,线卡槽位）登录其它设备查看信息。

Ruijie# show switch virtual   检查主备是否符合预期

```
Switch_id  Domain_id  Priority    Position    Status    Role
---------  ---------  --------    --------    ------    ----
1(1)       1(1)       200(200)    LOCAL       OK        ACTIVE ------>主机箱
2(2)       1(1)       150(150)    REMOTE      OK        STANDBY------>从机箱
```

Ruijie# show ver slots 检查是否已经识别到了主从机的所有线卡

```
Dev Slot Port   Configured Module         Online Module           User Status  Software Status
--- ---- ----   -----------------         -------------           -----------  ---------------
1   1    48     M12000-48GT/4SFP-EA       M12000-48GT/4SFP-EA     installed    ok            
1   2    4      M12000-04XFP-EA           M12000-04XFP-EA         installed    ok            
1   3    0      SECM M12000-NMM           SECM M12000-NMM         installed    ok            
1   4    0      none                      none                    none         none           
1   M1   0      N/A                       M12000-CM               N/A          backup        
1   M2   0      N/A                       none                    N/A          none           
2   1    48     M12000-48GT/4SFP-EA       M12000-48GT/4SFP-EA     installed    ok            
2   2    4      M12000-04XFP-EA           M12000-04XFP-EA         installed    ok            
2   3    0      SECM M12000-NMM           SECM M12000-NMM         installed    ok            
2   4    0      none                      none                    none         none             
2   M1   0      N/A                       M12000-CM               N/A          master         
2   M2   0      N/A                       none                    N/A          none
```
