华为交换机配置mlag
时间: 2023-07-04 19:04:12 浏览: 489
要配置华为交换机的MLAG,需要执行以下步骤:
1. 创建MLAG域
```
[SW1] mlag domain 1
[SW1-mlag-domain1] peer-link GigabitEthernet 1/0/24
[SW1-mlag-domain1] quit
```
2. 配置MLAG端口
```
[SW1] interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1] port link-type trunk
[SW1-GigabitEthernet1/0/1] port trunk allow-pass vlan 1 to 4094
[SW1-GigabitEthernet1/0/1] mlag 1 peer-interface GigabitEthernet 1/0/24
[SW1-GigabitEthernet1/0/1] quit
```
3. 配置MLAG VLAN
```
[SW1] vlan batch 10 20
[SW1] interface Vlanif10
[SW1-Vlanif10] mlag 1 domain 1 local
[SW1-Vlanif10] ip address 10.0.10.1 24
[SW1-Vlanif10] quit
[SW1] interface Vlanif20
[SW1-Vlanif20] mlag 1 domain 1 local
[SW1-Vlanif20] ip address 10.0.20.1 24
[SW1-Vlanif20] quit
```
4. 配置MLAG Peer
```
[SW1] mlag domain 1
[SW1-mlag-domain1] peer 1 ip-address 10.0.0.2
[SW1-mlag-domain1] quit
```
5. 配置MLAG Peer Link
```
[SW1] interface GigabitEthernet 1/0/24
[SW1-GigabitEthernet1/0/24] port link-type trunk
[SW1-GigabitEthernet1/0/24] port trunk allow-pass vlan 1 to 4094
[SW1-GigabitEthernet1/0/24] mlag 1 peer-interface GigabitEthernet 1/0/24
[SW1-GigabitEthernet1/0/24] quit
```
6. 配置MLAG VLAN在Peer中的同步
```
[SW1] mlag domain 1
[SW1-mlag-domain1] sync vlan 10 20
[SW1-mlag-domain1] quit
```
以上就是配置华为交换机MLAG的步骤。需要注意的是,MLAG需要两台交换机配合使用,以上的配置仅展示一台交换机的配置,另一台交换机的配置需要与此类似。
阅读全文