当前位置:   article > 正文

模拟配置VLAN--1_vlan模拟

vlan模拟

简述步骤如下:

1)创建VLAN 10、20、30
2)将端口加入VLAN
3)查看VLAN信息

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan batch 10 20 30 //创建VLAN 10、20、30
Info: This operation may take a few seconds. Please wait for a moment...done.

--将端口加入VLAN
[SW1]interface g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access 
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]q

[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access 
[SW1-GigabitEthernet0/0/2]port default vlan 10
[SW1-GigabitEthernet0/0/2]q

[SW1]interface g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access 
[SW1-GigabitEthernet0/0/3]port default vlan 20
[SW1-GigabitEthernet0/0/3]q

[SW1]interface g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type access 
[SW1-GigabitEthernet0/0/4]port default vlan 20
[SW1-GigabitEthernet0/0/4]q

interface g0/0/5
port link-type access 
port default vlan 30
q

interface g0/0/6
port link-type access 
port default vlan 30
q

--查看VLAN信息
[sw1]display vlan    //查看vlan信息    
[sw1]display port vlan    //查看交换机端口的vlan信息

配置如下图: 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/326818
推荐阅读
  

闽ICP备14008679号