功能

思科 Cisco

华为 Huawei

华三 H3C

取消 / 否定

no

undo

undo

查看

show

display

display

退出当前视图

exit

quit

quit

设备命名

hostname

sysname

sysname

进入全局配置

enable、config terminal

system-view

system-view

删除文件

delete

delete

delete

设备重启

reload

reboot

reboot

保存配置

write /copy running-config startup-config

save

save

创建本地用户

username

local-user

local-user

关闭接口

shutdown

shutdown

shutdown

开启接口

no shutdown

undo shutdown

undo shutdown

查看系统版本

show version

display version

display version

查看已保存配置(启动配置)

show startup-config

display saved-configuration

display saved-configuration

查看当前运行配置

show running-config

display current-configuration

display current-configuration

删除启动配置(清空保存配置)

erase startup-config

reset saved-configuration

reset saved-configuration

直接退回特权 / 用户视图

end

return

return

进入 VTY 线路模式

line vty 0 15

user-interface vty 0 4

user-interface vty 0 4

配置明文特权密码

enable password

set authentication password simple(VTY 密码)、super password(超级口令)

set authentication password simple、super password

加密特权口令

enable secret

super password

super password

进入单接口

interface type num

interface type num

interface type num

进入 VLANIF 三层接口

interface Vlanif 1

interface Vlanif 1

interface Vlanif 1

批量进入多个端口

interface range

interface range Gig 0/0 to Gig 0/3

interface range Gig 0/0 to Gig 0/3

双工模式

duplex half/full/auto

duplex half/full/auto

duplex half/full/auto

端口速率

speed 10/100/1000

speed 10/100/1000

speed 10/100/1000

创建 VLAN

vlan 10

vlan 10

vlan 10

删除 VLAN

no vlan 10

undo vlan 10

undo vlan 10

配置端口链路类型

switchport mode access/trunk

port link-type access/trunk/hybrid

port link-type access/trunk/hybrid

Access 口加入 VLAN

switchport access vlan 10

port default vlan 10

port access vlan 10

查看接口信息

show interface

display interface

display interface

查看 VLAN 信息

show vlan

display vlan

display vlan

链路聚合组

interface port-channel 1

interface Eth-Trunk 1

interface Bridge-Aggregation 1

端口加入聚合组

channel-group 1 mode on

eth-trunk 1

port link-aggregation group 1

接口开启三层(关闭交换口)

no switchport

undo portswitch

port link-mode route

STP 配置根桥

spanning-tree vlan 10 root primary

stp instance 0 root primary

stp instance 0 root primary

STP 配置优先级

spanning-tree vlan 10 priority 4096

stp instance 0 priority 4096

stp priority 4096

查看 STP 简要

show spanning-tree brief

display stp brief

display stp brief

默认路由

ip route 0.0.0.0 0.0.0.0 下一跳

ip route-static 0.0.0.0 0 下一跳

ip route-static 0.0.0.0 0 下一跳

静态路由

ip route 网段 掩码 下一跳

ip route-static 网段 掩码长度 下一跳

ip route-static 网段 掩码长度 下一跳

查看路由表

show ip route

display ip routing-table

display ip routing-table

启用 OSPF 进程

router ospf 1

ospf 1

ospf 1

OSPF 宣告网段

network 网段 反掩码 area 0

area 0、network 网段 反掩码

area 0、network 网段 反掩码

标准 ACL

access-list 1-99 permit/deny 源

acl number 2000-2999 rule permit/deny source 源 通配符

acl number 2000-2999 rule permit/deny source 源 通配符

Trunk 允许 VLAN

switchport trunk allowed vlan

port trunk allow-pass vlan

port trunk allow-pass vlan

查看 OSPF 邻居

show ip ospf neighbor

display ospf peer brief

display ospf peer brief

查看 ACL

show access-list

display acl

display acl

超强linux学习笔记,值得一看(附PDF)

《鸟哥Linux私房菜》全新完整中文版PDF

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐