Register   |   Login

Print

H3C交换机VLAN命令配置

H3C交换机VLAN命令配置

进入系统视图

----------------------------------------------------------------------------------

<H3C>syste

<H3C>system-view

System View: return to User View with Ctrl+Z.

[H3C]sysname switch-test

[switch-test]display interface brief

----------------------------------------------------------------------------------

# 创建 VLAN 100,并将端口 GigabitEthernet2/1/1 加入 VLAN 100

----------------------------------------------------------------------------------

[DeviceA] vlan 100

[DeviceA-vlan100] port gigabitethernet 2/1/1

[DeviceA-vlan100] quit

--------------------------------------------------------------------------------

# 创建 VLAN 200,并将端口 GigabitEthernet2/1/2 加入 VLAN 200。

--------------------------------------------------------------------------------

[DeviceA] vlan 200

[DeviceA-vlan200] port gigabitethernet 2/1/2

[DeviceA-vlan200] quit

--------------------------------------------------------------------------------

# Trunk端口配置:将GigabitEthernet2/1/3设置为Trunk端口,并允许VLAN 100 200通过

--------------------------------------------------------------------------------

[DeviceA] interface gigabitethernet 2/1/3

[DeviceA-GigabitEthernet2/1/3] port link-type trunk

[DeviceA-GigabitEthernet2/1/3] port trunk permit vlan 100 200

—————————————————————————————————————————保存配置

[switch-test-vlan20]save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):vlan.cfg

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

----------------------------------------------------------------------------------

Hybrid - VLAN 配置

-----------------------

[switch-GigabitEthernet1/0/1]port link-type hybrid

[switch-GigabitEthernet1/0/1]port hybrid vlan 10 30 untagged

[switch-GigabitEthernet1/0/1]int ge1/0/2

[switch-GigabitEthernet1/0/2]port link-type hybrid

[switch-GigabitEthernet1/0/2]port hybrid vlan 20 30 untagged

[switch-GigabitEthernet1/0/2]int ge1/0/3

[switch-GigabitEthernet1/0/3]port link-type hybrid

[switch-GigabitEthernet1/0/3]port hybrid vlan 10 20 30 untagged

[switch-GigabitEthernet1/0/3]save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/startup.cfg]

(To leave the existing filename unchanged, press the enter key):

Validating file. Please wait...

Saved the current configuration to mainboard device successfully.

--------------------------------------------------------------------------------------

TOP

Quick search in Advantech Support Portal