华为交换机配置指令视图切换指令system-view[Quidway]quit//用可以从任意视图直接回到用户视图交换机命名[Quidway]sysnamedevicename配置文件的保存与删除保存配置:save擦除配置:resetsaved-configurationreboot交换机端口基本配置进入相应端口的视图:[Quidway]interfaceinterface-typeinterface-number打开以太网端口:[Switch-ethernetport-id]undoshutdown设置以太网端口描述字符串:[Switch-ethernetport-id]descriptiontext设置以太网端口的双工模式:[Switch-ethernetport-id]duplex{auto|full|half}设置以太网端口的速率:[Switch-ethernetport-id]speed{10|100|1000|auto}设置以太网端口的MDI模式:[Switch-ethernetport-id]mdi{across|auto|normal}开启以太网端口的流量控制功能:[Switch-ethernetport-id]flow-controldisplay查看指令查看版本信息:displayversion查看当前配置:displaycurrent-configuration查看保存配置:displaysaved-configuration显示接口信息:displayinterface显示接口IP状态与配置信息:displayipinterfacebrief显示系统运行统计信息:displaydiagnostic-informationTelnet远程管理的配置使能Telnet服务器端:[Quidway]telnetserverenable//实验室设备默认启动,支持不命令进入vty用户界面视图:[Quidway]user-interfacevtyfirst-num2[last-num2]设置验证方式:[Quidway-ui-vty0]authentication-mode{none|password|scheme}设置本地口令验证:[Quidway-ui-vty0]setauthenticationpassword{cipher|simple}password[Quidway-ui-vty0]userprivilegelevellevel本地用户名和口令验证:[Quidway]local-userusername[Quidway-luser-xxx]password{cipher|simple}password[Quidway-luser-xxx]service-typetelnet[Quidway-luser-xxx]levellevel//实验室设备默认level3,不支持命令交换机管理IP地址配置指定交换机上的管理VLAN[Switch]management-vlanvlan-id//缺省情况下,管理VLAN为VLAN1创建并进入管理VLAN接口视图[Switch]interfacevlan-interfacevlan-id配置管理VLAN接口IP地址[Switch-port-typeport-id]ipaddressip-addressmask//缺省管理VLAN接口没有IP地址配置静态路由(交换机上实际是在配置默认网络)[Switch]iproute-staticip-address{mask|mask-length}{interface-typeinterface-number|next-hop}交换机端口安全配置开启全局的802.1X特性[Switch]dot1x开启端口的802.1X特性[Switch]dot1xinterfaceinterface-list添加本地接入用户并设置相关参数[Switch]local-useruser-name[Switch-luser-localuser]service-typelan-access[Switch-luser-localuser]password{cipher|simple}passwordVLAN配置创建VLAN:[Switch]vlanvlan-id在VLAN视图中将接口接入该VLAN:[Switch-vlan-id]portinterface-list删除VLAN:[Switch]undovlanvlan-id//删除VLAN前请将属于该所有接口从该VLAN中移除。添加VLAN功能描述:[Switch-vlan-id]descriptiontext进入接口视图:[Switch]interfaceport-typeslot/subslot/port配置端口的链路类型:[Switch-port-typeport-id]portlink-type{Access|trunk|hybrid}将Access端口加入到指定的VLAN中[Switch-port-typeport-id]portaccessvlanvlan-id//所指派的VLAN-id必须存在允许指定的VLAN通过当前Trunk端口[Switch-port-typeport-id]porttrunkpermitvlan{vlan-id-list|all}设置Trunk端口的缺省VLAN[Switch-port-typeport-id]porttrunkpvidvlanvlan-id允许指定的VLAN通过当前Hybrid端口[Switch-port-typeport-id]porthybridvlanvlan-id-list{tagged|untagged}设置Hybrid端口的缺省VLAN[Switch-port-typeport-id]porthybridpvidvlanvlan-id交换机链路聚合基本配置启动链路聚合:[Switch]Link-aggregationinterface_name1tointerface_name2{both|ingress}关闭链路聚合:[Switch]UndoLink-aggregation{master_interface_name|all}交换机端口镜像指令指定镜像端口[Quidway]monitor-port{interface_typeinterface_num|interface_nam...