Juniper‎ > ‎Junos Tutorial‎ > ‎

2. User Interface Options

posted 29 Sep 2013, 02:25 by Santosh Kumar

Junos offer two types of user interface Command Line Interface (CLI) & Web Based Graphical User Interface (GUI) which is well known as J-Web Interface

J-Web – J-Web is web based GUI that can be accessed via HTTP or HTTPS to perform most common configuration task, for complicated configurations J-Web allows you to directly edit configuration text file. J-Web is by default installed and enabled on most Junos Devices.

Junos CLI – Junos CLI is text based command shell which can be accessed from Out-of-Band (OoB) Serial console connection or in band access over network via telnet or SSH or most Junos devices offers OoB management Ethernet port as well.

·         CLI Basics

If a non-root user do login he will be placed in CLI automatically which can be identified by following prompt


when root user do login he will be placed into UNIX shell and then he need to run cli command to get into CLI prompt will be as follows


root@router% cli


if you are working as root user when you will exit from CLI you will get into UNIX shell again for security reason it’s highly recommended to exit from Shell as well by using exit command.

Junos CLI provides context-sensitive help so anywhere on the command line if you need help you can press “?” no need to press “Enter” or you can get topical help by using command help topic <topic> (for example user@router> help topic interface) or help reference <topic> command can be used to get command syntax related help  (for example user@router> help reference interface address)

Junos CLI offers command & Variable completion by Space or Tab key. Space can be used to complete command by default if you want to disable it you can use following command

user@router> set cli complete-on-space off

while tab key can used to complete system command & user defined variables or file name. In Junos CLI Pipe ( | ) can be used to manipulate output of any command. There are two modes of Junos CLI Operatinal Mode & Configuration Mode

·         Operational Mode

In Operational mode Monitoring and troubleshooting command can be used like monitor, Ping, show & traceroute. Operational mode prompt can be identified by “>” symbol


here commands can be executed in hierarchy mode for example

user@router> show ospf interface



·         Configuration  Mode

In Configuration Mode properties like Interface, Protocols, user access & System hardware properties can be configured. Configuration mode prompt can be identified by “#” symbol


If you are working in configuration mode changes you made will not take effect immediately it will be effective after committing those changes as Junos uses multiple configuration file. Currently active configurations are stored in active config file and when you enter in configuration mode it use to make copy of active config file and create candidate config file now whatever changes you make it’s getting stored in candidate config file when you use commit command then it will overwrite active config file with candidate config and chages will take effect otherwise if you exit without committing your changes then simply it will delete candidate config file and there will be no impact on device configuration or active config file. Junos used to maintain rollback config as well all your active configurations are stored in active file and when you enter in configuration mode it will create one temporary candidate config file and all chages are being stored in candidate config file but once you execute commit command your temporay candidate config is stored as active config file or rollback 0 and previous active config will be renamed as rollback 1 in this way junos use to remember 50 previous active config file which can be restored with rollback <0-49> command once you exceed this limit of 50 config file it will start deleting older config file.

Following commands can be used to enter in configuration mode

1.       user@router> configure


user@router> edit

it will create one candidate config and put you in configuration mode in this mode more than one user can be working in configuration mode and they can commit their changes.



2.       user@router> configure exclusive

it will give you exclusive access to config file and in this mode only you can commit changes used only for single user access to make changes in config file

3.       user@router> configure private

It will give a separate candidate config to each user working in private mode and they can commit chages as well but if two users are making competing changes then who ever will issue commit command his changes will be saved and other will get warning message for the same.

Just like operational mode in configuration mode also configuration statements are given in a hierarchical manner like


user@router# edit protocol ospf area 51

[edit protocol ospf area 51]


to move between levels you can use up, up <n> or top commands for example

[edit protocol ospf area 51]

user@router# up

[edit protocol ospf ]



[edit protocol ospf area 51]

user@router# up 2

[edit protocol ]



[edit protocol ospf area 51]

user@router# top

[edit ]


you can add configuration statement by set command or you can remove configuration statement by delete command and configuration statement can be replaced by rename command.