配置华为三层交换机,实现不同Vlan之间的通信。
<huawei>syste-mview
[huawei]sysname gateway
[gateway]vlan batch 10 20 30
[gateway]interface vlanif 10
[gateway-Vlanif10]undo shutdown
[gateway-Vlanif10]ip address 192.168.10.254 255.255.255.0
[gateway-Vlanif10]quit
[gateway]interface vlanif 20
[gateway-Vlanif20]undo shutdown
[gateway-Vlanif20]ip address 192.168.20.254 255.255.255.0
[gateway-Vlanif20]quit
[gateway]interface vlanif30
[gateway-Vlanif30]undo shutdown
[gateway-Vlanif30]ip address 192.168.30.254 255.255.255.0
[gateway-Vlanif30]quit
[gateway]
[gateway]interface GigabitEthernet 0/0/1
[gateway-GigabitEthernet0/0/1]port link-type access
[gateway-GigabitEthernet0/0/1]port default vlan 10
[gateway-GigabitEthernet0/0/1]quit
[gateway]interface GigabitEthernet 0/0/2
[gateway-GigabitEthernet0/0/2]port link-type access
[gateway-GigabitEthernet0/0/2]port default vlan 20
[gateway-GigabitEthernet0/0/2]quit
[gateway]interface GigabitEthernet 0/0/3
[gateway-GigabitEthernet0/0/1]port link-type access
[gateway-GigabitEthernet0/0/1]port default vlan 30
[gateway-GigabitEthernet0/0/1]quit