两台华三的交换机通信如何划分vlan配置命令和如何接口
时间: 2024-05-09 12:18:43 浏览: 19
划分VLAN配置命令:
1. 创建VLAN:
```
vlan batch 10 20 30 40
```
2. 将端口加入VLAN:
```
interface gigabitethernet 0/0/1
port link-type access
port default vlan 10
```
其中,gigabitethernet 0/0/1为要加入VLAN的端口,port default vlan 10为将端口加入的VLAN编号。
3. 配置VLAN间的隔离:
```
vlan config 10 isolated
```
其中,10为要隔离的VLAN编号。
4. 配置VLAN间的通信:
```
vlan config 10 to 20
```
其中,10为源VLAN编号,20为目标VLAN编号。
接口配置:
1. 配置接口IP地址:
```
interface vlanif 10
ip address 192.168.1.1 24
```
其中,vlanif 10为要配置IP地址的接口,192.168.1.1为IP地址,24为子网掩码。
2. 配置接口MTU大小:
```
interface gigabitethernet 0/0/1
port link-type hybrid
port hybrid vlan 10 untagged
port hybrid pvid vlan 10
port hybrid mtu 1500
```
其中,gigabitethernet 0/0/1为要配置MTU大小的端口,port hybrid mtu 1500为MTU大小,1500为字节数。