本文共 3998 字,大约阅读时间需要 13 分钟。
router (ttyu0)login: userPassword:--- JUNOS 11.1R1.10 built 2011-03-16 08:20:26 UTCuser@router>
登录之后可以进到两个模式中去,一个是 用户模式
,另外一个是配置模式
。
用户模式
:执行操作模式命令来监视和控制运行Junos的设备的操作。
配置模式
:一般用于操作交换机的业务。
用户模式
原意是operational mode
,所以用户模式
也可以被叫做操作模式
。
输入cli
进入用户模式:
router (ttyu0)login: rootPassword:--- JUNOS 11.1R1.10 built 2011-03-16 08:20:26 UTCroot@router% cliroot@router>
在用户模式下,输入configuration
进入配置模式
router (ttyu0)login: rootPassword:--- JUNOS 11.1R1.10 built 2011-03-16 08:20:26 UTCroot@router% cliroot@router> confroot@router#
当显示
>
时为用户模式当显示
#
时为配置模式
当你敲命令的时候,不知道有那些参数时,可以尝试在命令后面空格然后键入?
user@router> ?Possible completions: clear Clear information in the system configure Manipulate software configuration information file Perform file operations help Provide help information . . .
或者是
user@router> clear ?Possible completions: amt Show AMT Protocol information arp Clear address resolution information auto-configuration Clear auto-configuration action bfd Clear Bidirectional Forwarding Detection information . . .
你也可以输入 help topic
来提供完整的帮助文档
user@router> help topic interfaces ?Possible completions: accept-data Accept packets destined for virtual address accept-source-mac Policers for specific source MAC addresses access-profile-chap CHAP profile associated with physical interface accounting Packet counting for transit traffic accounting-profile Accounting profile acfc Compression of Address and Control fields in PPP header ...
或者是
user@router> help topic interfaces address Configuring the Interface Address You assign an address to an interface by specifying the address when configuring the protocol family. For the inet family, configure the interface's IP address. For the iso family, configure one or more addresses for the loopback interface. For the ccc, tcc, mpls, tnp, and vpls families, you never configure an address. ...
当你遇到一些语法问题时,可以尝试输入help reference
user@router> help reference interfaces address address Syntax address address { arp ip-address (mac | multicast-mac) mac-address; broadcast address; ... Hierarchy Level [edit interfaces interface-name unit logical-unit-number family family], [edit logical-routers logical-router-name interfaces interface-name unit logical-unit-number family family]...
使用Space来完成你的命令
shSpaceow iSpace
user@router> show i 'i' is ambiguous.Possible completions: iccp Show Inter Chassis Control Protocol... igmp Show Internet Group Management Protocol... igmp-snooping Show IGMP snooping information interfaces Show interface information ipv6 Show IP version 6 information isdn Show Integrated Services Digital isis Show Intermediate System-to-Intermediate...user@router> show i
使用Tab来补全命令
show policy-statement tTabhis-is-my-policy
then accept;[edit policy-options]user@router# show policy-statement this-is-my-policy then accept;[edit policy-options]user@router#
利用管道符可以过滤一些信息,从而控制输出
user@router> show route | ?Possible completions: count Count occurrences display Show additional kinds of information except Show only text that does not match a pattern find Search for first occurrence of pattern hold Hold text without exiting the --More-- prompt last Display end of output only match Show only text that matches a pattern no-more Don't paginate output request Make system-level requests resolve Resolve IP addresses save Save output text to file trim Trim specified number of columns from start of line
转载地址:http://vqugn.baihongyu.com/