1、Access端口配置
[Huawei]vlan 10 //创建VLAN10
[Huawei]dis vlan //查看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/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 //VLAN10创建成功
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
[Huawei]int g 0/0/1 //进入G0/0/1端口
[Huawei-GigabitEthernet0/0/1]port link-type access //将端口类型配置为Access
[Huawei-GigabitEthernet0/0/1]port default vlan 10 //将端口划分到VLAN10中,对其他端口进行类似配置
[Huawei-GigabitEthernet0/0/1]int g 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]int g 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 10
[Huawei]display port vlan active //查看VLAN端口信息,显示端口PVID和VLAN List等信息
T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
GE0/0/1 access 10 U: 10
GE0/0/2 access 10 U: 10
GE0/0/3 access 10 U: 10
GE0/0/4 hybrid 1 U: 1
GE0/0/5 hybrid 1 U: 1
GE0/0/6 hybrid 1 U: 1
GE0/0/7 hybrid 1 U: 1
GE0/0/8 hybrid 1 U: 1
GE0/0/9 hybrid 1 U: 1
GE0/0/10 hybrid 1 U: 1
GE0/0/11 hybrid 1 U: 1
GE0/0/12 hybrid 1 U: 1
GE0/0/13 hybrid 1 U: 1
GE0/0/14 hybrid 1 U: 1
GE0/0/15 hybrid 1 U: 1
GE0/0/16 hybrid 1 U: 1
GE0/0/17 hybrid 1 U: 1
GE0/0/18 hybrid 1 U: 1
GE0/0/19 hybrid 1 U: 1
GE0/0/20 hybrid 1 U: 1
GE0/0/21 hybrid 1 U: 1
GE0/0/22 hybrid 1 U: 1
GE0/0/23 hybrid 1 U: 1
GE0/0/24 hybrid 1 U: 1
[Huawei]
2、Access端口和Trunk端口配置
[SWA]vlan batch 10 20
[SWA]int g 0/0/2
[SWA-GigabitEthernet0/0/2]port link-type access
[SWA-GigabitEthernet0/0/2]port default vlan 10
[SWA]int g 0/0/3
[SWA-GigabitEthernet0/0/3]port link-type access
[SWA-GigabitEthernet0/0/3]port default vlan 10
[SWA-GigabitEthernet0/0/3]int g 0/0/1
[SWA-GigabitEthernet0/0/1]port link-type trunk
[SWA-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[SWA-GigabitEthernet0/0/1]dis vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
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(U) 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 UT:GE0/0/2(U)
TG:GE0/0/1(U)
20 common UT:GE0/0/3(U)
TG:GE0/0/1(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
[SWA-GigabitEthernet0/0/1]dis port vlan ac
[SWA-GigabitEthernet0/0/1]dis port vlan active
T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
GE0/0/1 trunk 1 U: 1
T: 10 20
GE0/0/2 access 10 U: 10
GE0/0/3 access 20 U: 20
GE0/0/4 hybrid 1 U: 1
GE0/0/5 hybrid 1 U: 1
GE0/0/6 hybrid 1 U: 1
GE0/0/7 hybrid 1 U: 1
GE0/0/8 hybrid 1 U: 1
GE0/0/9 hybrid 1 U: 1
GE0/0/10 hybrid 1 U: 1
GE0/0/11 hybrid 1 U: 1
GE0/0/12 hybrid 1 U: 1
GE0/0/13 hybrid 1 U: 1
GE0/0/14 hybrid 1 U: 1
GE0/0/15 hybrid 1 U: 1
GE0/0/16 hybrid 1 U: 1
GE0/0/17 hybrid 1 U: 1
GE0/0/18 hybrid 1 U: 1
GE0/0/19 hybrid 1 U: 1
GE0/0/20 hybrid 1 U: 1
GE0/0/21 hybrid 1 U: 1
GE0/0/22 hybrid 1 U: 1
GE0/0/23 hybrid 1 U: 1
GE0/0/24 hybrid 1 U: 1
[SWA-GigabitEthernet0/0/1]dis port vlan active
T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
GE0/0/1 trunk 1 U: 1
T: 10 20
GE0/0/2 access 10 U: 10
GE0/0/3 access 20 U: 20
GE0/0/4 hybrid 1 U: 1
GE0/0/5 hybrid 1 U: 1
GE0/0/6 hybrid 1 U: 1
GE0/0/7 hybrid 1 U: 1
GE0/0/8 hybrid 1 U: 1
GE0/0/9 hybrid 1 U: 1
GE0/0/10 hybrid 1 U: 1
GE0/0/11 hybrid 1 U: 1
GE0/0/12 hybrid 1 U: 1
GE0/0/13 hybrid 1 U: 1
GE0/0/14 hybrid 1 U: 1
GE0/0/15 hybrid 1 U: 1
GE0/0/16 hybrid 1 U: 1
GE0/0/17 hybrid 1 U: 1
GE0/0/18 hybrid 1 U: 1
GE0/0/19 hybrid 1 U: 1
GE0/0/20 hybrid 1 U: 1
GE0/0/21 hybrid 1 U: 1
GE0/0/22 hybrid 1 U: 1
GE0/0/23 hybrid 1 U: 1
GE0/0/24 hybrid 1 U: 1
[SWA-GigabitEthernet0/0/1]
标签:10,GE0,配置,GigabitEthernet0,VLAN,hybrid,port,vlan
From: https://www.cnblogs.com/xl4ng/p/16780015.html