↑↓ 选择 · Enter 打开 · Esc 关闭

华为 命令速查

80 条命令 · 点击右侧按钮复制命令

查看状态 2

display current-configuration 查看完整当前配置 ⭐⭐ 常用
1
display device 查看设备硬件信息 ⭐⭐ 常用
1

接口配置 4

interface GigabitEthernet 0/0/1 进入接口视图 ⭐⭐ 常用
1
ip address 192.168.1.1 24 配置接口 IP 地址 ⭐ 基础
1
port link-type access 配置端口为 Access 模式 ⭐⭐ 常用
1
port link-type trunk 配置端口为 Trunk 模式 ⭐⭐ 常用
1

路由协议 3

ospf 1 启用 OSPF 进程 ⭐⭐⭐ 高级
1
display ospf peer 查看 OSPF 邻居 ⭐⭐⭐ 高级
1
display ip routing-table 查看路由表 ⭐⭐ 常用
1

安全 / ACL 1

acl 3000 创建高级 ACL ⭐⭐⭐ 高级
1

故障排查 68

display version 查看设备版本信息 ⭐ 基础
1
display saved-configuration 查看已保存配置 ⭐ 基础
1
display clock 查看系统时钟 ⭐ 基础
1
display cpu-usage 查看 CPU 使用率 ⭐⭐ 常用
1
display memory-usage 查看内存使用 ⭐⭐ 常用
1
display environment 查看设备环境信息 ⭐⭐ 常用
1
system-view 进入系统视图 ⭐ 基础
1
sysname HUAWEI 设置主机名 ⭐ 基础
1
undo shutdown 启用接口 ⭐ 基础
1
shutdown 关闭接口 ⭐ 基础
1
description "To-Server" 接口描述 ⭐⭐ 常用
1
display interface brief 查看接口简表 ⭐ 基础
1
display interface GigabitEthernet 0/0/1 查看接口详情 ⭐ 基础
1
display ip interface brief 查看 IP 接口简表 ⭐ 基础
1
ip route-static 0.0.0.0 0 192.168.1.254 配置默认静态路由 ⭐⭐ 常用
1
ospf 1 router-id 1.1.1.1 启用 OSPF ⭐⭐⭐ 高级
1
area 0 OSPF area 配置 ⭐⭐⭐ 高级
1
network 192.168.1.0 0.0.0.255 OSPF 网络宣告 ⭐⭐⭐ 高级
1
display ospf interface 查看 OSPF 接口 ⭐⭐⭐ 高级
1
bgp 65001 启用 BGP ⭐⭐⭐ 高级
1
peer 10.0.0.2 as-number 65002 BGP 邻居配置 ⭐⭐⭐ 高级
1
display bgp peer 查看 BGP 邻居 ⭐⭐⭐ 高级
1
vlan batch 10 20 30 批量创建 VLAN ⭐⭐ 常用
1
vlan 10 创建单个 VLAN ⭐⭐ 常用
1
name Sales VLAN 命名 ⭐⭐ 常用
1
port default vlan 10 Access 端口分配 VLAN ⭐⭐ 常用
1
port trunk allow-pass vlan 10 20 30 Trunk 端口允许 VLAN ⭐⭐ 常用
1
display vlan 查看 VLAN ⭐⭐ 常用
1
undo port default vlan 恢复端口为默认 VLAN ⭐⭐ 常用
1
undo vlan 10 删除 VLAN ⭐⭐ 常用
1
stp enable 全局启用 STP ⭐ 基础
1
stp mode rstp 配置 STP 模式为 RSTP ⭐⭐ 常用
1
stp priority 4096 配置 STP 优先级 ⭐⭐ 常用
1
stp edged-port enable 配置边缘端口 ⭐ 基础
1
display stp brief 查看 STP 状态 ⭐⭐ 常用
1
acl number 2000 创建基本 ACL ⭐⭐⭐ 高级
1
acl number 3000 创建高级 ACL ⭐⭐⭐ 高级
1
rule permit source 192.168.1.0 0.0.0.255 ACL 规则配置 ⭐⭐⭐ 高级
1
traffic-filter inbound acl 2000 应用 ACL 到接口 ⭐⭐⭐ 高级
1
display acl 2000 查看 ACL 配置 ⭐⭐⭐ 高级
1
undo acl 2000 删除 ACL ⭐⭐⭐ 高级
1
user-interface vty 0 4 进入 VTY 视图 ⭐⭐ 常用
1
authentication-mode aaa 配置 AAA 认证 ⭐ 基础
1
protocol inbound ssh 只允许 SSH 登录 ⭐⭐ 常用
1
rsa local-key-pair create 生成 RSA 密钥 ⭐⭐ 常用
1
stelnet server enable 启用 SSH 服务(VRP) ⭐ 基础
1
dhcp enable 全局启用 DHCP ⭐ 基础
1
ip pool LAN 创建全局地址池 ⭐⭐ 常用
1
display ip pool 查看 DHCP 地址池 ⭐⭐ 常用
1
nat address-group 1 203.0.113.1 203.0.113.10 配置 NAT 地址池 ⭐⭐ 常用
1
nat outbound 2000 address-group 1 应用 NAT 出接口 ⭐⭐ 常用
1
display nat session 查看 NAT 会话 ⭐⭐ 常用
1
interface Eth-Trunk 1 创建聚合口 ⭐⭐ 常用
1
trunkport GigabitEthernet 0/0/1 to 0/0/4 聚合成员口 ⭐⭐ 常用
1
display eth-trunk 1 查看聚合口 ⭐⭐ 常用
1
stack slot 0 priority 100 配置堆叠优先级 ⭐⭐ 常用
1
display stack 查看堆叠信息 ⭐⭐ 常用
1
quit 退出当前视图 ⭐ 基础
1
return 返回用户视图 ⭐⭐ 常用
1
compare configuration 对比配置差异 ⭐⭐ 常用
1
aaa 进入 AAA 视图 ⭐⭐ 常用
1
local-user admin password cipher admin123 创建本地用户 ⭐⭐ 常用
1
ping 8.8.8.8 ping 测试 ⭐ 基础
1
tracert 8.8.8.8 路由追踪 ⭐ 基础
1
display arp 查看 ARP 表 ⭐⭐ 常用
1
display mac-address 查看 MAC 表 ⭐⭐ 常用
1
display logbuffer 查看日志 ⭐⭐ 常用
1
terminal debugging 开启终端调试 ⭐⭐ 常用
1

系统管理 2

save 保存配置 ⭐ 基础
1
reboot 重启设备 ⭐⭐ 常用
1