Switch 1
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport g 0/0/1 to 0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk1]port link-type tr
[Huawei-Eth-Trunk1]port trunk allow-pass vl all
[Huawei-Eth-Trunk1]q
其他两个三层交换的命令差不多,需要注意在sw2里面要分为两个组再此不演示了
Sw
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vl b 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type ac
[Huawei-GigabitEthernet0/0/1]port de vl 10
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-ty ac
[Huawei-GigabitEthernet0/0/2]po de vl 20
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport g 0/0/3 to 0/0/4
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vl all
路由器
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int e
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]un portswitch
[Huawei-Eth-Trunk1]trunkport g 0/0/0 to 0/0/1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk1]q
[Huawei]int Eth-Trunk 1.1
[Huawei-Eth-Trunk1.1]dot1q termination v 10
[Huawei-Eth-Trunk1.1]arp broadcast enable
[Huawei-Eth-Trunk1.1]ip add 192.168.10.1 24
[Huawei-Eth-Trunk1.1]un sh
Info: Interface Eth-Trunk1.1 is not shutdown.
[Huawei-Eth-Trunk1.1]q
[Huawei]int e
[Huawei]int Eth-Trunk 1.2
[Huawei-Eth-Trunk1.2]dot1q termination v 20
[Huawei-Eth-Trunk1.2]arp broadcast enable
[Huawei-Eth-Trunk1.2]ip add 192.168.20.1 24
[Huawei-Eth-Trunk1.2]un sh
Info: Interface Eth-Trunk1.2 is not shutdown.
[Huawei-Eth-Trunk1.2]q
sw4
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vl batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vl 10
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type ac
[Huawei-GigabitEthernet0/0/2]port de vl 20
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport g 0/0/3 to 0/0/4
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vl all
sw7和sw4配置类似,只是VLAN ID不一样
路由器
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]undo portswitch
[Huawei-Eth-Trunk1]trunkport g 0/0/0 to 0/0/1
[Huawei]int Eth-Trunk 1.1
[Huawei-Eth-Trunk1.1]dot1q termination vid 10
[Huawei-Eth-Trunk1.1]arp broadcast enable
[Huawei-Eth-Trunk1.1]ip add 192.168.10.1 24
[Huawei-Eth-Trunk1.1]un sh
Info: Interface Eth-Trunk1.1 is not shutdown.
[Huawei-Eth-Trunk1.1]q
[Huawei]int Eth-Trunk 1.2
[Huawei-Eth-Trunk1.2]dot1q termination v 20
[Huawei-Eth-Trunk1.2]arp broadcast enable
[Huawei-Eth-Trunk1.2]ip add 192.168.20.1 24
[Huawei-Eth-Trunk1.2]un sh
Info: Interface Eth-Trunk1.2 is not shutdown.
[Huawei-Eth-Trunk1.2]q
[Huawei]int e
[Huawei]int Eth-Trunk 2
[Huawei-Eth-Trunk2]undo portswitch
[Huawei-Eth-Trunk2]trunkport g 1/0/0
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk2]trunkport g0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-Eth-Trunk2]q
[Huawei]int Eth-Trunk 2.1
[Huawei-Eth-Trunk2.1]dot1q termination v 30
[Huawei-Eth-Trunk2.1]ip add 192.168.30.1 24
[Huawei-Eth-Trunk2.1]un sh
Info: Interface Eth-Trunk2.1 is not shutdown.
[Huawei-Eth-Trunk2.1]arp broadcast enable
[Huawei-Eth-Trunk2.1]q
[Huawei]int Eth-Trunk 2.2
[Huawei-Eth-Trunk2.2]dot1q termination v 40
[Huawei-Eth-Trunk2.2]arp broadcast enable
[Huawei-Eth-Trunk2.2]ip add 192.168.40.1 24
[Huawei-Eth-Trunk2.2]un sh
Info: Interface Eth-Trunk2.2 is not shutdown.
[Huawei-Eth-Trunk2.2]q
[Huawei]int g2/0/0
[Huawei-GigabitEthernet2/0/0]ip add 192.168.1.1 24
[Huawei-GigabitEthernet2/0/0]un sh
Info: Interface GigabitEthernet2/0/0 is not shutdown.
[Huawei-GigabitEthernet2/0/0]q
实现ping通