eNSP – 通过华为交换机划分VLAN
实验目标:
[code language=”shell”][/code]
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1 # 进入 GE 0/0/1 下面三条命令类似
[Huawei-GigabitEthernet0/0/1]port link-type access # 修改 link-type 为 access,否则在给vlan添加时会报错
[Huawei-GigabitEthernet0/0/1]q # 返回到系统视图[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]q
[Huawei]interface GigabitEthernet 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]q
[Huawei]q
[Huawei]interface GigabitEthernet 0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]q
[Huawei]vlan 520 # 创建vlan 520
[Huawei-vlan520]port GigabitEthernet 0/0/1 # 将GE 0/0/1 和 2 添加进去
[Huawei-vlan520]port GigabitEthernet 0/0/2
[Huawei-vlan520]q
[Huawei]display current-configuration # 查看当前配置
#
sysname Huawei
#
vlan batch 520
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1 # 这里能看到4个设备的type已经是access了,并且前面二者也属于vlan 520了
port link-type access
port default vlan 520
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 520
#
interface GigabitEthernet0/0/3
port link-type access
#
interface GigabitEthernet0/0/4
port link-type access
#
# 省略部分vlan信息
VID Type Ports
——————————————————————————–
1 common UT:GE0/0/3(U) GE0/0/4(U) 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)
520 common UT:GE0/0/1(U) GE0/0/2(U) # 此时只有 vlan 520 关联了GE 0/0/1 和 2 。下面再创建vlan 530 关联 3 和 4
VID Status Property MAC-LRN Statistics Description
——————————————————————————–
1 enable default enable disable VLAN 0001
520 enable default enable disable VLAN 0520
[Huawei]vlan 530
[Huawei-vlan530]port GigabitEthernet 0/0/3
[Huawei-vlan530]port GigabitEthernet 0/0/4
Jul 31 2015 20:28:54-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 18, the
change loop count is 0, and the maximum number of records is 4095.
Jul 31 2015 20:28:54-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 ha
s turned into DOWN state.
[Huawei-vlan530]q
[Huawei]display vlan
——————————————————————————–
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/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)
520 common UT:GE0/0/1(U) GE0/0/2(U)
530 common UT:GE0/0/3(U) GE0/0/4(U)
VID Status Property MAC-LRN Statistics Description
——————————————————————————–
1 enable default enable disable VLAN 0001
520 enable default enable disable VLAN 0520
530 enable default enable disable VLAN 0530
[Huawei]
[code][/code]