华为命令

华为与H3C 第一讲
路由器:
AR 系列面向企业,机构
AR 120 1200 2200

NE 面向运营商的高端产品
NE80E NE40E

交换机:
S
s2000 接入层
S3700 3900 中高端 汇聚层
S5700 8500 高端 核心

CE
CE12800
核心网络

防火墙
USG 2000 5000 9000 6000

VRP 路由通用平台

eNSP 软件:

1 图形化操作
2 高仿真
3 可与真实设备对接
4 分布式部署

GNS3 HCL eNSP

命令对比:

Switch> en 用户 用户视图 system-view
[Huawei]
Switch# 特权
Switch# conf
Switch(config)# Int f0/1 全局 系统视图 [Huawei]int g0/0/1
Switch(config-if)# 接口 接口视图 [Huawei-GigabitEthernet0/0/1]
思科 华为
No undo
Show display
exit Quit | logout
hostname Sysname
Enable
Conf t System-view
write save
line User-intface
end return
对应命令:
Show versions Display versions
Show ip route display ip routing-table
Show startup-config Display saved-configuration
Show running-config Display current-configurstion
Rease nvram Reset save-configuration
COMPARE configuration

华为与H3C 第二讲

课程回顾:
1 华为的产品线
2 ensP的安装 配置环境的搭建
3抓包
4华为的命令平台和思科的区别:

知识点介绍:
1 华为的常用命令:
2 设备连接方式:

命令
1 ?
Tab

Dis history-command //查看历史执行命令 show history
Display users //查看用户
Display this //查看当前视图下配置
Display diagnostic-information查看设备所有状态信息

1 consloe

Consol 配置密码

2 telnet (远程)
(一)
User-intface vty 0 4 Line vty 0 4
authentication-mode password
set authentication password cipher 123456
user privilege level 15 Password 1234
Login
Please configure the login password (maximum length 16):7

(二)
user-interface vty 0 4 Line vty 0 4
authentication-mode aaa Login local
exit
aaa
local-user hb3017 password cipher 123456 Username hb3017 password 123456
local-user hb3017 privilege level 15
local-user hb3017 service-type telnet terminal ssh web http
quit

3 ssh

4 http

配置登录认证

(一)、无需任何密码通过控制端口登录

[switchA]user-interface con 0
[switchA-ui-console0]authentication-mode none
[switchA-ui-console0]disp this

user-interface con 0
set authentication password simple 123456
此时,尽管交换机设置了console登录密码为123456,但由于console口已被设置为不进行安全的认证的方式,故通过console端口登录交换机时并不需要输入密码。这也是华为S5700出厂时的默认方式。

(二)、使用密码通过控制端口登录

如果我们此时输入以下命令,把console口登录认证方式设置为密码认证方式的话,那么在通过console端口登录交换机时就需要输入密码,也就是我们设置的密码123456。

[switchA-ui-console0]authentication-mode password
[switchA-ui-console0]disp this

user-interface con 0
authentication-mode password
set authentication password simple 123456
此时,console口的登录均与交换机中的用户无关,即与aaa中的local-user毫无关系。

(三)、使用aaa用户名和密码从控制端口登录

如果我们想配置以aaa中的用户从console端口登录,则需要:

1、设置con的认证模式为aaa

user-interface con 0
authentication-mode aaa
set authentication password simple 123456
2、创建aaa用户,并保证该用户拥有terminal的服务类型权限(默认情况下,所有的aaa用户都拥有terminal权限的,除非特别排除,因此如果单纯的只是为了让下面的admin用户拥有可以console的权限,service-type的权限是不用特别设置的)。

aaa
local-user admin password simple abc@123
local-user admin service-type telnet terminal ssh
此时从console口登录时需输入用户名:admin 和认证密码:abc@123。因为我们把console的认证模式设置为使用aaa用户的认证方式,故认证过程中的一切要素均来自于aaa用户中的各个属性值,故其认证密码也就与“set authentication password simple 123456”中的密码无关了。

当然,在实际生产过程中我们在设置密码时一般都不会设置存储明文密码字符串,而是会选择对密码串进行加密:"set authentication password cipher 123456”,这样的话当我们在display 时看到的就是加密之后的密码串了。

(四)、配置设备可以telnet登录

1、配置管理Ip

interface vlanif 1
ip address 172.16.1.254 255.255.255.0
2、开启telnet服务

telnet server enable
3、设置vty 0 4认证方式

a、方式一:设置telnet为password认证方式,即telnet时无登录用户名,只需输入telnet密码123456就可以了

user-interface vty 0 4
authentication-mode password
user privilege level 15
/设置远程登录后的操作权限级别为最高的15级/
set authentication password simple 123456
protocol inbound all
/华为默认远程只允许ssh登录,把它改为protocol inbound ssh telnet 或 all就行了。/

b、方式二:设置telnet为aaa用户认证方式,即telnet时需输入登录用户名和登录密码,即admin和abc@123,下面的倒数第2、3行的内容与aaa用户认证无关。

aaa
local-user admin password simple abc@123
local-user admin service-type telnet terminal ssh
/设置admin用户拥有telnet、terminal和ssh的权限/
local-user admin privilege level 15
/如果此处不设置,默认level=3,其实也是系统管理权限/
quit

user-interface vty 0 4
authentication-mode aaa
user privilege level 15
/设置远程登录后的操作权限级别为最高的15级,此权限对以aaa身份登录的用户无效/
set authentication password simple 123456
protocol inbound all
/华为默认远程只允许ssh登录,把它改为protocol inbound ssh telnet 或 all就行了。/
————————————————

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值