1、使用电口转USB接口线从交换机的console口连接笔记本.
2、使用相关工具如IPOP、Xshell、MobaXsterm、SecureCRT 等都可以。
3、连接方式需要现在设备资源管理器中查找你插入的相关com口,然后在终端工具中配置相关com口,记住有时候连接上了但是不能使用,这时候有可能需要波特率。
4、连接成功后,我们需要账号密码登录。华为默认账号:admin 密码:admin@huawei.com
5、进入看到<>表示是用户视图,需要输入system-view进入系统试图。
6、默认情况下所有接口都划分在vlan1里面,所有在划分是建议使用其他vlan数。
7、创建vlan前建议先使用display vlan查看vlan配置情况再进行相关配置。
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]display vlan
The total number of vlans is : 1
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/9(D) GE0/0/10(D) GE0/0/11(D) GE0/0/12(D)
GE0/0/13(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)
GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
8、单个端口添加加入vlan
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/1]display vlan
Mar 16 2022 22:12:56-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 35, t
he change loop count is 0, and the maximum number of records is 4095.
The total number of vlans is : 2
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/9(D) GE0/0/10(D) GE0/0/11(D) GE0/0/12(D)
GE0/0/13(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)
GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D)
10 common TG:GE0/0/1(D)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
清除vlan配置
[Huawei-GigabitEthernet0/0/1]undo port trunk allow-pass vlan 10
9、分组划分vlan
[Huawei]port-group 1
[Huawei-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/10
[Huawei-port-group-1]port link-type trunk
[Huawei-port-group-1]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/4]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/5]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/6]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/7]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/8]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/9]port trunk allow-pass vlan 10
[Huawei-GigabitEthernet0/0/10]port trunk allow-pass vlan 10
[Huawei]undo port-group 1
[Huawei]display vlan
The total number of vlans is : 2
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/9(D) GE0/0/10(D) GE0/0/11(D) GE0/0/12(D)
GE0/0/13(D) GE0/0/14(D) GE0/0/15(D) GE0/0/16(D)
GE0/0/17(D) GE0/0/18(D) GE0/0/19(D) GE0/0/20(D)
GE0/0/21(D) GE0/0/22(D) GE0/0/23(D) GE0/0/24(D)
10 common TG:GE0/0/1(D) GE0/0/2(D) GE0/0/3(D) GE0/0/4(D)
GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/9(D) GE0/0/10(D)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
10、配置vlanif
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.186.1.1 255.255.255.255
//或者
[Huawei-Vlanif10]ip address 192.186.1.1 24
//查看所有Vlanif配置
[Huawei]display interface Vlanif
Vlanif1 current state : DOWN
Line protocol current state : DOWN
Description:
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc7d-5a4e
Current system time: 2022-03-16 23:34:46-08:00
Input bandwidth utilization : --
Output bandwidth utilization : --
Vlanif10 current state : DOWN
Line protocol current state : DOWN
Description:
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 192.168.1.1/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-cc7d-5a4e
Current system time: 2022-03-16 23:34:46-08:00
Input bandwidth utilization : --
Output bandwidth utilization : --