//視圖切換命令
<Huawei>system-view
[Huawei]
//交換機(jī)修改名字
<Huawei>system-view
[Huawei]sysname R1
[R1]
//保存命令? 思科貌似是write
<Huawei>save
? The current configuration will be written to the device.
? Are you sure to continue? (y/n)[n]:y
? It will take several minutes to save configuration file, please wait........
? Configuration file had been saved successfully
? Note: The configuration file will take effect after being activated
<Huawei>
//創(chuàng)建VLAN,并配置VLAN ip地址,開啟vlan
[Huawei]vlan 5
[Huawei]interface Vlanif 5
[Huawei-Vlanif5]ip address 10.10.1.1 24
[Huawei-Vlanif5]undo shutdown
Info: Interface Vlanif5 is not shutdown.
//配置端口類型,所屬vlan.
[Huawei]interface Ethernet 0/0/0
[Huawei-Ethernet0/0/0]port link-type access
[Huawei-Ethernet0/0/0]port default vlan 5
//描述接口信息
[R1]interface Ethernet 0/0/0
[R1-Ethernet0/0/0]description link-to-pc1
//查看當(dāng)前接口配置命令
[R1-Ethernet0/0/0]display this
[V200R003C00]
#
interface Ethernet0/0/0
description link-to-pc1
port link-type access
port default vlan 5
#
return
//查看端口狀態(tài)
<Huawei>display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2
Interface? ? ? ? ? ? ? ? ? ? ? ? IP Address/Mask? ? ? Physical? Protocol?
GigabitEthernet0/0/0? ? ? ? ? ? ? 192.168.1.1/24? ? ? up? ? ? ? up? ? ? ?
GigabitEthernet0/0/1? ? ? ? ? ? ? unassigned? ? ? ? ? down? ? ? down? ? ?
GigabitEthernet0/0/2? ? ? ? ? ? ? unassigned? ? ? ? ? down? ? ? down? ? ?
NULL0? ? ? ? ? ? ? ? ? ? ? ? ? ? unassigned? ? ? ? ? up? ? ? ? up(s)?
//重啟命令? ? 銳捷restart
<Huawei>reboot
Info: The system is comparing the configuration, please wait.
Warning: All the configuration will be saved to the next startup configuration.
Continue ? [y/n]:y
? It will take several minutes to save configuration file, please wait.........
? Configuration file had been saved successfully
? Note: The configuration file will take effect after being activated
System will reboot! Continue ? [y/n]:y
Info: system is rebooting ,please wait...
//配置管理vlan劣纲,華為管理vlan不能添加成員籽懦,思科可以
[Huawei]vlan 5
[Huawei-vlan5]management-vlan
//查看端口所屬vlan
[sw2]display port vlan
Port? ? ? ? ? ? ? ? ? ? Link Type? ? PVID? Trunk VLAN List
-------------------------------------------------------------------------------
Ethernet0/0/1? ? ? ? ? trunk? ? ? ? 1? ? 1-4094
Ethernet0/0/2? ? ? ? ? access? ? ? 10? ? -? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Ethernet0/0/3? ? ? ? ? access? ? ? 20? ? -?
//查看端口狀態(tài)?
[sw2]display vlan
//創(chuàng)建多個(gè)vlan冷蚂,vlan 10? vlan 20 vlan 30? ? ? ? ? ? ? ?
[Huawei]vlan batch 10 20 30