惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
The Register - Security
The Register - Security
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园_首页
U
Unit 42
T
Tailwind CSS Blog
G
GRAHAM CLULEY
F
Full Disclosure
V
Vulnerabilities – Threatpost
T
Tenable Blog
月光博客
月光博客
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
K
Kaspersky official blog
Scott Helme
Scott Helme
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LINUX DO - 最新话题
Recorded Future
Recorded Future
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
The GitHub Blog
The GitHub Blog
Cisco Talos Blog
Cisco Talos Blog
SecWiki News
SecWiki News
P
Proofpoint News Feed
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
罗磊的独立博客
S
Security Affairs
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
美团技术团队
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
Stack Overflow Blog
Stack Overflow Blog
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
Visual Studio Blog

lololowe的博客

《防火墙项目化实战 (基于华为eNSP)》笔记 华为VLAN高级特性与协议详解 DNS 跨平台托管 CVE-2026-0073 安卓调试桥漏洞复现 使用 Bettercap 进行 HTTPS 中间人攻击:SSL 剥离和 HSTS 绕过 Yakit测试PortSwigger靶场-未授权访问 visio导入Mermaid流程图(SVG格式) 什么是 TiT (TLS in TLS) 特征以及如何消除特征 部署 Wireguard VPN 实现异地组网 Redis未授权访问漏洞复现 实现防御ARP劫持与主动反击 mrs文件转换与查看 电脑垃圾清理技巧分享 QQ音乐 2015-2025 年度听歌报告链接汇总 基于DevStack快速部署OpenStack
华为VRP系统基本操作
lololowe · 2026-03-14 · via lololowe的博客
计算机网络网络设备配置计算机网络eNSP

1. Console口登录

这里演示的设备为ensp模拟器中S5700交换机(Version 5.110 V200R001C00)。

通过Console口登录新出厂(或空配置启动)的设备时,系统会有如下提示:

1
Warning: Auto-Config is working. Before configuring the device, stop Auto-Config. If you perform configurations when Auto-Config is running, the DHCP, routing, DNS, and VTY configurations will be lost. Do you want to stop Auto-Config? [y/n]:

Auto-Config依赖DHCP协议自动获取IP地址和相关网络参数,适用于多设备首次启动时的快速部署,简单环境下建议输入y跳过Auto-Config,并在系统视图下使用undo autoconfig enable命令禁用Auto-Config功能,否则下次连接时会再次提示是否停止Auto-Config。

1.1 密码认证

1
2
3
4
5
user-interface console 0                 
idle-timeout 60
authentication-mode password
set authentication password cipher mkbk
user privilege level 15

使用CTL控制线连接交换机的Console口,输入密码mkbk后成功登录,使用display user-interface console 0查看串口状态:

alt text

1.2 AAA认证

1
2
3
4
5
6
7
user-interface console 0   
authentication-mode aaa
user privilege level 15
quit

aaa
local-user lololowe password cipher lololowe privilege level 15

使用CTL控制线连接交换机的Console口,输入用户名lololowe和密码lololowe后成功登录,使用display local-user username lololowe查看本地用户状态:

alt text

2. 查看设备信息

1
2
3
4
5
6
7
8
9
10
11
12
13
[AR1000v]display version                                                    
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.170 (AR1000V V300R022C00SPC100)
Copyright (C) 2011-2022 HUAWEI TECH CO., LTD
Huawei AR1000V Router uptime is 0 week, 0 day, 1 hour, 53 minutes

MPU 0(Master) : uptime is 0 week, 0 day, 1 hour, 53 minutes
SDRAM Memory Size : 2048 M bytes
MPU version information :
1. PCB Version : AR01SRU0B VER.A
2. MAB Version : 0
3. Board Type : AR1000V
4. BootROM Version : 0

VRP系统的发展:

alt text

3. 修改设备名称

1
2
3
4
5
6
7

[Huawei]sysname AR100v
[AR100v]


[AR100v]undo sysname
[Huawei]

4. 修改时间

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

<AR1000v>display clock
2017-01-01 03:19:20
Sunday
Time Zone(Default Zone Name) : UTC+00:00


<AR1000v>clock timezone CST add 8:0:0
Jan 1 2017 11:19:56+00:00 AR1000v SYSMIB/4/CLOCK_CHANGE:OID 1.3.6.1.4.1.2011.5.25.19.2.1 System clock changed


<AR1000v>clock datetime 16:35:50 2026-03-14
Mar 14 2026 16:35:50+08:00 AR1000v SYSMIB/4/CLOCK_CHANGE:OID 1.3.6.1.4.1.2011.5.25.19.2.1 System clock changed


<AR1000v>display clock
2026-03-14 16:36:02
Saturday
Time Zone(CST) : UTC+08:00
<AR1000v>

时间修改必须在用户视图下进行。

命令行视图介绍:

alt text

5. 设置录横幅

横幅内容以第一个英文字符作为起始符号,最后一个英文字符作为结束符,起始符与结束符必须相同。

1
2
3
4
5

[AR1000v]header login information alogin...a


[AR1000v]header shell information alogin donea

登录过程中以及登录成功后显示的横幅信息:

alt text

6. 管理配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

<AR1000v>display current-configuration interface g0/0/0
[V300R022C00SPC100]

interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address auto link-local
ipv6 address auto global default
ip address dhcp-alloc
ipv6 address auto dhcp

return


<AR1000v>display startup
MainBoard:
Startup system software: flash:/ar.cc
Next startup system software: flash:/ar.cc
Backup system software for next startup: null
Startup saved-configuration file: null
Next startup saved-configuration file: null
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null


<AR1000v>display saved-configuration
Info: There is no correct configuration file


<AR1000v>save
Warning: The current configuration will be written to the device.
Are you sure to continue?[Y/N]:y
It will take several minutes to save configuration file, please wait...........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated


<AR1000v>display startup
MainBoard:
Startup system software: flash:/ar.cc
Next startup system software: flash:/ar.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
<AR1000v>dir vrpcfg.zip
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 1,080 Mar 14 2026 09:33:43 vrpcfg.zip
7,093,752 KB total available (6,514,836 KB free)


<AR1000v>reset saved-configuration
Warning: This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n):y


<AR1000v>dis startup
MainBoard:
Startup system software: flash:/ar.cc
Next startup system software: flash:/ar.cc
Backup system software for next startup: null
Startup saved-configuration file: null
Next startup saved-configuration file: null
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null

7. 自定义快捷键

可以使用display hotkey命令查看设备支持的快捷键:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[AR1000v]display hotkey 
----------------- HOTKEY -----------------

=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L undo idle-timeout
CTRL_O undo debugging all

=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL

=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the first line
CTRL_B Move the cursor one character left
CTRL_C Stop current command function
CTRL_D Erase current character
CTRL_E Move the cursor to the end of the Last line
CTRL_F Move the cursor one character right
CTRL_H Erase the character left of the cursor
CTRL_J Line feed function
CTRL_K Kill outgoing connection
CTRL_N Display the next command from the history buffer

常用的快捷键如下:

快捷键 (Hotkey) 功能描述 (中文)
Ctrl + A 光标跳到行首
Ctrl + E 光标跳到行尾
Ctrl + U 删除光标左侧的所有字符
Ctrl + W 删除光标左边的一个单词
Ctrl + Z 返回用户视图
Ctrl + C 立即停止当前命令或功能
Ctrl + P 显示上一条历史命令
Ctrl + N 显示下一条历史命令
Ctrl + G 显示当前配置 (display cu)
Esc + B 光标向左移动一个字符
Esc + F 光标向右移动一个单词

自定义快捷键有4个: <Ctrl+G>、<Ctrl+L>、<Ctrl+O>、<Ctrl+U>

以根据自己的需要将这4个快捷键与任意命令进行关联:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

[AR1000v]hotkey CTRL_U "dis ip in b "


[AR1000v]dis ip in b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 8
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 6

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 10.0.0.159/24 up up
GigabitEthernet0/0/1 unassigned up down
GigabitEthernet0/0/2 unassigned up down
GigabitEthernet0/0/3 unassigned up down
GigabitEthernet0/0/4 unassigned up down
GigabitEthernet0/0/5 unassigned up down
GigabitEthernet0/0/6 unassigned up down
NULL0 unassigned up up(s)

8. 配置接口静态/动态IP地址

8.1 DHCP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

[AR1000v]int g0/0/0
[AR1000v-GigabitEthernet0/0/0]ip address dhcp-alloc


[AR1000v]display dhcp client
DHCP client lease information on interface GigabitEthernet0/0/0 :
Current machine state : Bound
Internet address assigned via : DHCP
Physical address : 5000-0001-0000
IP address : 10.0.0.159
Subnet mask : 255.255.255.0
Gateway ip address : 10.0.0.1
DHCP server : 10.0.0.1
Lease obtained at : 2026-03-14 17:10:32
Lease expires at : 2026-03-15 05:10:32
Lease renews at : 2026-03-14 23:10:32
Lease rebinds at : 2026-03-15 03:40:32
Domain name : lan
DNS : 10.0.0.1
Request option list : 1 3 6 15 28 33 44 121 184
Class identifier : huawei AR1000V
Client identifier : 5000-0001-0000


[AR1000v]ping -c 2 223.5.5.5
PING 223.5.5.5: 56 data bytes, press CTRL_C to break
Reply from 223.5.5.5: bytes=56 Sequence=1 ttl=52 time=21 ms
Reply from 223.5.5.5: bytes=56 Sequence=2 ttl=52 time=21 ms

--- 223.5.5.5 ping statistics ---
2 packet(s) transmitted
2 packet(s) received
0.00% packet loss
round-trip min/avg/max = 21/21/21 ms

8.2 静态IP地址

1
2
3
4
5
6
7
8
9
10

[AR1000v]int g0/0/0
[AR1000v-GigabitEthernet0/0/0]ip address 10.0.0.33 24


[AR1000v-GigabitEthernet0/0/0]dis th
[V300R022C00SPC100]

interface GigabitEthernet0/0/0
ip address 10.0.0.33 255.255.255.0

9. Telnet管理设备

AR2200路由器和AR1000v虚拟化路由器的Telnet配置主要区别在于后者需要全局允许接口连接telnet后才能启用telnet服务。

9.1 AR2200路由器

AR2200 版本为 VRP (R) software, Version 5.130 (AR2200 V200R003C00)

9.1.1 密码认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2200


[AR2200]interface g0/0/0
[AR2200-GigabitEthernet0/0/0]ip address 6.6.6.66 24
[AR2200-GigabitEthernet0/0/0]quit


[AR2200]telnet server enable
Error: TELNET server has been enabled


[AR2200]user-interface vty 0 4
[AR2200-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):mkbk
[AR2200-ui-vty0-4]user privilege level 15

Windows系统下使用telnet命令(telnet 6.6.6.66)连接:

alt text

9.1.2 AAA认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2200


[AR2200]interface g0/0/0
[AR2200-GigabitEthernet0/0/0]ip address 6.6.6.66 24
[AR2200-GigabitEthernet0/0/0]quit


[AR2200]telnet server enable
Error: TELNET server has been enabled


[AR2200]user-interface vty 0 4
[AR2200-ui-vty0-4]authentication-mode aaa
[AR2200-ui-vty0-4]user privilege level 15
[AR2200-ui-vty0-4]quit


[AR2200]aaa
[AR2200-aaa]local-user mkbk password cipher mkbk
Info: Add a new user.
[AR2200-aaa]

Windows系统下使用telnet命令(telnet 6.6.6.66)连接:

alt text

9.2 AR1000v路由器

AR1000v 版本为 VRP (R) software, Version 5.170 (AR1000V V300R022C00SPC100)
AR1000v 在eve-ng模拟器中运行,桥接到宿主机网络,使用DHCP动态获取IP地址。

9.2.1 AAA认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1000v


[AR1000v]interface g0/0/0
[AR1000v-GigabitEthernet0/0/0]ip address dhcp-alloc
[AR1000v-GigabitEthernet0/0/0]dis ip in b g0/0/0
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 10.0.0.159/24 up up


[AR1000v]telnet server permit interface all
Warning: Allowing access from all interfaces is insecure.
[AR1000v]telnet server enable
Info: Telnet is insecure, recommended to use stelnet with encryption features.


[AR1000v]aaa
[AR1000v-aaa]local-user lololowe password cipher admin
Info: Add a new user.
[AR1000v-aaa]local-user lololowe service-type telnet
Info: The cipher password has been changed to an irreversible-cipher password.
Warning: The user access modes include Telnet, FTP, or HTTP, so security risks exist.
Info: After changing the rights (including the password, access type, FTP directory, bind IP, and level) of a local user, the rights of users already online do not change. The change takes effect to users who go online after the change.

Windows系统下使用telnet命令(telnet 10.0.0.159)连接:

alt text

9.2.2 密码认证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1000v


[AR1000v]interface g0/0/0
[AR1000v-GigabitEthernet0/0/0]ip address dhcp-alloc
[AR1000v-GigabitEthernet0/0/0]dis ip in b g0/0/0
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 10.0.0.159/24 up up


[AR1000v]telnet server permit interface all
Warning: Allowing access from all interfaces is insecure.
[AR1000v]telnet server enable
Info: Telnet is insecure, recommended to use stelnet with encryption features.


[AR1000v]user-interface vty 0 4
Info: Telnet protocol supported by vty is insecure, recommended to use SSH protocol.
[AR1000v-ui-vty0-4]authentication-mode password
[AR1000v-ui-vty0-4]set authentication password cipher
Warning: The "password" authentication mode is not secure, and it is strongly recommended to use "aaa" authentication mode.
Enter Password(<8-128>):admin
Confirm password:admin
[AR1000v-ui-vty0-4]user privilege level 15

Windows系统下使用telnet命令(telnet 10.0.0.159)连接:

alt text

10. SSH管理设备

AR2200和AR1000v的SSH配置主要区别在于后者需要为本地用户指定服务类型为SSH。

10.1 AR2220

AR2220 版本为 Version 5.130 (V200R003C00)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

[AR2220]stelnet server enable


[AR2220]user-interface vty 0 4
[AR2220-ui-vty0-4]authentication-mode aaa
[AR2220-ui-vty0-4]protocol inbound ssh


[AR2220-ui-vty0-4]aaa
[AR2220-aaa]local-user lololowe password cipher lololowe privilege level 15
[AR2220-aaa]quit

[AR2220]ssh user lololowe authentication-type all
[AR2220]undo ssh server compatible-ssh1x enable
[AR2220]rsa local-key-pair create

使用secureCRT连接:

alt text

alt text

10.2 AR1000v

AR1000v 版本为 Version 5.170 (V300R022C00SPC100)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

[AR1000v]int g0/0/0
[AR1000v-GigabitEthernet0/0/0]ip add dhcp-alloc


[AR1000v]stelnet server enable

[AR1000v]user-interface vty 0 4
[AR1000v-ui-vty0-4]authentication-mode aaa
[AR1000v-ui-vty0-4]protocol inbound ssh
[AR1000v-ui-vty0-4]idle-timeout 60


[AR1000v]aaa
[AR1000v-aaa]local-user lololowe password cipher admin
[AR1000v-aaa]local-user lololowe service-type ssh
[AR1000v]quit

[AR1000v]ssh user lololowe authentication-type all
[AR1000v]rsa local-key-pair create

头像头像

lololowe

恬淡无为

打赏作者

感谢你赐予我前进的力量

  • Bitcoin

    Bitcoin

  • Ethereum

    Ethereum

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 lololowe的博客