华三网络安全常用命令

查看设备资源状态

dis device manuinfo       查看序列号
display clock             查看时间
display cpu               查看CPU使用率
display memory            查看内存使用情况
display fan               查看风扇
display power             查看电源
dis device                查看板卡状态
display cpu his           查看CPU历史最高使用率
display log               查看日志,收集最近几天的就行
display environment       查看温度
display logbuffer         查看设备日志

dis process cpu           查看进程对于CPU的使用率。
dis process memory        查看进程对于内存使用率
dis cpu-usage             查看CPU使用率。
dis memory                查询内存使用率。

查看接口信息

dis counter rate inbound interface         查看接口进方向的使用率
dis counter rate outbound interface        查看接口出方向的使用率
dis int | inc rate                         查看接口历史使用率
dis int | inc sec                          查看接口历史使用率及出入方向的字节
dis int gi 1/0/1                           查看接口最近300秒使用率
dis reth interface Reth 2                  查看冗余组

查看路由配置

dis current-configuration configuration ospf    查看ospf配置
dis ip policy-based-route                       查看策略路由
display ip routing-table                        查看静态路由
dis ip routing-table protocol ospf              查看指定协议的路由
dis ip routing-table vpn-instance VPN名称       查看VPN路由

防火墙命令

display context                                                                                                     列出VFW(虚拟防火墙)
switchto context     VFWname                                                                                        进入虚墙
display session table ipv4 destination-ip 192.66.32.65 verbose                                                      查看会话
dis security-zone                                                                                                   查看安全域
import interface Route-Aggregation 64.204                                                                           端口加入安全域


move chassis1#slot4#flash:/diag_B201_N4N5_WLAQ_ZHFW_M9010_20240614-161616.tar.gz chassis1#slot3.1#sda0:/            移动文件到其他槽位,适用于多槽位的防火墙

chassis代表机框,slot代表槽位。
举个例子:两台交换机堆叠,分别为1和2,chassis1#slot1代表1号机的1槽位。

信息收集
1、诊断收集

display diagnostic-information

Save or display diagnostic information (Y=save, N=display)? [Y/N]:

输入N,则会将诊断信息以回显方式在屏幕进行打印,需要开启终端登录工具的会话日志记录功能,将打印的回显进行记录。

输入Y,则生成一个诊断压缩文件在的flash中,生成的文件目录在回显中可查看,通过ftp拷出对应的日志文件。

示例如下:

Save or display diagnostic information (Y=save, N=display)? [Y/N]:y

Please input the file name(*.tar.gz)[cfa0:/diag_MSR-2.5_20240320-143522.tar.gz]:

Diagnostic information is outputting to cfa0:/diag_MSR-2.5_20240320-143522.tar.gz.

Please wait...

Save successfully.

2、diagfile收集

系统视图执行diagnostic-logfile save 

The contents in the diagnostic log file buffer have been saved to the file cfa0:/diagfile/diagfile1.log.

将生成的文件通过more的形式打印在终端上,记录会话,或通过ftp将对应的日志文件拷出。

3、logfile收集


系统视图执行logfile save 

The contents in the log file buffer have been saved to the file cfa0:/logfile/logfile1.log.

将生成的logfile路径下的所有logfile文件通过ftp方式全部拷出。
posted @ 2024-06-12 21:44  *一炁化三清*  阅读(173)  评论(0编辑  收藏  举报