大网华为 H3c 基础命令

思科 华为 命令对照表

编号
思科(cisco)
华为(huawei)
H3C(华三)
功能描述

1
no
undo
undo
取消/关闭 当前设置

2
show
display
display
查看、显示

3
exit
quit
quit
退回上级

4
hostname
sysname
sysname
设置主机名

5
en, config terminal
system-view
system-view
进入全局模式

6
delete
delete
delete
删除文件

7
reload
reboot
reboot
重启

8 Write,
Copy running-config Startup-config
save
save
保存当前配置

9
username
local-user
local-user
创建用户

10
shutdown
shutdown
shutdown
禁止、关闭

11
show version
display version
display version
显示当前系统版本

12
show startup-config display saved-configuration display saved-configuration
查看已保存过的配置

13
show running-config display current-configuration display current-configuration
显示当前配置

14
no debug all
ctrl+d
ctrl+d
取消所有debug 命令

15 erase startup-config reset
saved-configuration reset
saved-configuration
删除配置

16
end
return
return
退到用户视图

17
exit
logout
logout
登出

18

logging

info-center

info-center

指定信息中心配置信息

19

line

user-interface

user-interface

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

20

start-config

saved-configuration

saved-configuration

启动配置

21

22

running-config

交换h部ost 分:

current-configuration ip host

current-configuration ip host

当前配置

host 名字和ip 地址对应

23

24

25

enable password

interface type/number

interface vlan 1

set authentication password simple

port type/number interface vlan 1

set authentication password simple

port type/number interface vlan 1

配置明文密码

进入接口

进入vlan 配置vlan 管理

35
encapsulation
link-protocol
link-protocol
封装协议

36 channel-group 1 mode on port link-aggregation group 1 port link-aggregation group 1
链路聚合

37
ip routing
默认开启
默认开启 开启三层交换的路由功能

38
no switchport
不支持
swi port link-mode route
不支持
tchort port link-mode brife
开启接口三层功能

39
vtp domain
GVRP
GVRP 对跨以太网交换机的VLAN 进行动态注册和删

40 spanning-tree vlan ID root primary

stp 配置根网桥

41 spanning-tree vlan ID priority

配置网桥优先级

42
show spanning-tree

路由部分

查看STP 配置

43 ip route 0.0.0.0 0.0.0.0 ip route-static 0.0.0.0 0.0.0.0 ip route-static 0.0.0.0 0.0.0.0
配置默认路由

44 ip route 目标网段+ 掩码 下一跳 ip route-static 目标网段+掩码 下一跳 ip route-static 目标网段+掩码 下一跳
配置静态路由

45
show ip route display ip routing-table display ip routing-table
查看路由表

46 router rip /network 网段
rip /network 网段
rip /network 网段
启用rip、并宣告网段

47
router ospf
ospf enable
ospf enable
启用ospf

48 network ip 反码area ospf enable area
ospf enable area

配置OSPF 区域

49
no auto-summary
rip split-horizon
rip split-horizon
配置RIP V2 水平分割

50
show ip protocol
display ip protocol
display ip protocol
查看路由协议

51 access-list 1-99 permit/deny IP rule normal permit source IP rule normal permit source IP
标准访问控制列表

52
access-list 100-199 permit/deny protocol source IP+ 反码 destination IP+ 反 码 operator operan rule
{normal|special}{perm it|deny}{tcp|udp}sour ce {|any}destination
|any}[operate] rule
{normal|special}{perm it|deny}{tcp|udp}sour ce {|any}destination
|any}[operate]

扩展访问控制列表

53 standby group-number ip
virtual-ip
vrrp vrid number virtual-ip
vrrp vrid number virtual-ip

配置HSRP 组

54
standby group-number priority
vrrp vrid number priority
vrrp vrid number priority

配置HSRP 优先级

55

standby group-number preempt

vrrp vrid number preempt-mode

vrrp vrid number preempt-mode

配置HSRP 占先权

56
standby group-number track

配置端口跟踪
57
ip nat inside source static
nat server global [port] inside port [protocol]
nat server global [port] inside port [protocol]

配置静态地址转换

华为基础命令

三层交换
system-view //进入全局模式
vlan 2 //创建vlan
quit
interface g0/0/1 //端口加入vlan
port link-type access
port default vlan 2
quit
iterface vlan 2 //vlan配置ip
ip address 192.168.1.254 24
undo shutdown
quit

Rip路由协议
rip //使用rip,版本2宣告网段
version 2
network 网段
quit

Ospf路由协议
ospf 10 //使用ospf路由协议宣告网段
area 0 //进入区域0
network 网段 反掩码 //宣告网段
quit
area 1 //进入区域1
network 网段 反掩码 //宣告网段
quit

路由重分发
ospf 10 //进入ospf进程,重分发rip路由协议
import-route rip 1
Quit
Rip //进入rip进程,重分发ospf路由协议
import-route ospf 10
Quit

网络地址转换(NAT)
动态nat
nat address-group 1 开始ip 结束ip //创建地址池
acl 2000 //指定需要做转换的网段
rule 1 Permit source 做转换的内网段
interface 外网口
nat outbound 2000 address-group 1
静态nat
interface 外网口
nat server global 公网地址 inside 内网地址

思科acl
标准acl,基于源ip进行过滤,表号范围1-99
扩展acl,基于源ip、目的ip、协议、端口号等进行过滤,表号范围100-199
华为访问控制列表(ACL)
基本aacl,只基于源ip进行过滤,表号范围2000-2999
高级aacl,基于源ip、目的ip、协议、端口号等进行过滤,表号范围3000-3999

语法:
acl 2000
rule 1 permit/deny source 源地址 反掩码
rule 10 permit/deny source源地址 反掩码
quit

高级aacl,基于源ip、目的ip、协议、端口号等进行过滤,表号范围3000-3999
acl 3000
rule 1 permit/deny 协议 source 源地址 反掩码 destination目的地址 反掩码 [destination-port eq 端口号]
acl应用到端口
interface 端口
traffic-filter inbound/outbound acl 编号 //将acl应用到接口
undo traffic-filter inbound //取消应用

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值