华为5700交换机配置VLAN

2025-02-06 04:01:33
推荐回答(3个)
回答1:

system-view                         进入配置模式

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname center_switch            更改交换机名

创建vlan

[center_switch]vlan 40                            

[center_switch-vlan40]quit

给vlan配置IP地址            

[center_switch]interface Vlanif 40        

[center_switch-Vlanif40]ip address 10.10.40.1 255.255.255.0 

将某个端口加入到vlan中

[center_switch] interface port GigabitEthernet 0/0/24

[center_switch-GigabitEthernet0/0/24]port link-type access

[center_switch-GigabitEthernet0/0/24]port default vlan40

将交换机中一组端口加入到一个VLAN中

创建vlan

[center_switch]vlan 42

[center_switch-vlan42]quit

给vlan 配置IP地址

[center_switch]interface Vlanif 42

[center_switch-Vlanif42]ip add 

[center_switch-Vlanif42]ip address 10.10.42.1 255.255.255.0

创建端口组

[center_switch]port-group port1to8forvlan40

将相应的端口加入组中

[center_switch]port-group port1to8forvlan40]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/8

设置端口方式

[center_switch-port-group-port1to8forvlan42]port link-type access

设置端口组默认vlan(即之前创建好的vlan ID 42)

[center_switch-port-group-port1to8forvlan42]port default vlan 42

[center_switch]display vlan

save

[Quidway] display version 

显示VRP版本号  

[Quidway] display current-configuration 

显示系统运行配置信息 

[Quidway] display saved-configuration 

显示保存的配置信息 

[Quidway] display interfaces brief 

显示接口配置信息 

[Quidway]display ip routing-table 

显示路由表  

[Quidway]display systname  

命令用来显示路由器的名称



希望能够帮到你,附件有更多的配置方法,你可以下载下来看看!


回答2:

vlan batch 2 10 20 30
#
vlan 30
mux-vlan
subordinate group 20

INT VLAN 2
IP ADD 192.168.100.1 24
QUIT
INT VLAN 10
IP add 192.168.1.1 24
quit
int vlan 20
ip add 192.168.2.1 24
quit
int vlan 30
ip add 192.168.3.1 24
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
port mux-vlan enable
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
port mux-vlan enable
#
interface Ethernet0/0/9
port link-type access
port default vlan 20
port mux-vlan enable
#
interface Ethernet0/0/12
port link-type access
port default vlan 20
port mux-vlan enable
#
interface Ethernet0/0/13
port link-type access
port default vlan 30
port mux-vlan enable

回答3:

大哥(姐)你提的是什么意思啊?怎么听不明白呢?重说!