基本命令+查看端口所属vlan

//视图切换命令

<Huawei>system-view

[Huawei]

//交换机修改名字

<Huawei>system-view

[Huawei]sysname R1

[R1]

//保存命令  思科貌似是write

<Huawei>save

  The current configuration will be written to the device.

  Are you sure to continue? (y/n)[n]:y

  It will take several minutes to save configuration file, please wait........

  Configuration file had been saved successfully

  Note: The configuration file will take effect after being activated

<Huawei>

//创建VLAN,并配置VLAN ip地址,开启vlan

[Huawei]vlan 5

[Huawei]interface Vlanif 5

[Huawei-Vlanif5]ip address 10.10.1.1 24

[Huawei-Vlanif5]undo shutdown

Info: Interface Vlanif5 is not shutdown.

//配置端口类型,所属vlan.

[Huawei]interface Ethernet 0/0/0

[Huawei-Ethernet0/0/0]port link-type access

[Huawei-Ethernet0/0/0]port default vlan 5

//描述接口信息

[R1]interface Ethernet 0/0/0

[R1-Ethernet0/0/0]description link-to-pc1

//查看当前接口配置命令

[R1-Ethernet0/0/0]display this

[V200R003C00]

#

interface Ethernet0/0/0

description link-to-pc1

port link-type access

port default vlan 5

#

return

//查看端口状态

<Huawei>display ip interface brief

*down: administratively down

^down: standby

(l): loopback

(s): spoofing

The number of interface that is UP in Physical is 2

The number of interface that is DOWN in Physical is 2

The number of interface that is UP in Protocol is 2

The number of interface that is DOWN in Protocol is 2

Interface                        IP Address/Mask      Physical  Protocol 

GigabitEthernet0/0/0              192.168.1.1/24      up        up       

GigabitEthernet0/0/1              unassigned          down      down     

GigabitEthernet0/0/2              unassigned          down      down     

NULL0                            unassigned          up        up(s) 

//重启命令    锐捷restart

<Huawei>reboot

Info: The system is comparing the configuration, please wait.

Warning: All the configuration will be saved to the next startup configuration.

Continue ? [y/n]:y

  It will take several minutes to save configuration file, please wait.........

  Configuration file had been saved successfully

  Note: The configuration file will take effect after being activated

System will reboot! Continue ? [y/n]:y

Info: system is rebooting ,please wait...

//配置管理vlan,华为管理vlan不能添加成员,思科可以

[Huawei]vlan 5

[Huawei-vlan5]management-vlan

//查看端口所属vlan

[sw2]display port vlan

Port                    Link Type    PVID  Trunk VLAN List

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

Ethernet0/0/1          trunk        1    1-4094

Ethernet0/0/2          access      10    -                                 

Ethernet0/0/3          access      20    - 

//查看端口状态?

[sw2]display vlan

//创建多个vlan,vlan 10  vlan 20 vlan 30               

[Huawei]vlan batch 10 20 30

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 通过consule进行配置: # 设置系统的日期、时间和时区 <HUAWEI>clock timezone BJ ...
    lxx_call阅读 5,278评论 0 3
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,969评论 0 0
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,188评论 0 10
  • TABLE OF CONTENTS Introduction 7 Overview of FortiCloud 7...
    Bouw阅读 7,451评论 0 0
  • 在集市上买得小鱼,特别新鲜,给儿子做了吃,生了火,油煎了,放入些许调料,做出来,味道不错,儿子吃了一些和粉条。有...
    关关Steven阅读 1,238评论 2 2

友情链接更多精彩内容