Juniper+CLI基本配置(小结)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CLI配置:

操作模式

进入和退出操作模式:

下面的例子显示了使用用户名root登陆到路由器进入到操作模式

login: root

Password:

Last login: Wed Nov 28 18:40:03 from 192.168.161.250

--- JUNOS 5.0R2.4 built 2001-09-25 02:34:13 UTC

root@52network>

Exit the operational mode by using the quit command:

root@52network> quit

52network (ttyd0)

login:

设置CLI:

1. set cli命令:

root@52network> set CLI ?

Possible completions:

complete-on-space Toggle word completion on space

idle-timeout Set the CLI maximum idle time

prompt Set the CLI command prompt string

restart-on-upgrade Set CLI to prompt for restart after a software upgrade screen-length Set number of lines on screen

screen-width Set number of characters on a line

terminal Set terminal type

2.set CLI complete-on-space

这个命令将允许自动完成命令,语法如下:

set CLI complete-on-space

例子:

root@52network> show p

^

'p' is ambiguous.

Possible completions:

pfe Show packet forwarding engine data

pim Show information about PIM

policy Show policy information

root@52network> show po

root@52network> show policy

3.set CLI idle-timeout

设置CLI会话空闲时的最大时间

语法:

set CLI idle-timeout (0-100000 minutes)

例子:

root@52network> set CLI idle-timeout 1

Idle timeout set to 1 minute

root@52network> Warning: session will be closed in 10 seconds if there is no activity

Idle timeout exceeded: closing session

4.set CLI prompt

设置cli会话操作模式下的提示符

语法:

set cli prompt

例子:

root@52network>set cli prompt newprompt

newprompt>

5.set CLI restart-on-upgrade

设置当软件更新完成,将提示去重新启动路由器,默认打开

语法:

set CLI restart-on-upgrade

6.set CLI screen-length and screen-width

设置cli屏幕长度和宽度

语法:

set CLI screen-length Number of lines on screen (0..100000) set CLI screen-width Number of characters on a line (0..100000) 例子:

root@52network> set CLI screen-length 2

Screen length set to 2

root@52network> set CLI screen-width 5

Screen width set to 5

7. set CLI terminal

设置路由器的终端类型

root@52network> set CLI terminal ?

Possible completions:

ansi ANSI-compatible terminal

small-xterm Small (24 line) xterm window

vt100 VT100-compatible terminal

xterm Large (65 line) xterm window

7. set date

设置时间

语法:

set date

例子:

root@52network> set date 200202171448.00

Sun Feb 17 14:48:00 UTC 2002

8. 操作模式中的基本操作:

Function Keyboard Sequence

Move cursor back one character Ctrl-b

Move cursor forward one character Ctrl-f

Move cursor to beginning of line Ctrl-a

Move cursor to end of line Ctrl-e

Delete character before the cursor Ctrl-h, Delete, Backspace Delete character the cursor is on Ctrl-d

Delete word before cursor Ctrl-w, Esc-Backspace, Alt-Backspace Insert most recently deleted text at the cursor Ctrl-y

Redraw the current line Ctrl-l

Scroll backward through history Ctrl-p

Scroll forward through history Ctrl-n

Search CLI history in reverse order Ctrl-r

Move cursor back one word Esc-b or Alt-b

Move cursor forward one word Esc-f or Alt-f

相关文档
最新文档