2台华为交换机配置mlag
时间: 2023-11-22 13:55:58 浏览: 290
华为HCIA-DC培训视频.rar
MLAG(Multi-Chassis Link Aggregation)是一种技术,可以在两个交换机之间创建逻辑链路聚合组,提供高可靠性和高可用性。下面是华为交换机配置MLAG的步骤:
1. 配置MLAG域和ID:在两个交换机上分别执行以下命令
```
[SwitchA] mlag
[SwitchA-mlag] domain mlag-domain
[SwitchA-mlag] cluster-id 1
[SwitchA-mlag] quit
```
```
[SwitchB] mlag
[SwitchB-mlag] domain mlag-domain
[SwitchB-mlag] cluster-id 1
[SwitchB-mlag] quit
```
2. 配置MLAG接口:在两个交换机上分别执行以下命令
```
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] mlag 1
[SwitchA-Eth-Trunk1] quit
```
```
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] mlag 1
[SwitchB-Eth-Trunk1] quit
```
3. 配置MLAG IP地址:在两个交换机上分别执行以下命令
```
[SwitchA] interface vlanif 1
[SwitchA-Vlanif1] ip address 192.168.1.1 24
[SwitchA-Vlanif1] mlag 1 peer-ip 192.168.1.2
[SwitchA-Vlanif1] quit
```
```
[SwitchB] interface vlanif 1
[SwitchB-Vlanif1] ip address 192.168.1.2 24
[SwitchB-Vlanif1] mlag 1 peer-ip 192.168.1.1
[SwitchB-Vlanif1] quit
```
4. 配置MLAG接口状态:在两个交换机上分别执行以下命令
```
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] port link-type trunk
[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10
[SwitchA-Eth-Trunk1] mlag 1 peer-link
[SwitchA-Eth-Trunk1] quit
```
```
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] port link-type trunk
[SwitchB-Eth-Trunk1] port trunk allow-pass vlan 10
[SwitchB-Eth-Trunk1] mlag 1 peer-link
[SwitchB-Eth-Trunk1] quit
```
5. 验证MLAG配置:在两个交换机上分别执行以下命令
```
[SwitchA] display mlag
[SwitchB] display mlag
```
以上步骤是华为交换机配置MLAG的基本步骤,具体配置可能会有所不同,需要根据实际情况进行调整。
阅读全文