To simplify the use of the command line, the interface supports automatic command completion. This function is activated when the command is incomplete and the <Tab> character is entered.

Another function that helps to use the command line – context help. At any stage of entering a command, you can get a prompt about the following command elements by entering <?> character.

To simplify the commands, the whole command system has a hierarchical structure. There are special branch commands for transition between levels of the hierarchy. This allows to use brief commands on each level. To designate a current level where a user is located, the system prompt string changes dynamically.

Example:
esr> enable Enables the 15 privilege level
CODE
esr# configure Switch to the device configuration mode     
CODE
esr(config)# 	
esr(config)# exit return to the level above
esr#
CODE

For the ease of command line use, shortcut keys listed in the Table 1 are supported.

Table 1 – Description of CLI shortcut keys

Shortcut key

Description

Ctrl+D

In a nested command mode – exit to the previous command mode (exit command), in a root command mode – exit from CLI (logout command)

Ctrl+Z

Exit to a root command mode (top command)

Ctrl+A

Transition to the beginning of line

Ctrl+E

Transition to the end of line

Ctrl+U

Removal of characters to the left of a cursor

Ctrl+K

Removal of characters to the right of a cursor

Ctrl+С

Line clearing, command execution interruption

Ctrl+W

Removal of a word to the left of a cursor

Ctrl+B

Transition of a cursor one position backwards

Ctrl+F

Transition of a cursor one position ahead

Ctrl+L

Screen clearing

For ease of reading, page-by-page output of a wealth of information is added.

For example:

esr# show running-config
syslog max-files 3
syslog file-size 512
syslog file esr info
syslog console info
interface gigabitethernet 1/0/1
  ip address 10.100.14.1/24
exit
interface gigabitethernet 1/0/1.101
exit
interface gigabitethernet 1/0/2
  ip address 192.168.1.1/24
  ip address 10.100.100.2/24
exit
interface gigabitethernet 1/0/2.150
  ip address 10.150.150.2/24
exit
interface gigabitethernet 1/0/2.151
  ip address 10.151.151.15/24
exit
interface gigabitethernet 1/0/3
  ip address dhcp enable
exit
interface gigabitethernet 1/0/5.55
More? Enter – next line; Space – next page; Q – quit; R – show the rest.
CODE

To disable page-by-page output, use the following command:

esr# terminal datadump
CODE

Command line interface enables user authorization and restricts access to commands depending on their privilege level, provided by the administrator.

You can create a required amount of users in the system. The required privilege level is specified individually for each of them.

In factory configuration, the system includes one user with admin name and password password.

To provide the command interface security, the commands are distributed among 1, 10 and 15 privilege levels:

  • 1 level – only device monitoring is available;
  • 10 level – device configuration, excluding users creation, device reboot and firmware upload, is available;
  • 15 level – no restrictions.

To obtain 15 privilege level:

(esr)> enable
(esr)#
CODE

To return to the initial privilege level:

(esr)# disable
(esr)>
CODE

The system allows multiple users to connect to the device simultaneously.

You can use filtration to reduce the amount of data displayed as a response to user’s requests and to simplify the search of required information. To filtrate the information, add '|' character to the end of command line and use one of the filtration options:

– begin – display all information after the line containing the given pattern;

– include – display all lines containing the given pattern;

– exclude – display all lines not containing the given pattern.

The search pattern can be specified by a regular expression and can contain:

– List of characters. You can specify the list by placing the characters in square brackets '[]'. The matching will be checked by characters included in the list. If the first character of the list is '^', the matching will be checked by any character not included in the list. Examples:

  • [-az] - 'a', 'z' and '-';
  • [a-z] - all latin letters from 'a' to 'z'.

– Special characters:

  • ^ – beginning of a line;
  • $ – end of a line;
  • . – any character in a line;
  • * – zero or more times.

Displaying the «show running-config syslog» command without parameters:

esr# show running-config syslog
syslog max-files 3
syslog file-size 512
syslog file default info
CODE

Displaying the «show running-config syslog» command with the 'begin' parameter:

esr# show running-config syslog | begin file-size
syslog file-size 512
syslog file default info
CODE

Displaying the «show running-config syslog» command with the 'include' parameter:

esr# show running-config syslog | include file-size
syslog file-size 512
CODE

Displaying the «show running-config syslog» command with the 'exclude' parameter:

esr# show running-config syslog | exclude file-size
syslog max-files 3
syslog file default info
CODE

Examples of regular expressions usage:

esr# show interfaces status | include "^te.*"
te1/0/1         Up      Down    1500     a8:f9:4b:aa:05:d9
te1/0/2         Up      Down    1500     a8:f9:4b:aa:05:da
esr# show interfaces status | include "^gi1/0/1[2568]"
gi1/0/12        Up      Down    1500     a8:f9:4b:aa:05:cc
gi1/0/15        Up      Down    1500     a8:f9:4b:aa:05:cf
gi1/0/16        Up      Down    1500     a8:f9:4b:aa:05:d0
gi1/0/18        Up      Down    1500     a8:f9:4b:aa:05:d2
esr# show interfaces status | include "^[^tgI -]"
bridge 1        Up      Up      1500     a8:f9:4b:aa:05:c0
bridge 2        Up      Up      1500     a8:f9:4b:aa:05:c0
CODE