Professional Documents
Culture Documents
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 2
学习目标
学完本课程后,您应该能:
掌握 VRP 命令行的基础知识
利用 VRP 命令行进行基本的配置
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 3
设备初始化启动
BIOS
BIOS Creation
Creation Date
Date :: Jan
Jan 55 2013,
2013, 18:00:24
18:00:24
DDR
DDR DRAM
DRAM init
init :: OK
OK
Start
Start Memory
Memory Test
Test ?? ('t'
('t' or
or 'T'
'T' is
is test):skip
test):skip
Copying
Copying Data
Data :: Done
Done
Uncompressing
Uncompressing :: Done
Done
……
……
Press
Press Ctrl+B
Ctrl+B to
to break
break auto
auto startup
startup ...
... 11
Now
Now boot
boot from
from sd1:/AR2220-V200R003C00SPC200.cc,
sd1:/AR2220-V200R003C00SPC200.cc,
……
……
<Huawei>
<Huawei>
Warning:
Warning: Auto-Config
Auto-Config is
is working.
working. Before
Before configuring
configuring the
the device,
device,
stop
stop Auto-Config.
Auto-Config. If
If you
you perform
perform configurations
configurations when
when Auto-Config
Auto-Config is
is
running,
running, the
the DHCP,
DHCP, routing,
routing, DNS,
DNS, and
and VTY
VTY configurations
configurations will
will be
be
lost.
lost. Do
Do you
you want
want to
to stop
stop Auto-Config?
Auto-Config? [y/n]:Y
[y/n]:Y
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 4
命令行视图
查看运行状态或其他参数
用户视图
系统视图 配置设备的系统参数等
接口视图
配置接口参数
协议视图 配置路由协议
<Huawei>system-view
<Huawei>system-view
Enter
Enter system
system view,
view, return
return user
user view
view with
with Ctrl+Z.
Ctrl+Z.
[Huawei]interface
[Huawei]interface GigabitEthernet
GigabitEthernet 0/0/0
0/0/0
[Huawei-GigabitEthernet0/0/0]
[Huawei-GigabitEthernet0/0/0]
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 5
命令行功能
命令 功能
CTRL+A 把光标移动到当前命令行的最前端
CTRL+C 停止当前命令的运行
CTRL+] 终止当前连接或切换连接
<Huawei>system-view
<Huawei>system-view
Enter
Enter system
system view,
view, return
return user
user view
view with
with Ctrl+Z.
Ctrl+Z.
[Huawei]^z
[Huawei]^z //Ctrl+Z
//Ctrl+Z
<Huawei>display
<Huawei>display hotkey
hotkey
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 6
命令行功能
命令 功能
Backspace 删除光标左边的第一个字符
← or Ctrl+B 光标左移一位
→ or Ctrl+F 光标右移一位
[Huawei]inter
[Huawei]inter //TAB
//TAB
[Huawei]interface
[Huawei]interface
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 7
命令行在线帮助
<Huawei> d?
部分帮助
<Huawei> display h?
命令行在线帮助
<Huawei> ?
完全帮助
<Huawei> display ?
[Huawei]d?
[Huawei]d?
ddns
ddns dhcp
dhcp
dhcpv6
dhcpv6 diagnose
diagnose
display
display dns
dns
domain
domain dot1x
dot1x
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 8
基本配置步骤
命令 功能
sysname 配置设备名称
<Huawei>system-view
<Huawei>system-view
Enter
Enter system
system view,
view, return
return user
user view
view with
with Ctrl+Z.
Ctrl+Z.
[Huawei]sysname
[Huawei]sysname RTA
RTA
[RTA]
[RTA]
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 9
配置系统时钟
命令 功能
<Huawei>clock
<Huawei>clock timezone
timezone BJ
BJ add
add 08:00:00
08:00:00
<Huawei>clock
<Huawei>clock datetime
datetime 10:20:29
10:20:29 2013-04-11
2013-04-11
<Huawei>display
<Huawei>display clock
clock
2013-04-11
2013-04-11 10:20:48
10:20:48
Thursday
Thursday
Time
Time Zone(BJ)
Zone(BJ) :: UTC+08:00
UTC+08:00
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 10
配置标题消息
命令 功能
[Huawei]header
[Huawei]header login
login information
information "welcome
"welcome to
to huawei
huawei certification!"
certification!"
[Huawei]header
[Huawei]header shell
shell information
information "Please
"Please don't
don't reboot
reboot the
the device!"
device!"
……
……
welcome
welcome to
to huawei
huawei certification!
certification!
Login
Login authentication
authentication
Password:
Password:
Please
Please don't
don't reboot
reboot the
the device!
device!
<Huawei>
<Huawei>
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 11
命令等级
用户等级 命令等级 名称
0 0 访问级
1 0 and 1 监控级
<Huawei>
<Huawei> system-view
system-view
[Huawei]command-privilege
[Huawei]command-privilege level
level 33 view
view user
user save
save
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 12
用户界面
用户界面类型 编号
Console 0
VTY 0-4
<Huawei>system-view
<Huawei>system-view
[Huawei]user-interface
[Huawei]user-interface vty
vty 00 44
[Huawei-ui-vty0-4]
[Huawei-ui-vty0-4]
命令 功能
idle-timeout 设置超时时间
screen-length 设置指定终端屏幕的临时显示行数
history-command
设置历史命令缓冲区的大小
max-size
## Set
Set the
the size
size of
of the
the history
history command
command buffer
buffer to
to 20.
20.
<Huawei>system-view
<Huawei>system-view
[Huawei]user-interface
[Huawei]user-interface console
console 00
[Huawei-ui-console0]history-command
[Huawei-ui-console0]history-command max-size
max-size 20
20
## Set
Set the
the timeout
timeout duration
duration to
to 11 minute
minute and
and 30
30 seconds.
seconds.
[Huawei-ui-console0]idle-timeout
[Huawei-ui-console0]idle-timeout 11 30
30
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 14
配置登陆权限
命令 功能
## Set
Set the
the user
user level
level on
on the
the VTY0
VTY0 user
user interface
interface to
to 2.
2.
<Huawei>system-view
<Huawei>system-view
[Huawei]user-interface
[Huawei]user-interface vty
vty 00
[Huawei-ui-vty0]user
[Huawei-ui-vty0]user privilege
privilege level
level 22
[Huawei-ui-vty0-4]set
[Huawei-ui-vty0-4]set authentication
authentication password
password cipher
cipher huawei
huawei
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 15
配置接口 IP 地址
RTA RTB
10.0.12.1/24
1.1.1.1/32
G0/0/0 G0/0/0
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 16
总结
Copyright © 2013 Huawei Technologies Co., Ltd. All rights reserved. Page 17
谢谢
www.huawei.com