Here is some basic CLI info in JUNOS.

  • Connect to the Juniper router using roll-over cable.
  • Default login username/password is root/ <empty>
  • Unix Shell (C shell) – %
  • Bourne shell – $
  • Operational mode –  “>”
  • Configuration mode – “#”
  • Space bar or tab completes a command. “?” shows all available options.
  • To login to CLI from any shell, use “cli” command.
  • Use “run” command to execute operational mode command from configuration mode. Similar to “do” command in cisco.
  • Doesn’t use a keywork “ip”. Hence “show ip route” in cisco is equivalent to “show route” in junos
  • Command Set;
admin@juniper> ?
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
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
admin@juniper> configure
Entering configuration mode
The configuration has been changed but not committed
admin@juniper# ?
Possible completions:
<[Enter]>            Execute this command
activate             Remove the inactive tag from a statement
annotate             Annotate the statement with a comment
commit               Commit current set of changes
copy                 Copy a statement
deactivate           Add the inactive tag to a statement
delete               Delete a data element
edit                 Edit a sub-element
exit                 Exit from this level
help                 Provide help information
insert               Insert a new ordered data element
load                 Load configuration from ASCII file
quit                 Quit from this level
rename               Rename a statement
replace              Replace character string in configuration
rollback             Roll back to previous committed configuration
run                  Run an operational-mode command
save                 Save configuration to ASCII file
set                  Set a parameter
show                 Show a parameter
status               Show users currently editing configuration
top                  Exit to top level of configuration
up                   Exit one level of configuration
wildcard             Wildcard operations
  • Onboard documentation;
    • help apropos;
      • Used when we know a part of a command. It searches entire set of CLI tree.
    • help topic;
      • About usage guidelines of a command.
    • help reference;
      • Similar to CLI guide. Gives synax information about a command.
    • help tip cli;
      • Gives random cli tips.
  • “set cli screen-length” to set the number of display lines. “| no-more” displays continuously.
  • “File” commands; (operational mode command)
    • file list
    • file compare/copy/rename/show
  • To restart a module (ospf/l2/bgp) or a hardware component, use “restart” command. [Operational mode command]
  • To reboot, upgrade, and shutting down device, use “request” CLI tree.[O]
  • “show tech” == “request support information” [O]
  • After “commit/commit confirmed”, the candidate configuration will be copied to active configuration which is stored in “/config/juniper.conf.gz”. Previous active file will be renamed to “/config/juniper.conf.1.gz”
  • Junos can save upto 49 previous active configurations. To rollback “rollback [0-49]” command. 0 to 3 held in “/config”.  4 to 49 will be held in “/var/db/config”.
  • Entering configuration mode;
    • Standard – candidate file shared by all users.
    • Exclusive – candidate file only available to only one user. Locked for others. When exited without commit, changes will be discarded.
    • Private – a private copy of candidate file will be created. “commit” will only commit the changes made by private user.
  • “show” command – to view candidate file. “run show configuration” shows the active(running)
  • Four navigation commands in configuration mode: “up, top,edit(same as “cd”) and exit”
  • To configure in candidate file, use “set” command. To delete a command in candidate file, use “delete” command.
  • To comment on a configuration use “annotates” command.
  • To check changes between candidate and active configuration, use “show | compare”.
  • “commit confirmed x”, the committed configuration will be rolled back after “x” mins, if not confirmed using “commit” command.
  • “commit at x” – we can schedule the commit. To clear use “clear system commit”
  • “deactivate/activate” commands to ignore/add a configuration part in commitment.
  • “copy <obj1> to <obj2>”. To copy a config from one interface to another.
  • “rename <obj1> to <obj2>”. To rename a policy name, ip address etc. Equivalent to “delete” and then “set”.
  • Source:

This entry was posted in Junos and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s