华为交换机状态查看常用命令

合集下载

华为交换机查看端口相关信息常用命令,排查故障法宝,转发收藏

华为交换机查看端口相关信息常用命令,排查故障法宝,转发收藏

华为交换机查看端口相关信息常用命令,排查故障法宝,转发收藏一、查看接口状态1、显示接口的运行状态和相关信息display interface Ethernet brief查看以太网端口的简要信息,物理端口是否连通,端口是否是全双工,带宽是多少,端口的流入流出的流量百分比。

可以排查端口的基本信息,比如有的端口用户网速慢,可以查看该端口的接口速率,是否是全双工状态,是否是网卡速率,比如本来是1000M的网卡,但是速率显示的是10M,那么该条链路一定是有问题的。

2、查看接口的描述信息display interface description由上图知悉,直观地看到接口的物理状态和协议状态,以及描述信息,利于了解接口作用。

3、查看接口状态和配置的简要信息display interface brief由上图知悉,每个接口的物理状态,协议状态,流入和流出的流量,输入和输出错误等。

4、查看接口与IP相关的简要信息display ip interface briefdisplay ip interface description由上图知悉,可以看到包括IP地址、子网掩码、物理链路和协议的Up/Down状态以及处于不同状态的接口数目。

二、查看接口的统计信息1、查看接口的统计信息display interface这是一个全面的端口信息,所有的端口都可以查看,涉及到端口的内容都会在这里查询到。

2、查看接口的流量统计数display counters由上图知悉,每个端口的流量,细分为单播,组播,广播流量。

3、查看错误报文的统计信息display counters error4、查看接口的入方向或出方向流量速率display counters rate5、查看接口和IP配置的相关信息display ip interface这些查看华为交换机接口的命令,帮助你快速查看交换机接口状态,处理日常故障,熟记最好。

实用!总结太好了,华为交换机配置与交换机查询命令。

实用!总结太好了,华为交换机配置与交换机查询命令。

实用!总结太好了,华为交换机配置与交换机查询命令。

之前我们曾总结了关于华为交换机的配置命令及实例,有朋友提到,在配置交换机或在项目中过程中如何查看交换机的配置状态?怎么查看自己配置了哪些端口与vlan?这个内容也是非常重要,查询交换机的配置情况,更能快速的定位、解决交换机在配置过程中的一些问题。

在我们留言区中也有不少朋友反馈在项目中遇到。

本期我们就专题总结华为交换机配置及查询命令,项目配合使用,非常方便。

Part1华为交换机基础配置命令1创建vlan<Quidway> //用户视图,也就是在Quidway模式下运行命令。

<Quidway>system-view //进入配置视图[Quidway] vlan 10 //创建vlan 10,并进入vlan10配置视图,如果vlan10存在就直接进入vlan10配置视图[Quidway-vlan10] quit //回到配置视图[Quidway] vlan 100 //创建vlan 100,并进入vlan100配置视图,如果vlan10存在就直接进入vlan100配置视图[Quidway-vlan100] quit //回到配置视图2将端口加入到vlan中:[Quidway] interface GigabitEthernet2/0/1 (10G光口)[Quidway- GigabitEthernet2/0/1] port link-type access //定义端口传输模式[Quidway- GigabitEthernet2/0/1] port default vlan 100 //将端口加入vlan100[Quidway- GigabitEthernet2/0/1] quit //回到配置视图[Quidway] interface GigabitEthernet1/0/0 //进入1号插槽上的第一个千兆网口配置视图中。

0代表1号口[Quidway- GigabitEthernet1/0/0] port link-type access //定义端口传输模式[Quidway- GigabitEthernet2/0/1] port default vlan 10 //将这个端口加入到vlan10中[Quidway- GigabitEthernet2/0/1] quit3将多个端口加入到VLAN中<Quidway>system-view[Quidway]vlan 10[Quidway-vlan10]port GigabitEthernet 1/0/0 to 1/0/29 //将0到29号口加入到vlan10中[Quidway-vlan10]quit4交换机配置IP地址[Quidway] interface Vlanif100 // 进入vlan100接口视图与vlan 100命令进入的地方不同[Quidway-Vlanif100] ip address 119.167.200.90 255.255.255.252 // 定义vlan100管理IP三层交换网关路由[Quidway-Vlanif100] quit //返回视图[Quidway] interface Vlanif10 // 进入vlan10接口视图与vlan 10命令进入的地方不同[Quidway-Vlanif10] ip address 119.167.206.129 255.255.255.128 // 定义vlan10管理IP三层交换网关路由[Quidway-Vlanif10] quit5配置默认静态路由:[Quidway]ip route-static 0.0.0.0 0.0.0.0 119.167.200.89 //配置默认静态路由。

华为常用命令

华为常用命令

华为交换机常用命令:1、display current-configuration //显示当前配置2、display interface GigabitEthernet 1/1/4 //显示接口信息3、display packet-filter interface GigabitEthernet 1/1/4 //显示接口acl应用信息4、display acl all //显示所有acl设置3900系列交换机5、display acl config all //显示所有acl设置6500系列交换机6、display arp 10.78.4.1 //显示该ip地址的mac地址,所接交换机的端口位置7、display cpu //显示cpu信息8、system-view //进入系统图(配置交换机),等于config t 命令9、acl number 5000 //在system-view命令后使用,进入acl配置状态10、rule 0 deny 0806 ffff 24 0a4e0401 ffffffff 40 //在上面的命令后使用,,acl 配置例子11、rule 1 permit 0806 ffff 24 000fe218ded7 fffffffff 34 //在上面的命令后使用,acl配置例子12、interface GigabitEthernet 1/0/9 //在system-view命令后使用,进入接口配置状态13、[86ZX-S6503-GigabitEthernet1/0/9]qos //在上面的命令后使用,进入接口qos配置14、[86ZX-S6503-qosb-GigabitEthernet1/0/9]packet-filter inbound user-group 5000 //在上面的命令后使用,在接口上应用进站的acl15、[Build4-2_S3928TP-GigabitEthernet1/1/4]packet-filter outbound user-group 5001 //在接口上应用出站的acl16、undo acl number 5000 //取消acl number 5000 的设置17、ip route-static 0.0.0.0 0.0.0.0 10.78.1.1 preference 60 //设置路由18、reset counters interface Ethernet 1/0/14 //重置接口信息华为路由器常用命令[Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息[Quidway]super password ;修改特权用户密码[Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]rip ;三层交换支持[Quidway]local-user ftp[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway]interface ethernet 0/1 ;进入端口模式[Quidway]int e0/1 ;进入端口模式[Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Quidway-Ethernet0/1]flow-control ;配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN [Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID [Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/1]shutdown ;关闭端口[Quidway-Ethernet0/1]quit ;返回[Quidway]vlan 3 ;创建VLAN [Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both ;端口的聚合[Quidway]undo link-aggregation e0/1|all ; 始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan [SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan [Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid [Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid [Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

华为路由器交换机常用命令

华为路由器交换机常用命令

华为路由器交换机常用命令一、设备管理命令1.登录管理命令- ssh [ip地质] -p [端口号]:通过SSH协议登录设备。

- telnet [ip地质]:通过Telnet协议登录设备。

- logout:退出设备。

2.用户管理命令- display current-configuration:显示当前设备配置信息。

- save:保存当前配置。

- undo save:取消保存的配置。

- super:切换到超级用户模式。

- user-interface console 0:配置控制台终端的参数。

- user-interface vty 0 4:配置远程登录终端的参数。

3.设备操作命令- reboot:重启设备。

- reset saved-configuration:恢复出厂配置。

- display version:显示设备的硬件和软件版本信息。

- display device:显示设备的基本信息。

- display interface[接口名称]:显示指定接口信息。

- display ip routing-table:显示IP路由表信息。

二、网络配置命令1.IP配置命令- interface [接口名称]:进入指定接口。

- ip address [IP地质] [子网掩码]:配置接口IP地质。

- undo ip address:取消接口IP地质配置。

- ip route-static [目标网络] [子网掩码] [下一跳地质]:配置静态路由。

- undo ip route-static [目标网络] [子网掩码] [下一跳地质]:取消静态路由配置。

2.VLAN配置命令- vlan [VLAN ID]:创建指定VLAN。

- quit:退出VLAN配置模式。

- interface vlan [VLAN ID]:进入指定VLAN接口。

- ip address [IP地质] [子网掩码]:为VLAN接口配置IP地质。

(完整版)华为交换机命令大全

(完整版)华为交换机命令大全

华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。

华为交换机日常维护命令收集(全)

华为交换机日常维护命令收集(全)

华为交换机日常维护查看命令
1.dis device 用来查看设备信息
2.dis interface 用来查看接口信息
3.dis version 用来查看版本信息
4.slot-id 用来查看某一单板、电子标签的信息
5.dis env 用来查看设备的温度
6.dis cpu 用来查看cpu的信息
7.dis memory 用来查看内存的信息
8.dis interface 用来查看接口的信息
9.terminal monitor 终端信息显示功能
10.terminal debug 使终端现实调试信息
11.temperature threshold 设置温度的告警值
12. display diagnostic-information 显示诊断信息
13. display ip routing-table 显示路由信息
14.display current-configuration 显示系统当前配置
15. display saved-configuration 显示系统保存配置
16.display vlan 显示VLAN信息
17.display stp 显示生成树信息
18.display arp 显示ARP信息表
19.display mac-address 显示MAC地址表
20.display log 显示系统日志
21.display clock 显示系统时钟
22. display ip int brief 查看三层接口汇总信息。

(完整版)华为交换机命令大全

(完整版)华为交换机命令大全

华为交换机基本配置命令详解1、配置文件相关命令[Quidway]display current-configuration 显示当前生效的配置[Quidway]display saved-configuration显示flash中配置文件,即下次上电启动时所用的配置文件reset saved-configuration 檫除旧的配置文件reboot 交换机重启display version 显示系统版本信息2、基本配置[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 1/0/1 进入接口视图[Quidway]interface vlan 1进入接口视图[Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1静态路由=网关3、telnet配置[Quidway]user-interface vty 0 4 进入虚拟终端[S3026-ui-vty0-4]authentication-mode password 设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令[S3026-ui-vty0-4]user privilege level 3 用户级别4、端口配置[Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态[Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet1/0/1]flow-control 配置端口流控[Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接[Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式[Quidway-Ethernet1/0/1]undo shutdown 激活端口[Quidway-Ethernet1/0/2]quit 退出系统视图5、链路聚合配置[DeviceA] link-aggregation group 1 mode manual 创建手工聚合组1[Qw_A] interface ethernet 1/0/1 将以太网端口Ethernet1/0/1加入聚合组1 [Qw_A-Ethernet1/0/1] port link-aggregation group 1[Qw_A-Ethernet1/0/1] interface ethernet 1/0/2 将以太网端口Ethernet1/0/1加入聚合组1[Qw_A-Ethernet1/0/2] port link-aggregation group 1[Qw_A] link-aggregation group 1 service-type tunnel # 在手工聚合组的基础上创建t unnel业务环回组。

华为交换机常用命令

华为交换机常用命令

1.进入管理界面:system-view2.设置用户登录时需要进行口令验证,且验证口令为huawei。

[Quidway] user-interface 0[Quidway-ui0] authentication-mode password[Quidway-ui0] set authentication password simple huawei3. 设置从用户界面登录后可以访问的命令级别: user privilege level level恢复从用户界面登录后可以访问的命令级别为缺省级别: undo user privilege level4.系统IP配置:a.创建并进入管理VLAN接口视图:interface vlan-interface vlan-id删除管理VLAN :undo interface vlan-interface vlan-idb.配置管理VLAN接口IP地址:ip address ip-address net-mast删除管理VLAN接口IP地址:undo ip address [ip-address net-mast]5. 进入Ethernet0/1以太网端口视图。

[Quidway] interface ethernet0/16. 配置端口Ethernet0/1为Trunk端口,并允许2、6到50、100等VLAN通过。

[Quidway-Ethernet0/1] port link-type trunk[Quidway-Ethernet0/1] port trunk permit vlan 2 6 to 50 100创建VLAN 100。

[Quidway] vlan 100配置端口Ethernet0/1的缺省VLAN ID为100。

[Quidway-Ethernet0/1] port trunk pvid vlan 1007. 创建VLAN并进入VLAN视图: vlan vlan_id删除已创建的VLAN: undo vlan{ vlan_id [ to vlan_id ] | all }8. 为指定的VLAN增加以太网端口: port interface_list删除指定的VLAN的某些以太网端口: undo port interface_list创建VLAN2并进入其视图。

华为交换机维护检查用到哪些命令精选全文

华为交换机维护检查用到哪些命令精选全文

可编辑修改精选全文完整版华为交换机维护检查用到哪些命令【--分析报告】2、查看设备复位情况,可以用命令display reboot-info。

3、查看设备温度,可以用命令display temperature all。

各模块当前的温度应该在上下限之间,即Current的值在Lower和Upper 之间。

4、查看设备的告警信息,可以用命令display alarm urgent。

如果没有告警就会显示无。

5、查看cpu状态,可以用命令display cpu-usage。

各模块的CPU占用率正常。

如果出现CPU占用率长时间超过80%或者频繁出现超过80%的情况,建议重点关注。

6、查看内存占用情况,可以使用display memory-usage。

7、查看日志信息,可以用display logbuffer或者display trapbuffer。

这两个命令为会经常用到。

相关阅读:交换机工作原理过程交换机工作于OSI参考模型的第二层,即数据链路层。

交换机内部的CPU会在每个端口成功连接时,通过将MAC地址和端口对应,形成一张MAC表。

在今后的通讯中,发往该MAC地址的数据包将仅送往其对应的端口,而不是所有的端口。

因此,交换机可用于划分数据链路层广播,即冲突域;但它不能划分层广播,即广播域。

交换机拥有一条很高带宽的背部总线和内部交换矩阵。

交换机的所有的端口都挂接在这条背部总线上,控制电路收到数据包以后,处理端口会查找内存中的地址对照表以确定目的MAC(网卡的硬件地址)的NIC(网卡)挂接在哪个端口上,通过内部交换矩阵迅速将数据包传送到目的端口,目的MAC若不存在,广播到所有的端口,接收端口回应后交换机会学习新的MAC地址,并把它添加入内部MAC地址表中。

使用交换机也可以把分段,通过对照IP地址表,交换机只允许必要的流量通过交换机。

通过交换机的过滤和转发,可以有效的减少冲突域,但它不能划分层广播,即广播域。

华为交换机命令规则

华为交换机命令规则

华为交换机命令规则一、概述华为交换机是目前市场上应用最广泛的交换机之一,其性能强大且具有高度可靠性。

在使用华为交换机进行网络管理和配置时,熟悉交换机的命令规则是非常重要的。

二、华为交换机命令格式华为交换机的命令格式一般为以下几个部分:其中,命令类别可以是系统管理命令、配置命令、显示命令等。

命令是执行特定操作的关键字,参数则是用于进一步指定操作的信息。

下面是一些常用命令类别的说明:•系统管理命令:用于管理和维护交换机,例如重启交换机、备份和恢复配置等。

•配置命令:用于配置交换机的各个参数,例如设置VLAN、端口镜像等。

•显示命令:用于查看交换机的状态和已配置信息,例如查看端口状态、查看MAC地址表等。

三、华为交换机命令规则在使用华为交换机的命令时,有一些规则需要遵守,以下是一些常见的华为交换机命令规则:1.命令不区分大小写:华为交换机的命令不区分大小写,例如”displaYversion”与”DISPLAY VERSION”是等价的。

2.命令的缩写:华为交换机支持命令的缩写,只需输入命令的前几个字母即可,但是命令缩写不能引起歧义。

3.命令的完整输入:当多个命令具有相同的前缀时,为了确保输入的是正确的命令,需要输入命令的完整名字,并用空格隔开。

4.命令建议功能:华为交换机提供了命令建议功能,可以通过按下”Tab”键自动补全命令,提高配置的效率。

5.命令历史记录:华为交换机支持命令历史记录功能,可以通过按下”Ctrl+R”键来搜索和执行之前执行过的命令。

四、华为交换机命令示例下面是一些常见的华为交换机命令示例:1.显示交换机版本信息:display version2.配置交换机主机名:system-viewsysname Switch13.配置交换机端口VLAN:interface GigabitEthernet 1/0/1port link-type accessport default vlan 104.显示端口状态信息:display interface GigabitEthernet 1/0/15.查看交换机MAC地址表:display mac-address五、总结本文简要介绍了华为交换机命令规则,并给出了一些常见的华为交换机命令示例。

华为路由交换设备常用命令

华为路由交换设备常用命令

华为路由交换机设备常用命令一.系统基本配置命令display clock命令用来查看系统当前日期和时钟。

display diagnostic-information命令用来查看系统当前诊断信息。

display history-command命令用来查看当前终端上保存的历史命令。

缺省情况下,显示最近10条历史命令。

display this命令用来查看系统当前视图的运行配置。

display version命令用来查看系统版本信息。

header命令用来设置用户登录设备时终端上显示的标题信息。

language-mode命令用来切换命令行接口的语言模式。

缺省情况下,命令行接口的语言模式为英文模式。

quit命令用来从当前视图退回到较低级别视图,如果是用户视图,则退出系统。

return命令用来从除用户视图外的其它视图退回到用户视图。

sysname命令用来设置路由器的主机名。

使用实例# 设置路由器的主机名为HUAWEIA。

<HUAWEI> system-view[HUAWEI] sysname HUAWEIAsystem-view命令用来使用户从用户视图进入系统视图。

user-interface命令用来进入一个用户界面视图或多个用户界面视图。

user-interface maximum-vty命令用来设置登录用户的最大数目。

使用实例# 配置VTY用户界面最大数目为7个。

<HUAWEI> system-view[HUAWEI] user-interface maximum-vty 7authentication-mode命令用来设置登录用户界面的验证方式。

# 使能本地密码验证。

<HUAWEI> system-view[HUAWEI] user-interface vty 0[HUAWEI-ui-vty0] authentication-mode passworddisplay user-interface命令用来查看用户界面信息。

华为交换机常用命令

华为交换机常用命令

交换机的24号端口为数据进口,禁忌作关闭操作1.进入交换机系模式:sys关闭端口:inter e 0/端口号shutdown开是undo shutdown2.查看单独的端口dis inter e 0/端口号dis mac 看MAC3.进入要改变带宽的端口inter e0/端口号line-rate in 37 (进)line-rate out 37 (出)下载和上传都是10M带宽的换算方式是N-2737-27=1010M=2720M=4730M=57以此类推4.通过IP查找端口ping 所查IPdis arpdis mac 该IP把对应的mac交换机命令~~~~~~~~~~[Quidway]dis cur ;显示当前配置[Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息[Quidway]display version ;显示版本信息[Quidway]super password ;修改特权用户密码[Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]rip ;三层交换支持[Quidway]local-user ftp[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway]interface ethernet 0/1 ;进入端口模式[Quidway]int e0/1 ;进入端口模式[Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Quidway-Ethernet0/1]flow-control ;配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk 允许的VLAN[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID[Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/1]shutdown ;关闭端口[Quidway-Ethernet0/1]quit ;返回[Quidway]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 ;在VLAN 中增加端口[Quidway-vlan3]port e0/1 ;简写方式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN 中增加端口[Quidway-vlan3]port e0/1 to e0/4 ;简写方式[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[Quidway]link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合[Quidway]undo link-aggregation e0/1|all ; 始端口为通道号[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan[SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

华为常用命令参考

华为常用命令参考

解释 明文 密文 host名字和ip地址对应 日志信息 封装链路层协议 显示版本 显示当前配置 显示全面的信息 显示已保存的配置 退回到系统视图 上一条命令 下一条命令 display cur display ip routing-table 取消所有debug命令
2.如何打开debug开关 debug是设备调试,排错中非常重要也非常有效的手段。需要对网络协议和Quidway 产品相对熟悉的情况下使用。 过程:首先输入 [Router]info-center enable 使用console配置口时,输入: [Router]info-center console [Router]info-center console debug 使用远程telnet时,输入: [Router]info-center monitor [Router]info-center monitor debug 此处以调试链路层协议ppp数据包为例 [Router]debugging ppp packet 『注意』 特权模式下debug;可以从display debug看出现在有哪些调试开关是打开的 调试开关打开,对路由器性能会有相应程度的影响,所以用后请及时关闭调试信息: [Router]undo debug all,或者ctrl+d亦可
擦除Flash Memoห้องสมุดไป่ตู้y中以太网交换机配置文件。 <Quidway> reset saved-configuration The saved configuration will be erased. Are you sure?[Y/N]
5.文件系统命令 5.1改变当前目录 【命令】 cd directory 【参数】 directory:目标目录名。 【描述】 cd命令用来修改以太网交换机的当前工作路径。 缺省目录为在配置用户启动时设置的工作路径。 【举例】 修改以太网交换机当前工作路径为flash。 <Quidway>cd flash: <Quidway>pwd flash:

华为交换机常用命令

华为交换机常用命令
[R1]ip route-static 2.2.2.0 24 21.1.1.2 “华为静态路由默认preference 60”
[R1]dis ip routing-table protocol static “查看所有preference路由”
Route Flags: R - relay, D - download to fib
rsa local-key-pair create “生成密钥对”
客户端:
ssh client first-time enable “第一次连接服务端下载秘钥”
stelnet xx.xx.xx “直接给服务端ip”
静态路由:
[AR1]display ip routing-table “查看路由表”
[Ftp server-aaa]local-user huawei privilege level 3 “设置用户权限”
<Ftp server>dir “进入flash目录”
<Ftp server>mkdir ftp “创建共享目录”
[Ftp server]aaa
[Ftp server-aaa]local-user huawei ftp-directory flash:/ftp “指定huawei用户访问的目录”
[Huawei]display history-command “显示最近使用过的命令”
[Huawei]display user “显示正在连接的终端用户”
[Huawei]display this “查看当前接口、模式下的配置”
[Huawei]display save-configuration “查看已保存的配置”
RIP v1:

华为交换机常用命令行操作总结

华为交换机常用命令行操作总结

华为交换机常用命令行操作总结华为交换机命令行操作小结一、基础1、进入 system-view 模式<Huawei>system-viewEnter system view, return user view with Ctrl+Z.[Huawei]2、更改交换机名称[Huawei]sysname SW-ACC-CORE-1[SW-ACC-CORE-1]3、返回 user-view 模式[SW-ACC-CORE-1]return<SW-ACC-CORE-1>4、查看配置启动配置<SW-ACC-CORE-1>display saved-configuration当前配置<SW-ACC-CORE-1>display current-configuration5、保存配置<SW-ACC-CORE-1>saveThe current configuration will be written to the device.Are you sure to continue?[Y/N]yInfo: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Aug 31 2016 09:50:33-08:00 SW-ACC-CORE-1 %%01CFM/4/SAVE(l)[0]:The user chose Y whendeciding whether to save the configuration to the device.Now saving the current configuration to the slot 0.Save the configuration successfully.<SW-ACC-CORE-1>6、用户和管理1)配置密码采用password的方式来验证:authentication-mode password(简单,略过不提,看命令行的帮助即可)采用aaa的方式来验证:<SW-ACC-CORE-1>sys[SW-ACC-CORE-1]aaa[SW-ACC-CORE-1-aaa]local-user admin password cipher mypass[SW-ACC-CORE-1-aaa]local-user admin privilege level 3 [SW-ACC-CORE-1-aaa]local-user admin service-type telnet terminal http ssh[SW-ACC-CORE-1-aaa]quit2)配置 console 的密码[SW-ACC-CORE-1]user-interface console 0[SW-ACC-CORE-1-ui-con0]authentication-mode aaa[SW-ACC-CORE-1-ui-con0]quit3)配置 vty 的密码来允许telnet服务[SW-ACC-CORE-1]user-interface vty 0 4[SW-ACC-CORE-1-ui-vty0-4]authentication-mode aaa[SW-ACC-CORE-1-ui-vty0-4]quit测试:<SW-ACC-BIZ-1>telnet 192.168.200.254Trying 192.168.200.254 ...Press CTRL+K to abortConnected to 192.168.200.254 ...Login authenticationUsername:adminPassword:(输入:mypass)Info: The max number of VTY users is 5, and the numberof current VTY users on line is 1.The current login time is 2016-08-31 16:49:07.<SW-ACC-CORE-1>参考:/enterprise/KnowledgebaseReadActi on.action?contentId=KB1000125747&idAbsPath=7919710|2178 2164|21782167|6691579【特别注意】盒式(S2700&S3700&S5700&S6700)(一)、V200R003及之前的版本缺省情况下1.telnet server已启用er-interface vty下协议默认支持telnet所以该版本仅需配置上面的通用配置(二)、V200R005及之后的版本缺省情况下1.telnet server未启用er-interface vty下协议默认支持ssh所以该版本需按以下方法配置1.打开telnet服务telnet server enable2.用户接口下启用telnet协议user-interface vty 0 4protocol inbound telnet3.添加通用配置4)启用ssh参考:/enterprise/KnowledgebaseReadAction.action?contentId=KB1000067691&idAbsPath=7919710%7C9 856733%7C7923144%7C66915795)启用交换机的web服务<SW-ACC-CORE-1>dir找到web文件(以这个为例:s5700si-v200r003c00.001.web.7z),加载:<SW-ACC-CORE-1>system-view<SW-ACC-CORE-1>http server load s5700si-v200r003c00.001.web.7z<SW-ACC-CORE-1>http secure-server enablehttps://ip/注:更改配置后,记得保存。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华为交换机状态查看常用命令当华为交换机设备发生异常时,可以通过查看设备信息检查状态是否正常1、查看设备的部件信息和状态信息[023wg.]displaydevice ?slot Slot| Matchingoutput<cr>[023wg.]display devices[023wg.]display deviceslot ?<0> The presentslot[023wg.]display device slotS3700-52P-SI-AC's Devicestatus:Slot SubType Online Power RegisterStatus Role- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - 3752F Present PowerOn Registe red Normal Master[023wg.]2、查看设备的制造信息[023wg.]display devicemanufacture-info [ slot slot-id| backplane ]3、查看设备序列号每台设备的序列号ESN(Equipment Serial Number)是唯一的。

[023wg.] display esn4、查看版本信息通过查看设备当前的版本信息,可以判断设备是否需要升级或者升级是否成功。

[023wg.]displayversion ?slot Slot| Matchingoutput<cr>[023wg.]display versionsl[023wg.]display versionslot ?<0> The registeredslot[023wg.]display version slotEMFEA 0(Master) : uptime is 0 week, 0 day, 0 hour, 18minutes128M bytes DDRMemory16M bytesFLASHPcb Version : VERBBasic BOOTROM Version : 248 Compiled at Jun 26 2012,18:54:52Software Version : VRP (R) Software, Version 5.70 (V100R006C03)5、查看电源信息当设备的供电出现异常时,用户可以执行以下命令查看设备的电源状态信息。

[023wg.]displaypower--------------------------------------------------------------------------SlotID PowerNo Present Mode State Power(W) Voltage(V)--------------------------------------------------------------------------0 PWRI NO N/A N/AN/A N/A0 PWRII NO N/A N/AN/A N/A[023wg.]6、查看功率信息如果想了解设备的使用功率的详细情况,可以查看功率信息。

当系统扩容时,可以先确认电源功率是否足够。

<Huawei>display power system7、查看单板电压当设备单板的电压异常时,用户可以执行以下命令查看单板电压的状态信息。

<Huawei>display voltage { all | slot slot-id}8、查看温度信息设备温度过高或过低可能会导致硬件的损坏。

如果想了解设备的当前温度值,可以执行以下命令查看温度信息。

<Huawei>display temperature { all | slot slot-id }9、查看风扇状态风扇的正常运转是保证设备正常工作的前提。

设备散热不正常会引起设备温度升高,并可能损坏硬件。

<Huawei>displayfan ?slot Slotverbose Fan verboseinformation<cr><Huawei>display fan-para { all | slot slot-id } # 查看风扇额定功率和调速策略10、查看CPU占用率CPU占用率是衡量设备性能的重要指标之一。

在网络运行中,CPU占用率过高常常会导致业务异常,例如BGP震荡、VRRP频繁切换甚至设备无法登录。

执行以下命令,可以实时查看CPU占用率的统计信息和配置信息,以保证设备能够运行在稳定状态。

通过查看CPU占用率的配置信息,可以查看当前CPU占用率的监控告警过载阈值和监控告警恢复阈值。

当CPU占用率上升到监控告警过载阈值时,系统触发监控过载告警。

当CPU占用率下降到监控告警恢复阈值时,系统触发监控恢复告警。

<Huawei>display cpu-usage # 查看CPU占用率的统计信息CPU Usage Stat. Cycle: 60 (Second)CPU Usage : 15% Max: 93%CPU Usage Stat. Time : 2008-01-01 00:11:50CPU utilization for five seconds: 15%: one minute: 15%: five minutes: 15%.TaskName CPU Runtime(CPU Tick High/Tick Low) Task ExplanationBOX 0% 0/1d42314 BOX Output_TIL 0% 0/0 Infinite loop event task_EXC 0% 0/0 Exception Agent TaskVIDL 85% 1/2ffbd2fe DOPRA IDLETICK 0% 0/283c3ce..................................................................... ....................PPI 0% 0/ 1bf74 e PPI Product Process InterfaceIFPD 2% 0/a53ca60 IFPD Ifnet Product Adapt ..................................................................... .......................................VT 0% 0/0 VT Virtual TransferOS 11% 0/2756ccff Operation System<Huawei>display cpu-usage configuration ? # 查看CPU占用率的配置信息slave SlaveMPUslot Specify theslot<cr><Huawei>display cpu-usageconfigurationThe CPU usage monitor is turnedon.The current monitor cycle is 60seconds.The current monitor warning threshold is95%.The current monitor restore threshold is80%.<Huawei>11、查看存占用率存占用率是衡量设备性能的重要指标之一。

在网络运行中,存占用率过高常常会导致业务异常。

实时查看存占用率信息,以确认设备是否运行稳定。

通过查看存占用率门限值,可以查看监控告警触发条件。

当存占用率上升到门限值时,系统触发告警。

当存占用率低于门限值时,系统告警消除。

<Huawei>display memory-usage ? # 查看存占用率的统计信息。

slave SlaveMPUslot Slotnumber<cr><Huawei>displaymemory-usageMemory utilization statistics at 2008-01-01 00:41:34 800msSystem Total Memory Is: 75312648bytesTotal Memory Used Is: 45037704bytesMemory Using Percentage Is: 59%<Huawei>display memory-usage threshold [ slot slot-id ] # 查看存占用率的门限值12、查看环境监控软件版本信息<Huawei>display environment version13、查看接口信息当用户在某一接口下完成一组配置之后,需要验证是否配置正确,可以查看当前接口下的配置信息。

当用户在监控接口的状态或检查接口的故障原因时,可以查看接口的状态信息。

13.1、查看接口的配置信息[Huawei-Ethernet0/0/2]displaythis#interfaceEthernet0/0/2port link-typeaccessport default vlan12#return[Huawei-Ethernet0/0/2]13.2、查看接口的状态信息<Huawei>display interface Ethernet0/0/2Ethernet0/0/2 current state :DOWNLine protocol current state :DOWNDescription:HUAWEI, Quidway Series, Ethernet0/0/2InterfaceSwitch Port, PVID : 12, TPID : 8100(Hex), The Maximum Frame Length is 1600IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address isd4b1-10cf-057dPort Mode: COMMONCOPPERSpeed : 10, Loopback:NONEDuplex: HALF, Negotiation:ENABLEMdi :AUTOLast 300 seconds input rate 0 bits/sec, 0packets/secLast 300 seconds output rate 0 bits/sec, 0packets/secInput peak rate 0 bits/sec, Record time:-Output peak rate 0 bits/sec, Record time:-Input: 0 packets, 0bytesUnicast : 0, Multicast : 0Broadcast : 0,Jumbo :CRC : 0, Giants :Jabbers : 0, Fragments : 0 Runts : 0, DropEvents : 0 Alignments : 0,Symbols : 0Ignoreds : 0, Frames :Discard : 0, Total Error : 0Output: 0 packets, 0bytesUnicast : 0, Multicast : 0 Broadcast : 0,Jumbo :Collisions : 0, Deferreds : 0 Late Collisions: 0, ExcessiveCollisions: 0BuffersPurged : 0Discard : 0, Total Error : 0 Input bandwidth utilization threshold :100.00%Output bandwidth utilization threshold:100.00%Input bandwidth utilization :0.00%Output bandwidth utilization :0.00%<Huawei>或[Huawei-Ethernet0/0/2]display thisinterfaceEthernet0/0/2 current state :DOWNLine protocol current state :DOWNDescription:HUAWEI, Quidway Series, Ethernet0/0/2InterfaceSwitch Port, PVID : 12, TPID : 8100(Hex), The Maximum Frame Length is 1600IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address isd4b1-10cf-057dPort Mode: COMMONCOPPERSpeed : 10, Loopback:NONEDuplex: HALF, Negotiation:ENABLEMdi :AUTOLast 300 seconds input rate 0 bits/sec, 0packets/secLast 300 seconds output rate 0 bits/sec, 0packets/secInput peak rate 0 bits/sec, Record time:-Output peak rate 0 bits/sec, Record time:-Input: 0 packets, 0bytesUnicast : 0, Multicast : 0Broadcast : 0,Jumbo :CRC : 0, Giants :Jabbers : 0, Fragments : 0 Runts : 0, DropEvents : 0 Alignments : 0,Symbols : 0Ignoreds : 0, Frames :Discard : 0, Total Error : 0Output: 0 packets, 0bytesUnicast : 0, Multicast : 0 Broadcast : 0,Jumbo :Collisions : 0, Deferreds : 0 Late Collisions: 0, ExcessiveCollisions: 0BuffersPurged : 0Discard : 0, Total Error : 0 Input bandwidth utilization threshold :100.00%Output bandwidth utilization threshold:100.00%Input bandwidth utilization :0.00%Output bandwidth utilization : 0.00%[Huawei-Ethernet0/0/2]。

相关文档
最新文档