中午好,我的网工朋友。

前段时间,给你们做了初阶命令行的汇总,你们又有新需求了。

说想看思科、华为、华三命令差异,连夜安排上了哈。

公众号之前曾整理过的思科、华为、华三命令行合集,给你先放这里了:

《华为设备命令最全大合集》

《思科设备命令最全大合集》

《华三H3C设备命令最全大合集》

如果觉得有用的话,可以多多转发到你的网工群,分享给更多的网工同行们,一起用用

这一期,就一起看看思科、华为、华三命令对照起来,差异有多大!


今日文章阅读福利:《华为设备命令最全大合集》

今天给你整理了一份华为设备命令合集,系列设备的配置命令、巡检命令、命名规则、排错命令等等,全都有哈。

私信我,发送暗号“华为命令”,即可领取该文档资源。


01 基础设置


01 取消/关闭 当前设置

思科:no

华为:undo

h3c:undo


02 查看、显示

思科:show华为:displayh3c:display


03 退回上级

思科:exit华为:quith3c:quit


04 设置主机名

思科:hostname华为:sysnameh3c:sysname


05 进入全局模式

思科:en, config terminal华为:system-viewh3c:system-view


06 删除文件

思科:delete华为:deleteh3c:delete


07 重启

思科:reload华为:rebooth3c:reboot


08 保存当前配置

思科:write华为:saveh3c:save


09 创建用户

思科:username华为:local-userh3c:local-user


10 禁止、关闭

思科:shutdown华为:shutdownh3c:shutdown


11 显示当前系统版本

思科:show version华为:display versionh3c:display version


12 查看已保存过的配置

思科:show startup-config华为:display saved-configurationh3c:display saved-configuration


13 显示当前配置

思科:show running-config华为:display current-configurationh3c:display current-configuration


14 取消所有debug命令

思科:no debug all华为:ctrl+dh3c:华为:ctrl+d


15 删除配置

思科:erase startup-config华为:reset saved-configurationh3c:reset saved-configuration


16 退到用户视图

思科:end华为:returnh3c:return


17 登出

思科:exit华为:logouth3c:logout


18 指定信息中心配置信息

思科:logging华为:info-centerh3c:info-center


19 进入线路配置(用户接口)模式

思科:line华为:user-interfaceh3c:user-interface


20 启动配置

思科:start-config华为:saved-configurationh3c:saved-configuration


21 当前配置

思科:running-config华为:current-configurationh3c:current-configuration


22 host名字和ip地址对应

思科:host华为:ip hosth3c:ip host


02 交换部分


01 配置明文密码

思科:enable password华为:set authentication password simpleh3c:set authentication password simple


02 进入接口

思科:interface type/number华为:port type/numberh3c:port type/number


03 进入vlan配置vlan管理地址

思科:interface vlan 1华为:interface vlan 1h3c:interface vlan 1


04 定议多个端口的组

思科:interface rang华为:interface ethID to IDh3c:interface ethID to ID


05 设置特权口令

思科:enabl esecret华为:super passwordh3c:super password


06 配置接口状态

思科:duplex (half|full|auto)华为:duplex (half|full|auto)h3c:duplex (half|full|auto)


07 配置端口速率

思科:speed (10/100/1000)华为:speed (10/100/1000)h3c:speed (10/100/1000)


08 配置trunk

思科:switchport mode trunk华为:port link-type trunkh3c:port link-type trunk


09 添加、删除vlan

思科:vlan ID /no vlan ID华为:vlan ID /no vlan IDh3c:vlan ID /no vlan ID


10 将端口接入vlan

思科:switchport access vlan ID华为:port vlan IDh3c:port vlan ID


11 查看接口

思科:show interface华为:display interfaceh3c:display interface


12 查看vlan

思科:show vlan ID华为:display vlan IDh3c:display vlan ID


13 封装协议

思科:encapsulation华为:link-protocolh3c:link-protocol


14 链路聚合

思科:channel-group 1 mode on华为:port link-aggregation group 1h3c:port link-aggregation group 1


15 开启三层交换的路由功能

思科:ip routing华为:默认开启h3c:默认开启


16 开启接口三层功能

思科:no switchport华为:不支持h3c:不支持


17 对跨以太网交换机的VLAN进行动态注册和删除

思科:vtp domain华为:GVRPh3c:GVRP


18 stp配置根网桥

思科:spanning-tree vlan ID root primary华为:stp root primaryh3c:stp root primary


19 配置网桥优先级

思科:spanning-tree vlan ID priority华为: stp priority priorityNumberh3c:stp priority priorityNumber


20 查看STP配置

思科:show spanning-tree华为:display stp briefh3c:display stp brief


03 路由部分


01 配置默认路由

思科:ip route 0.0.0.0 0.0.0.0华为:ip route-static 0.0.0.0 0.0.0.0h3c:ip route-static 0.0.0.0 0.0.0.0


02 配置静态路由

思科:ip route 目标网段+掩码 下一跳华为:ip route-static 目标网段+掩码 下一跳h3c:ip route-static 目标网段+掩码 下一跳


03 查看路由表

思科:show ip route华为:display ip routing-tableh3c:display ip routing-table


04 启用rip、并宣告网段

思科:router rip /network 网段华为:rip /network 网段h3c:rip /network 网段


05 启用ospf

思科:router ospf华为:ospf enableh3c:ospf enable


06 配置OSPF区域

思科:network ip 反码 area <area-id>华为:ospf enable area <area-id>h3c:ospf enable area <area-id>


07 配置RIP V2水平分割

思科:no auto-summary华为:rip split-horizonh3c:rip split-horizon


08 查看路由协议

思科:show ip protocol华为:display ip protocolh3c:display ip protocol


09 标准访问控制列表

思科:access-list 1-99 permit/deny IP华为:rule normal permit source IPh3c:rule normal permit source IP


10 扩展访问控制列表

思科:access-list 100-199 permit/deny protocol source IP+反码华为:rule {normal|special}{permit|deny}{tcp|udp}sourh3c:rule {normal|special}{permit|deny}{tcp|udp}sour


11 配置HSRP组

思科:standby group-number ip virtual-ip华为:vrrp vrid number virtual-iph3c:vrrp vrid number virtual-ip


12 配置HSRP优先级

思科:standby group-number priority华为:vrrp vrid number priorityh3c:vrrp vrid number priority


13 配置HSRP占先权

思科:standby group-number preempt华为:vrrp vrid number preempt-modeh3c:vrrp vrid number preempt-mode


14 配置端口跟踪

思科:standby group-number track华为:h3c:


15 配置静态地址转换

思科:ip nat inside source static华为:nat server global <ip> [port] inside <ip> port [protocol]h3c:nat server global <ip> [port] inside <ip> port [protocol]


整理:老杨丨10年资深网络工程师,更多网工提升干货,请关注公众号:网络工程师俱乐部