華為模擬器-三次交換機、鏈路捆綁、單臂路由綜合實驗
- 交換機SW1命令
- 交換機SW2命令
- 交換機SW3命令
- 交換機SW4命令
- 路由器R1命令
交換機SW1命令
劃分vlan
[Huawei]vlan batch 10 20
interface Ethernet0/0/1
port link-type access
port default vlan 10
interface Ethernet0/0/2
port link-type access
port default vlan 20
配置trunk
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交換機SW2命令
劃分vlan
[Huawei]vlan batch 10 20
interface Ethernet0/0/3
port link-type access
port default vlan 10
配置trunk
interface Ethernet0/0/4
port link-type access
port default vlan 20
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
交換機SW3命令
劃分vlan
[Huawei]vlan batch 10 20 30
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
在三層交換機的vlanif里配置網關和直連路由的IP地址
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
interface Vlanif30
ip address 12.0.0.1 255.255.255.252
配置默認路由
ip route-static 0.0.0.0 0.0.0.0 12.0.0.2
交換機SW4命令
劃分vlan
interface Ethernet0/0/1
port link-type access
port default vlan 30
interface Ethernet0/0/2
port link-type access
port default vlan 40
將g0/0/1到g0/0/2介面進行鏈路捆綁,并且設定為trunk口,允許所有vlan通過,
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport g 0/0/1 to 0/0/2
[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-port-group-trunk]port trunk allow-pass vlan all
[Huawei-port-group-trunk]un sh
路由器R1命令
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2
將路由器R1設定成單臂路由,
interface Eth-Trunk1.30
dot1q termination vid 30
ip address 192.168.30.1 255.255.255.0
arp broadcast enable
interface Eth-Trunk1.40
dot1q termination vid 40
ip address 192.168.40.1 255.255.255.0
arp broadcast enable

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/156344.html
標籤:其他
