思科华为基础命令对比

一、基础命令对照表

功能描述 思科命令 华为命令
显示当前配置 show running-config display current-configuration
显示已保存配置 show startup-config display saved-configuration
保存配置 write / copy run start save
删除配置 erase startup-config reset saved-configuration
进入系统视图 configure terminal system-view
退出当前视图 exit quit / return (返回用户视图)
返回特权模式 end return
设置主机名 hostname R1 sysname R1
接口IP配置 ip address 192.168.1.1 255.255.255.0 ip address 192.168.1.1 24
启用接口 no shutdown undo shutdown
创建用户 username admin secret pass local-user admin password simple pass
Telnet认证模式 line vty 0 4 + login local user-interface vty 0 4 + authentication-mode aaa
查看接口状态 show interfaces display interface brief
查看路由表 show ip route display ip routing-table
查看设备版本 show version display version
退出Telnet exit / quit quit

二、典型配置场景对比

1. VLAN间路由(单臂路由)

思科:

复制代码
interface GigabitEthernet0/0.10 encapsulation dot1Q 10 ip address 10.0.0.1 255.255.255.0

华为:

复制代码
interface GigabitEthernet0/0.10 vlan-type dot1q 10 ip address 10.0.0.1 24
2. OSPF基础配置

思科:

复制代码
router ospf 1 network 10.1.1.0 0.0.0.255 area 0

华为:

复制代码
ospf 1 router-id 1.1.1.1 area 0.0.0.0  network 10.1.1.0 0.0.0.255

三、关键差异

  1. 视图切换:

    • 思科:全局配置模式 → 接口视图:interface g0/0

    • 华为:系统视图 → 接口视图:直接输入interface g0/0/0

  2. 密码加密方式:

    • 华为:simple(明文)或 cipher(密文)

    • 思科:默认自动加密(service password-encryption

  3. 调试命令:

    • 思科:debug → 关闭用 no debug allundebug all

    • 华为:debugging → 关闭用 undo debugging all

  4. 快捷键:

    功能 思科 华为
    退到系统视图 Ctrl+Z Ctrl+Z
    上一条命令 Ctrl+P Ctrl+P
    补全命令 Tab Tab

四、常用维护命令

操作 思科 华为
查看端口状态 show interfaces status display interface brief
查看OSPF邻居 show ip ospf neighbor display ospf peer
清除配置 erase nvram: reset saved-configuration + reboot
测试连通性 ping (特权模式需加do) ping (任意视图)
查看日志 show logging display logbuffer

注意: 思科在非特权模式下执行show/ping需加do前缀(如 do show run),华为无此限制。


更多相关学习推荐:

相关推荐
王码码20355 天前
Flutter for OpenHarmony:socket_io_client 实时通信的事实标准(Node.js 后端的最佳拍档) 深度解析与鸿蒙适配指南
android·flutter·ui·华为·node.js·harmonyos
Swift社区5 天前
如何利用 ArkUI 框架优化鸿蒙应用的渲染性能
华为·harmonyos
特立独行的猫a5 天前
uni-app x跨平台开发实战:开发鸿蒙HarmonyOS影视票房榜组件完整实现过程
华为·uni-app·harmonyos·轮播图·uniapp-x
特立独行的猫a5 天前
uni-app x跨平台开发实战:开发鸿蒙HarmonyOS滚动卡片组件,scroll-view无法滚动踩坑全记录
华为·uni-app·harmonyos·uniapp-x
不爱吃糖的程序媛5 天前
Flutter Orientation 插件在鸿蒙平台的使用指南
flutter·华为·harmonyos
不爱吃糖的程序媛5 天前
鸿蒙Flutter实战:Windows环境搭建踩坑指南
flutter·华为·harmonyos
不爱吃糖的程序媛5 天前
Flutter 插件适配 HarmonyOS 实战:以屏幕方向控制为例
flutter·华为·harmonyos
星空22235 天前
鸿蒙跨平台实战:React Native 在 OpenHarmony 上的 PixelFormat 图片格式处理
react native·华为·harmonyos
加农炮手Jinx6 天前
Flutter for OpenHarmony: Flutter 三方库 icon_font_generator 自动化将 SVG 图标集转化为字体文件(鸿蒙矢量资源全自动管理)
运维·flutter·华为·自动化·harmonyos·devops
以太浮标6 天前
华为eNSP综合实验之- 3a认证配置案例及解析(AAA认证)
运维·tcp/ip·网络安全·华为·信息与通信