CLI Introduction

CLI Introduction

Quiz Pagehttps://networkdirection.net/labsandquizzes/quizzes/juniper-jncia/cli-introduction

Lab Pagehttps://networkdirection.net/labsandquizzes/labs/jncia-labs/cli-introduction/

Notes

All Juniper devices run the Junos operating system. Like any network operating system, this includes a CLI (SSH, Telnet), web interface, and automation options.

Junos is based on either FreeBSD, or a customised version of Linux, depending on the Junos version.

The Junos CLU has two modes; Operational, which has the ‘>’ character as the prompt, and Configuration, which has the ‘#’ as the prompt.

The configuration itself is organised into a hierarchy. This is a tree structure, which in a sense is like a file system containing files. All configuration items are grouped into areas.

This configuration method may appear intimidating at first, as it looks a bit like a programming language. However, it’s really not difficult.

Config groups are contained within curly braces. Configuration items end with a semi-colon.

We can navigate around the hierarchy using commands like editup, and top.

As with most CLI’s, we have options like ‘?’ to show us commands, tab completion for commands and variables, and space complete for commands.

Changes are not applied immediately. They need to be committed.

Command Summary

Command Mode Description
configure operational Enter configuration mode
help operational Bring up the help menu
help reference operational Lookup a command
help apropos operational Search for commands
help tip cli operational Get tips
help topic operational Get information on features and configuration tasks
set cli complete-on-space off operational Disable space complete
start shell operational Enter the FreeBSD/Linux Shell
exit shell Exit the shell
show configuration operational Show the configuration
show configuration Show the configuration
| match either Filter output for this text
| except either Filter output (remove lines with this text)
| No-more either Do not paginate output
| find VALUE
either Start where a match is found (like ‘begin’ in IOS)
| resolve either Convert IP’s to names
| trim either Trim columns from each line
| match “val-1|val-2|val-3” either Perform an OR search within match
run configuration Run an operational mode command from configuration mode
edit configuration Move around the configuration hierarchy
up configuration Move up a hierarchy level
top configuration Move to the top of the hierarchy
set configuration Add configuration
delete configuration Remove configuration
Set cli screen-length
operational Set cli screen-length
Set cli screen width operational Set cli screen width
commit configuration Apply configuration

Keyboard Shortcuts

Ctrl-U erases the entire command you’ve been typing

Ctrl-W erases word by word

Ctrl-A moves to the start of the line

Ctrl-E moves to the end

Alt-B move back one word

Alt-F move forward one word

Ctrl-K Delete from the cursor to the end of the line

Ctrl-L Redraw the current line

Ctrl-P / N Repeat previous or next command in the history

Additional References

JunOS Evolvedhttps://www.juniper.net/documentation/en_US/junos/topics/concept/evo-overview.htm

Leave a Reply