本文最后更新于39 天前,其中的信息可能已经过时,如有错误请发送邮件到1979007616@qq.com
华为
# 设备邻居信息
dis lldp neighbor brief
# mac地址对应的端口
dis mac-address 001b-82e4-31f8
# IP对应信息,包含mac
dis arp | include 192.168.1.11
# 端口下的mac
dis mac-address g0/0/23
# 检测IP冲突
dis arp ip-conflict track
# 查看日志
dis logbuffer
# 查看集群配置是否正确
display css status saved
# 查看多主检测配置
display mad verbose
# 查看集群链路拓扑是否与硬件连接一致
display css channel all
display css status
# 查看堆叠主备信息 Standby备用 Master主
display device
# 光模块收发光、温度
display transceiver interface GigabitEthernet 1/1/1/3 verbose
# 风扇状态
dis fan
设置telnet登录
设置SSH协议
aaa
local-user admin service-type telnet ssh
stelnet server enable
undo telnet ipv6 server enable
ssh user admin
ssh user admin service-type all
ssh client first-time enable
ssh user admin authentication-type all
ssh server-source -i all
限制IP使用SSH登录
acl number 2100
rule 10 permit source 10.10.163.150 0
rule 5 permit source 10.10.166.215 0
user-interface vty 0 4
acl 2100 inbound
authentication-mode aaa
protocol inbound all
设置交换机时间
clock datetime 15:34:00 2025/04/08
ntp-service enable # 启用NTP服务 或者 undo ntp-service disable
ntp-service unicast-server <NTP服务器IP> # 指定NTP服务器(如阿里云NTP:223.5.5.5)
ntp-service unicast-server 203.107.6.88 通过nslookup查ntp.aliyun.com的IP
display ntp-service status
clock timezone Beijing add 08:00:00
华三
思科
# 查看思科设备型号、序列号
display device manuinfo
防火墙
# 查看飞塔防火墙设备型号、序列号
get system status
# 查看隧道配置
diagnose vpn tunnel list name To-AWS-01
# 查询隧道状态
get vpn ipsec tunnel summary
# 查看路由表
get router info routing-table all
get router info routing-table details 10.220.0.1
# 抓包,按端口和目的IP地址,也可以单独抓
diagnose sniffer packet any 'host 10.10.181.230 and port 53' 4
diagnose sniffer packet any 'host 75.2.125.41 and (udp port 500 or 4500)' 4
# 指定源地址再ping:
execute ping-options source 172.16.73.1
execute ping 192.168.1.1
# 测试完毕后重置ping-options(否则后续 ping 会一直带指定源)
execute ping-options reset
# SSL-VPN日志抓取
diagnose debug reset
diagnose debug application fnbamd -1
diagnose debug application sslvpn -1
diagnose debug application samld -1
diagnose debug enable
# 查看VPN在线用户信息
execute vpn sslvpn list

