华为两台交换机需要互联下层交换机用不一样的vlan,具体接法是上联的1口接下联的2口

配置下联交换机 设置好vlan

<HUAWEI> system-view

[HUAWEI] sysname Switch

[Switch] vlan 2

[Switch] interface gigabitethernet 1/0/2

[Switch-GigabitEthernet1/0/2] port link-type access   //配置接口接入类型为access

[Switch-GigabitEthernet1/0/2] port default vlan 2   //配置接口加入VLAN 2

[Switch-GigabitEthernet1/0/2] quit


配置上联连交换机的接口。

[Switch] interface gigabitethernet 1/0/1

[Switch-GigabitEthernet1/0/1] port link-type trunk

[Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 2   //配置接口以trunk方式透传VLAN 2需要其他vlan的话 就直接在后面加空格带vlan数字就行了

[Switch-GigabitEthernet1/0/1] quit