一、命令模式 1、命令模式 root@% shell模式(linux命令) root@% cli root> 操作模式 功能:监控和处理软件、网络连通性,路由、硬件问题 root> edit
Entering configuration mode

[edit] root# 配置模式 root> configure
Entering configuration mode

[edit] root# 配置模式 功能:配置路由器(接口、路由、用户、系统硬件参数)

root> configure ? Possible completions: <[Enter]> Execute this command exclusive Obtain exclusive lock (other users cannot make changes) private Work in private database (other's changes do not show) | Pipe through a command

如果有多人在操作设备时,可能会造成配置冲突,不一致,或被人篡改可以使用exclusive ,进行排他设备

root> configure #进入普通配置模式,多用户同时配置但会互相干扰,commit时会把其他用户的配置内容一起提交

root> configure exclusive #排他模式配置,其他用户无法配置

root> configure private #私有模式配置,各用户独立配置互不干扰(除非配置内容有冲突),commit只提交自己的配置内容,不会提交其他用户的配置内容

二、操作模式命令 root> ?
Possible completions: clear Clear information in the system #清除 configure Manipulate software configuration information file Perform file operations #文件 help Provide help information monitor Show real-time debugging information #监控(类似debug) mtrace Trace multicast path from source to receiver op Invoke an operation script ping Ping remote target quit Exit the management session request Make system-level requests #请求(软件升级、重启) restart Restart software process #重启进程 set Set CLI properties, date/time, craft interface message #设备些参数的(比如:命令行) show Show system information #查看 ssh Start secure shell on another host start Start shell telnet Telnet to another host test Perform diagnostic debugging traceroute Trace route to remote host #路由跟踪

三、查看方式介绍 [edit system login] tzq@R6# show |display set relative #把system login屏蔽 set user tzq uid 2005 set user tzq class super-user set user tzq authentication encrypted-password "$1$9L4p3HL8$mKu.tEHwU2Rl/zdxyQR/o0"

[edit system login] tzq@R6# show |display set Set system login user tzq uid 2005 Set system login user tzq class super-user Set system login user tzq authentication encrypted-password "$1$9L4p3HL8$mKu.tEHwU2Rl/zdxyQR/o0”

[editsystem login] tzq@R6# show   user tzq {    uid 2005;    classsuper-user;    authentication {   encrypted-password "$1$9L4p3HL8$mKu.tEHwU2Rl/zdxyQR/o0"; ## SECRET-DATA  } }