网络拓扑:
配置思路:
添加vlan;配置下联接口;配置上联双链路接口
操作步骤:
一、SW3汇聚交换机
1、添加vlan
<Huawei>system-view
[Huawei]sysname SW3
[SW3]vlan batch 2 10
2、配置下联接口
[SW3]interface GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/1]description connect to SW5
[SW3-GigabitEthernet0/0/1]quit
3、配置上联双链路接口
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/2]description connect to SW1
[SW3-GigabitEthernet0/0/2]quit
[SW3]interface GigabitEthernet 0/0/3
[SW3-GigabitEthernet0/0/3]port link-type trunk
[SW3-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/3]description connect to SW2
[SW3-GigabitEthernet0/0/3]quit
二、SW4汇聚交换机
1、添加vlan
<Huawei>system-view
[Huawei]sysname SW4
[SW4]vlan batch 3 9
2、配置下联接口
[SW4]interface GigabitEthernet 0/0/1
[SW4-GigabitEthernet0/0/1]port link-type trunk
[SW4-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW4-GigabitEthernet0/0/1]description connect to SW6
[SW4-GigabitEthernet0/0/1]quit
3、配置上联双链路接口
[SW4]interface GigabitEthernet 0/0/2
[SW4-GigabitEthernet0/0/2]port link-type trunk
[SW4-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW4-GigabitEthernet0/0/2]description connect to SW2
[SW4-GigabitEthernet0/0/2]quit
[SW4]interface GigabitEthernet 0/0/3
[SW4-GigabitEthernet0/0/3]port link-type trunk
[SW4-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW4-GigabitEthernet0/0/3]description connect to SW1
[SW4-GigabitEthernet0/0/3]quit