华为VRP 系统基 本配置1

如何通过 console 口连接路由器
配置设备 console 密码、主机名、时间、时区、banner、Super 密码
配置接口地址与 telnet、SSH
查看、保存、清空、重启路由器

一、如何通过 console 口连接路由器
用 console 线缆将笔记本连接到路由器的 Console 口,然后通过 CRT 软件进行连接.
在输入信息后输入“?”可查看以输入的字母开头的命令。如输入“dis?”,设备将输出所有以 dis 开头的命令。
在输入的信息后增加空格,再输入“?”,这时设备将尝试识别输入的信息对应的命令,然后输出该命令的其他参数。例如输入
“dis ?”,如果只有 display 命令是以 dis 开头的,那举设备将输出 display 命令的参数,如上所示;如果以 dis 开头的命令还
有其他的,设备将报错。
另外可以使用键盘上 Tab 键补全命令,比如键入“dis”后,按键盘“Tab”键可以将命令补全为“display”。如有多个以“dis”
开头的命令存在,则在多个命令间循环切换。
命令在不发生歧的情况下可以使用简写,如“display”可以简写为“dis”或“disp”等,“interface”可以简写为“int”或“inter”
等。
?
display version =====显示设备版本号、型号、启动时间

二、配置设备 console 密码、主机名、时间、时区、baner
system-view =进入系统视图(相当于思科的全局配置模式)
[Huawei]quit or return =退出系统视图

[Huawei]sysname R1 = 配置主机名
[R1]header login information “Welcome to R” =配置登录 banner,如 telnet 等
[R1]header shell information “Welcome to HW” =配置登录 banner,如 console
quit
Configuration console exit, please press any key to log on
Welcome to HW

[R1]user-interface console 0==进入 console 口,默认无密码
[R1-ui-console0]authentication-mode password
Please configure the login password (maximum length 16):5 ====选择密码长度
[R1-ui-console0]set authentication password cipher cisco ====配置一个密文形式密码(可以选择明文,命令为 simple)
[R1-ui-console0]idle-timeout 3 20 ====配置空闲超时时间 3 分 20 秒,默认 10 分钟
quit
display clock ====显示系统时间
clock timezone GMT add 08:00:00 ====配置系统时区,中国为+8 区
clock datetime 22:59:00 2014-05-11 ====配置系统时间
[R1]super password cipher huawei ====配置密文 super 密码,防止非法用户权限提升
[R1]display current-configuration | include super ====显示 super 密码配置

三、配置接口地址与 telnet、SSH
[R1]display ip interface brief ====查看接口状态
R1]display interface g0/0/0 ====查看接口详细信息
[R1]interface g0/0/0 ====进入接口模式(注:默认接口状态为 UP,可以使用命令 shutdown 关闭接口,用 restart 命令开启)
[R1-GigabitEthernet0/0/0]ip address 202.100.1.1 255.255.255.0
display ip int bri
telnet 配置【基于密码与用户名密码 2 种方式】
[R1]user-interface vty 0 4 ====进入线下模式
[R1-ui-vty0-4]set authentication password cipher cisco ====配置加密密码为 cisco
display telnet server status ====查看 telnet server 状态
display users ====查看 telnet 会话信息
配置用户名+密码认证方式
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]quit
[R1]
[R2]aaa
[R2-aaa]local-user cisco password cipher cisco privilege level 15
[R2-aaa]local-user cisco service-type telnet
SSH 配置:
[R1]rsa local-key-pair create ====生成 RSA 密钥
[R1]display rsa local-key-pair public ====查看生成 RSA 密钥
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]protocol inbound ssh
[R1-ui-vty0-4]quit
[R1]aaa
[R1-aaa]local-user sshuser password cipher cisco ====创建 SSH 登陆用户名与密码
[R1]stelnet server enable ====启用 Stelnet 功能
[R1]ssh user sshuser authentication-type password ====配置 SSH 登陆用户名服务类型
[R1]display ssh server status ====查看 SSH 服务状态
[R1]display ssh user-information ====查看 SSH 登陆用户状态
四、查看、保存、清空、重启路由器
[R1]display current-configuration ====查看路由器当前配置信息
save ====保存路由器当前配置信息
startup saved-configuration iascfg.zip ====配置下次启动加载配置文件
display startup ====查看下次启动加载配置文件
reset saved-configuration ====清空配置
reboot ====重启路由器

猜你喜欢

转载自blog.csdn.net/lzwq1288/article/details/83307530