《2022年2022年华为交换机配置常用命令》由会员分享,可在线阅读,更多相关《2022年2022年华为交换机配置常用命令(10页珍藏版)》请在金锄头文库上搜索。
1、华为交换机配置常用命令一、连接方式:(加粗为键入命令)超级连接:开始程序附件通讯超级链接命名还原默认回车查看配置信息:display cu -查看系统运行信息进入系统特权模式:sys-进入配置管理模式(全命令system-view)二、创建 VLAN : Quidway vlan 104- 建立 vlan104 Quidway-vlan104 q- 退出Quidway vlan 3008- 建立业务 VLAN3008 Quidway-vlan3008 q- 退出三:进入端口:Quidway int gi 0/0/1-进入上联端口 (8 口交换为 9 口,16 口交换为17 口,24 口为 25
2、 口)四:标识端口Quidway-GigabitEthernet0/ 0/1description shanglian标记端口上联五:定义端口类型、配置业务通过VLAN:Quidway-GigabitEthernet0/ 0/1port link-type trunk-定义端口类型为trunk(无法直连电脑)Quidway-GigabitEthernet0/ 0/1port trunk allow-pass vlan 104 3008-定义可以通关的vlan Quidway-GigabitEthernet0/ 0/1q-退出上联端口Quidway int Ethernet0/0/1- 进人 E
3、TH端口 1 Quidway-Ethernet0/ 0/1port link-type access -定义端口类型为access(可以直连电脑)Quidway-Ethernet0/ 0/1port default vlan 3008-定义端口vlan 标识(上网vlan)Quidway-Ethernet0/ 0/1int Ethernet0/0/2-进人端口2 Quidway-Ethernet0/ 0/2port link-type access- -定义端口类型为access(可以直连电脑)Quidway-Ethernet0/ 0/2port default vlan 3008-定义端口v
4、lan 标识(上网vlan)#省略。 。 。 。 。 。3-24 口配置步骤六、 配置远程管理VLAN:Quidway int Vlanif 104- 定义 vlan104 为远程管理vlan Quidway-Vlanif104 ip address 10.6.10.40 255.255.254.0 设置交换机远程管理IP,子网Quidway-Vlanif104 qQuidway ip route-static 0.0.0.0 0.0.0.0 10.6.10.1 (设置交换机远程管理路由) 七、配置远程登陆权限:Quidway aaa -进入系统aaa模式(可以管理用户名和密码)Quidway
5、-aaa local-user admin password simple 12345 -(设置本地用户名及密码)Quidway-aaa local-user admin service-type telnet- - 允许通过telnet 管理本交换机Quidway super password simple lyctt简单的超级管理员密码lyctt(设置切换用户级别密码)Quidway super password level 3 simple lyctt简单超级管理员密码消除3 次 lyctt Quidway user-interface vty 0 4- 进入 vty 0 4 用户创建模
6、式Quidway-ui-vty0-4 authentication-mode aaa - 认证方式aaa Quidway-ui-vty0-4 protocol inbound telnet -认定方式可以telnet Quidway-ui-vty0-4 q- 退出 vty 0 4 用户创建模式Quidway q退出管理模式八、保存 :sa保存The current configuration will be written to the device. 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - -
7、 - - - 第 1 页,共 10 页 - - - - - - - - - Are you sure to continue?Y/N y 现在的结构将会被写到装置。九、清除交换机数据配置-慎用,恢复出厂设置。Reset saved-configuration清除以保存的配置 Reboot 重启一般需要删除1 次重启后再执行删除1 次后重启才能恢复出厂。十、创建链路聚合 system-viewQuidway interface Eth-Trunk 1-创建链路聚合 1 Quidway-Eth-Trunk1 e-trunk mode force-master-链路聚合工作模式force-maste
8、r 强制为主用auto 自动模式force-backup 强制为备用例子:如下端口# interface Ethernet0/0/2 eth-trunk 1 undo ntdp enable undo ndp enable # interface Ethernet0/0/3 eth-trunk 1 undo ntdp enable undo ndp enable 十一、端口镜像(本地)Quidway observe-port 1 interface Ethernet 0/0/1 配置本地检测端口为Ethernet 0/0/1Quidway interface gigabitethernet 2
9、/0/0 要观察的端口Quidway-GigabitEthernet2/0/0 port-mirroring to observe-port 1 inbound 模式-对接口 GE2 /0/0 上入方向的报文进行镜像both 对接口出 /入两个方向的报文进行镜像。Inbound 对接口入方向的报文进行镜像Outbound 对接口出方向的报文进行镜像查看镜像命令 display port-mirroring- Mirror-port Direction Observe-port - 1 gigabitethernet 2/0/0 Inbound Ethernet 0/0/1- 十二、常出现的错误
10、信息翻译1、 Unrecognized command没有查找到关键字参数类型错参数值越界2.Incomplete command 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 10 页 - - - - - - - - - 输入命令不完整3.Too many parameters 输入参数太多4.Ambiguous command 输入参数不明确backup Backup electronic elabel 电子 elabel 备份cd Change current d
11、irectory 改变当前目录clear Clear information 明确的信息clock Specify the system clock 指定系统时钟cluster Run cluster command 运行集群命令cluster-ftp FTP command of cluster 命令组compare Compare function 比较功能copy Copy from one file to another 从一个文件到另一个文件debugging Enable system debugging functions 使系统的调试功能delete Delete a file
12、 删除一个文件dir List files on a file system 名单上的档案文件系统display Display current system information 显示当前系统信息fixdisk Recover lost chains in storage device 恢复丢失的链在存储设备format Format the device 格式的装置free Release a user terminal interface 释放一个用户终端接口ftp Establish an FTP connection 建立一个连接hwtacacs-user HWTACACS use
13、r 用户开关lldp Link Layer Discovery Protocol 链路层发现协议local-user Add/Delete/Set user(s) 添加/删除/设置用户(拧lock Lock the current user terminal interface锁定当前用户终端接口mkdir Create a new directory创建一个新目录more Display the contents of a file显示内容的文件move Move the file 移动文件ntdp Run NTDP commands 移动 filerun ntdp 命令patch Patc
14、h subcommands补丁的命令ping Send echo messages 发送回应消息pwd Display current working directory显示当前的工作目录quit Exit from current command view退出当前命令查看reboot Reboot system重新启动系统rename Rename a file or directory 重命名一个文件或目录reset Reset operation rmdir Remove an existing directory删除一个现有的目录名师资料总结 - - -精品资料欢迎下载 - - - -
15、 - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 10 页 - - - - - - - - - save Save current configuration保存当前配置schedule schedule system task任务计划系统screen-length Set the number of lines displayed on a screen集数线显示在屏幕上send Send information to other user terminal interfaces发送信息给其他用户终端接口set Set sta
16、cking Run command on stack switch运行命令堆栈开关startup Config paramater for system to startup配置参数对系统启动super Privilege current user a specified priority level特权用户指定的优先级system-view Enter the system view进入系统视图telnet Establish a Telnet connection建立一个连接terminal Set the terminal line characteristics设置线路特点test-a
17、aa Accounts test客户测试tftp Establish a TFTP connection建立和连接trace Trace route(switch) to host on Data Link Layer跟踪路由(开关)主办的数据链路层tracert Trace route to host跟踪主机的路由undelete Recover a deleted file恢复已删除的文件undo Cancel current setting取消当前设置unzip Decompress a file解压缩文件zip Compress a file压缩文件名师资料总结 - - -精品资料欢迎
18、下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 10 页 - - - - - - - - - aaa AAA view acl Specify ACL configuration information application-apperceive Set application-apperceive information arp Specify ARP configuration information arp-suppress Specify arp suppress configuration in
19、formation, default is disabled autoconfig AutoConfig configuration information bootrom BootRom bpdu BPDU message bpdu-tunnel bpdu-tunnel btv Btv view burst-mode Set burst mode cfm Connectivity fault management cluster Specify the information for cluster configuration command-privilege Specify the co
20、mmand level cp-car Cpu car setting cpu-usage Set cpu usage configuration dhcp Dynamic host configure protocol display Display current system information dns Specify domain name system 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 10 页 - - - - - - - - - domain
21、Default domain dot1x 802.1x configuration information drop discard attribute efm EFM module error-down The interface was shut down because of an error event execute Batch Command file Specify file system configuration information firewall Specify firewall configuration free Release a user terminal i
22、nterface ftp Specify the server attribute garp Generic Attribute Registration Protocol gvrp Generic VLAN Registration Protocol header Define the login banner http HTTP hwtacacs Set the status of the HWTACACS(Huawei Terminal Access Controller Access Control System) service hwtacacs-server Set HWTACAC
23、S server icmp-reply Enable ICMP reply fast ifg Interval frame gap ifindex Constant-ifindex information igmp-snooping Specify parameters for IGMP-Snooping info-center Specify message output configuration information interface Specify the interface configuration view 名师资料总结 - - -精品资料欢迎下载 - - - - - - -
24、 - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 10 页 - - - - - - - - - ip IP information ipv6 Enable IPv6 functionality l2-topology Layer 2 topology l2protocol-tunnel Layer 2 protocol tunnel lacp Link aggregation control protocol lldp Link Layer Discovery Protocol load-balance Specify load balan
25、ce mode loopback-detect Loopback detect function mac-address MAC address mac-authen MAC authenticate configure information mac-forced-forwarding Mac-Forced Forwarding mip Configure a rule used to create MIP mirror-reserve-port Specify mirror-reserve-port mld-snooping Specify parameters for MLD-Snoop
26、ing multicast multicast nap NAP protocol nd Neighbor discovery ndp Neighbor discovery protocol nqa Specify NQA test class nqa-jitter Switch NQA jitter version nqa-server Specify NQA echo server ntdp Network topology discovery protocol ntp-service Specify NTP(Network Time Protocol) configuration 名师资料
27、总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 10 页 - - - - - - - - - information observe-port Configurate observe port feature ping Ping function port-group port-group port-isolate port isolate port-mirroring Mirror port pppoe PPPOE qinq 802.1q in 802.1q qos QoS c
28、onfiguration quit Exit from current command view radius-server Add or delete RADIUS server template reset Clear running system information return Exit to user view rmon Specify RMON router Open/Close RM interface debug switch rrpp Rapid ring protection protocol rsa Specify RSA module configuration i
29、nformation set Set sftp Set SFTP service attribute snmp-agent Specify SNMP(Simple Network Management Protocol) configuration information ssh Set the SSH (secure shell) configuration attribute stacking Specify stack configuration information 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师
30、精心整理 - - - - - - - 第 8 页,共 10 页 - - - - - - - - - stelnet Set Stelnet service attribute stp Specify Spanning Tree Protocol(STP) configuration information super Modify super password parameters sysname Specify the host name tcp Specify TCP(Transmission Control Protocol) configuration information teln
31、et Set the status of the Telnet service temperature Device temperature test-aaa Accounts test test-packet Set the test packet tftp Establish a TFTP connection tftp-server TFTP Server time-range Specify time-range configuration information trace Trace route(switch) to host on Data Link Layer tracert
32、Trace route to host traffic Specify traffic configuration information traffic-filter Filter packets base on acl traffic-limit Limit the rate of the packets base on acl traffic-mirror Mirror packets base on acl traffic-policy Apply specific traffic policy traffic-remark Remark packets base on acl tra
33、ffic-statistic Count packets base on acl 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 10 页 - - - - - - - - - undo Cancel current configuration upgrade Upgrade software online user-bind User bind user-interface Configure the user terminal interface vlan Virtual LAN voice-vlan Voice VLAN 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 10 页,共 10 页 - - - - - - - - -