VRP系统基本配置

2.7 VRP基本配置

2.7.1 配置系统时钟

<R1>clock timezone BJ add 8     //调整时区为北京+8区
<R1>clock datetime 15:22:00 2022-10-8   //设置时间,读者需要注意时间的格式
<R1>display clock   //验证时间已经调整完毕
2022-10-08 15:22:13
Saturday
Time Zone(BJ) : UTC+08:00

2.7.2 配置标题消息

[R1]header login information "This is Head login Info Test From Qytang.com" //设置登录时显示的提示消息
[R1]header shell information "THis is Head Shell Info Test From Qytang.com" //设置登录后显示的提示信息

测试

<R2>telnet 12.1.1.1
  Press CTRL_] to quit telnet mode
  Trying 12.1.1.1 ...
  Connected to 12.1.1.1 ...
This is Head login Info Test From Qytang.com

Login authentication


Password:
THis is Head Shell Info Test From Qytang.com
<R1>

image

2.7.3 命令行等级划分

[R2]command-privilege level 3 view user save //设置在用户视图下执行save命令需要3级的权限
  The command level is modified successfully 

image

2.8 VRP文件系统

2.8.1 VRP文件系统简介

VRP文件系统是华为VRP管理存放在存储器上的系统文件(如VRP的系统镜像)、配置文件等的系统,它是VRP正常运行的基础。基于Linux系统,可以在VRP的文件系统中对存储器中的文件、目录进行查看、创建、删除、修改等操作。

2.8.2 VRP文件系统基本命令操作

1.基本查询命令

命令 功能
dir 查看当前目录下的文件信息
pwd 查看当前目录
more 查看文本文件的具体内容
  • dir命令显示当前目录下的文件信息,在第二列即“Attr”列中,d代表文件目录;r代表可读;w代表可写入。
    image

  • pwd命令查看当前目录。
    image

  • more命令文本文件的具体内容。
    image

2.目录操作

命令 功能
cd 修改用户当前界面的工作目录或进入新的目录
mkdir 创建目录
rmdir 删除目录

3.文件操作

命令 功能
copy 复制文件
move 移动文件
rename 重命名文件
delete/unreserved 删除/永久删除文件
undelete 恢复删除的文件
rest recycle-bin 彻底删除回收站中的文件

2.8.3 配置文件管理

VRP设备上的配置文件分为以下两种类型:

  • 正在运行的配置文件
  • 保存的配置文件
    image
    使用VRP演示一个保存过程:
    image

常用的快速验证配置的命令:

命令 功能
display current-configuration 显示当前配置文件
display saved-configuration 显示保存的配置文件
display this 显示当前模式的配置内容

2.8.4 配置文件重置

<QYT-LAB>reset saved-configuration 
This will delete the configuration in the flash memory.

The device configuratio
ns will be erased to reconfigure.

Are you sure? (y/n)[n]:y
 Clear the configuration in the device successfully.
<QYT-LAB>

image

2.8.5 指定系统启动配置文件

<QYT-LAB>system-view 
Enter system view, return user view with Ctrl+Z.
[QYT-LAB]sysname Ender-LAB
[Ender-LAB]quit
<Ender-LAB>save ender.cfg
 Are you sure to save the configuration to ender.cfg? (y/n)[n]:y
 flash:/ender.cfg exists, overwrite? (y/n)[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
<Ender-LAB>dir
Directory of flash:/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-          1,132  Oct 08 2022 20:38:38   ender.cfg
    1  drw-              -  Oct 08 2022 20:19:16   test
    2  drw-              -  Oct 07 2022 10:03:37   dhcp
    3  -rw-        121,802  May 26 2014 09:20:58   portalpage.zip
    4  -rw-          2,263  Oct 08 2022 20:34:43   statemach.efs
    5  -rw-        828,482  May 26 2014 09:20:58   sslvpn.zip
    6  -rw-            205  Oct 08 2022 20:12:55   private-data.txt
    7  -rw-            120  Oct 08 2022 20:34:43   vrpcfg.zip

1,090,732 KB total (784,440 KB free)
<Ender-LAB>startup ?
  patch                Config patch file for system to startup
  saved-configuration  Config saved-configuration file for system to startup
  system-software      Config system software for system to startup
<Ender-LAB>startup saved-configuration ender.cfg
This operation will take several minutes, please wait.....
Info: Succeeded in setting the file for booting system
<Ender-LAB>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[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
<Ender-LAB>
posted @ 2022-10-08 20:45  xl4ng  阅读(680)  评论(0编辑  收藏  举报