[Contents] [Prev] [Next] [Index] [Report an Error]

Switching Between JUNOS CLI Operational and Configuration Modes

When you monitor and configure a JUNOS device, you may need to switch between operational mode and configuration mode. When you change to configuration mode, the command prompt also changes. The operational mode prompt is a right angle bracket (>) and the configuration mode prompt is a pound sign (#).

To switch between operational mode and configuration mode:

  1. When you log in to the router and type the cli command, you are automatically in operational mode:
    ---  JUNOS 9.2B1.8 built 2008-05-09 23:41:29 UTC
    % cli
    user@host> 
  2. To enter configuration mode, type the configure command or the edit command from the CLI operation mode. For example:
    user@host> configure 
    Entering configuration mode
    
    [edit]
    user@host# 

    The CLI prompt changes from user@host> to user@host# and a banner appears to indicate the hierarchy level.

  3. You can return to operational mode in one of the following ways:

    When you exit configuration mode, the CLI prompt changes from user@host# to user@host> and the banner no longer appears. You can enter or exit configuration mode as many times as you wish without committing your changes.

  4. To display the output of an operational mode command, such as show, while in configuration mode, issue the run configuration mode command and then specify the operational mode command:
    [edit]
    user@host# run operational-mode-command

    For example, to display the currently set priority value of the Virtual Router Redundancy Protocol (VRRP) primary router while you are modifying the VRRP configuration for a backup router:

    [edit interfaces xe-4/2/0 unit 0 family inet vrrp-group 27]
    user@host# show
    virtual-address [ 192.168.1.15 ];
    [edit interfaces xe-4/2/0 unit 0 family inet vrrp-group 27]
    user@host# run show vrrp detail
    Physical interface: xe-5/2/0, Unit: 0, Address: 192.168.29.10/24
    Interface state: up, Group: 10, State: backup
    Priority: 190, Advertisement interval: 3, Authentication type: simple
    Preempt: yes, VIP count: 1, VIP: 192.168.29.55
    Dead timer: 8.326, Master priority: 201, Master router: 192.168.29.254
    [edit interfaces xe-4/2/0 unit 0 family inet vrrp-group 27]
    user@host# set priority ...

Related Topics


[Contents] [Prev] [Next] [Index] [Report an Error]