Logo

EcoRouter

EcoNAT

EcoQOE

EcoBypass

English

Command Line Interface EcoRouter Documentation / Command Line Interface

 

 

This section provides a general description of the command line interface EcoRouter, basic commands, keyboard shortcuts and access to help.

Connecting to the EcoRouter

You may connect to the router in the following ways:

  • via the console port;
  • via the Ethernet management port;
  • via the Ethernet line ports.

Username and password can be obtained upon request.

Console Port

Console port (usually the most left port 8P8C aka RJ45) has a standard pin layout compatible with the console and cables Cisco and other vendors. Port Configuration: 115200 8N1 No flow control.

Management Port (mgmt)

Management port - mgmt (usually left port in the group of embedded gigabit ethernet ports marked as MNG/GE0) has the default IP address 192.168.255.1/24. First set the address of the subnet 192.168.255.0/24 on the managed machine and use ssh or telnet protocol to access. The mgmt port address can be changed by the hw mgmt ip <address> command. Use the hw mgmt gw <address> command to configure the default mgmt network gateway.

Operation modes of the console

Command Line Interface (CLI) is the main EcoRouter interface for management and monitoring.
EcoRouter gives access to several levels of the command line. Each level is characterized by different groups of available commands.

Operation modes in EcoRouter are divided to: user view, administration and configuration.The table below describes the main modes and the command line prompt in these modes.

ModeDescriptionAccessThe command prompt
User mode

This mode allows one to view the current status of the device connections, and to use network tools

Connect to device
ecorouter>
Administration mode

The same commands are available as in the user mode, access to the operating system configure mode and the debug commands

Use the enable command in the command prompt and password (if set)

ecorouter#
Configuration modeIn configuration mode one can modify and specify settings that affect the device operation

Use the configure terminal command in administration mode

ecorouter(config)#
Context configuration modeIn configuration mode some structures have several level configuration. Using or creating such a structure user enters into the context configuration mode. User can configuer device's parameters in rhis mode.Use specific commands in configuration mode
ecorouter(config-КОНТЕКСТ)#

When you log on to the device the user is in view mode and see a prompt like this ecorouter>.

To switch to administration mode, you must enter the enable command, and then the command prompt will now look like ecorouter#. To exit administration mode, enter the disable command. 

To switch to configuration mode, you must enter the configure terminal command. And then the command prompt will look like ecorouter(config)#. To exit configuration mode or to exit from any sublevel of configuration use the exit command.

EcoRouterOS version 3.0.0 EcoRouter 04/01/16 17:28:12
ecorouter>enable
ecorouter#configuration terminal
Enter configuration commands, one per line.  End with CNTL/Z.
ecorouter(config)#interface e3
ecorouter(config-if)#exit
ecorouter(config)#exit
ecorouter#

To close an active session with the device enter the logout command from the view mode.

ecorouter>logout 

In the case of closed session or lost connection all unsaved changes in the edited configuration will be lost.

Most configuration commands can be undone using the prefix no. To enable the command, you need to enter it again without the prefix no. For example, to delete the new interface use no interface e1 command, to recreate it you have to enter the interface e1 command.

Access to the command line interface

By default an access to the device's command line is carried out only via the console and management port. For the access to the serial port by Telnet or SSH protocol the secure profiles must be configured (see the section Security profiles). SSH access is disabled in VRF by default. Execute command transport input ssh in the vrf configuration mode to enable it.

In the EcoRouter's CLI the console port marked as a specialized line "con 0". In the configuration mode use the  line console 0 command to configure it.

The device supports up to 872 simultaneous Telnet and SSH protocol sessions via management and serial ports which called virtual lines (vty) and enumbered from 0 to 871.

In the configuration mode use the line vty <NUM | RANGE> command to configure access to serial ports where NUM is a specific line number, RANGE is line number range (the values must be separated by spaces). This command enables the virtual line configuration mode. The further configuration will be used both for Telnet and for SSH sessions.

The line vty 0 871 command indicates to the router that following configuration will affect to the all 872 virtual lines. The line vty 7 command configures only the 7th line.

In the configuration mode and in the console and virtual line configuration mode the following commands are available:

Command

Description

exec-timeout <0-35791> <0-2147483>

Timeout interval. If there no actions in this virtual session during this period on the virtual line (console) were taken the system automatically ends session with a message "User is logged out by timeout" or "Vty connection is timed out". To resume session the user must re-enter his login and password.

The first parameter is the number of minutes, the second one (if needed) is the number of seconds separated by space. If 0 is specified the router will not disconnect users from the specific line ever. The default timeout value is 10 minutes

history max <0-2147483647>

Number of commands to be stored in command buffer. The buffer is available by clicking the up arrow button «↑». The default value is maximum possible

In the administration mode use the show users command to see information about the connected users (this command is available only for users with the admin role).

See the example of information about connected users below:

     Line      User                Logged     Location     PID      
  0  con 0     admin               00:00:03   ttyS0        1701    
 130 vty 0     admin               00:14:08   pts/0        1506    
 131 vty 1     admin               00:00:18   pts/1        1685

The columns are following:

"Line" represents the line names,

"User" represents name of logged user,

"Logged" represents duration of the connection,

"Location" represents the inner line identifier,

"PID" represents process's ID.

Password to access to administration mode

It is possible to set a password to access to administration mode in EcoRouter by the enable password command. In the configuration mode use the enable password <PASS> command to specify the password directly. The password must consist of latin letters and digits. Password's maximum length is 8 symbols. The password must start with a letter. By default this password will be stored into router's configuration in plain text.

Use the enable password 8 <hash> command to create an encrypted password in a hash form to access to administration mode where hash is already encrypted by DES algorithm (in Base64 format) password string.

In the configuration mode use the no enable password command to remove password (without specifying the password).

The password can be stored encrypted in EcoRouter. The encrypted by DES encrypting algorithm password is stored in the configuration file in form of DES-hash.

In the configuration mode use the service password-encryption command to enable an automatic password encryption. After this command is executed the password stored in configuration file will be encrypted. The password created later will be encrypted in the same way too. The command disables the automative encryption mode but does not decrypt the password which is already created.

ecorouter>enable 

Password: 
ecorouter#

Configuration saving

The commands in the configuration mode make changes to the current configuration. Configuration changes take effect after each pressing [Enter] after entering the correct command. These changes are not saved in the startup configuration file as long as the write command is entered. If the write command was not given, after the device is reset, the current changes will be discarded and will not be used.

Write command has several parameters:

  • write file or write memory – save the current configuration to a file;
  • write terminal – print the current configuration on the screen, the analog of show running-config command.

ecorouter#write ?
 file      Write to file
 memory    Write to NV memory
 terminal  Write to terminal

Hints and hotkeys

Command syntax help is available in any mode. To see the list of all available commands, enter a question mark [?] at the command prompt. Commands will be listed in alphabetical order.

ecorouter#?
Exec commands:
  arp          IP ARP table
  clear        Reset functions
  configure    Enter configuration mode
  copy         Copy from one file to another
  debug        Debugging functions (see also 'undebug')
  develop      Debug command
  disable      Turn off privileged mode command
  enable       Turn on privileged mode command

To see a list of all available commands that begin with a certain letter, enter the beginning of the word and the question mark.

ecorouter#co?
 configure  Enter configuration mode
 copy       Copy from one file to another

To see a list of existing parameters for the command, enter a question mark after the command.

ecorouter#configure?
 terminal  Configure from the terminal

You can also specify commands according to the initial letters. The number of starting letters of the command must be sufficient to distinguish one command from another. For example, the short entry for the "show" command will be sh. With such type of records, you can also supplement the command with the first letters of the word by pressing [Tab] on the keyboard.

An indication of successfully executed command is a command-line prompt. If the command was not accepted, an error message appears.

At any time, you can use the hints and hotkeys listed in the table below. 


 

Command/key combination

Action

 ?

It displays a list of commands and/or arguments that are available in the current context, as well as tips for their intended purpose

<part of command>?

Shows the list of commands with the same beginning

<part of command>[TAB]

Attempts to perform auto-complete

Arrow up [↑]

Return to the previously entered command (history)

Arrow down [↓]

Return to the command entered later (history)

Show commands

Different variations of the show command can be used for viewing information. Syntax:

show < object to view> <object name >

This representation of the show command operates in administrative mode. For the configuration mode, there should be the prefix do before the command:

do show < object to view> <object name >

Example:

ecorouter(config)#do show interface e1
Interface e1[15] is up, line protocol is up
 Type: KNI
 HW address 0000.abe1.b507

To view the entire configuration, use the command show running-config in administrative or configuration mode.

For ease of display output to the console in EcoRouterOS supported filters realized by means of so-called «modifiers». Modifiers are entered after the command using the symbol ‘|’ (called «pipe»):

< command view> | <modifier> <attribute filtering >

Supported modifiers are described in the table below. 


 

Command

Description

include

Prints lines including a specified character or group of characters

exclude

Prints lines excluding a specified character or group of characters

begin

Prints lines beginning with a specified character or group of characters

redirect

Sends the output of the command to the specified file

For example, let see the operation of modifiers.

The command output with the status of all available interfaces:

ecorouter#show interface brief 
Interface        Status           Protocol         Description
---------------------------------------------------------------
qq1              up               up               
89               up               up               
t34              up               up               
6                up               up               
e3               up               up  

The output of the command only with interfaces, the title of which contains the number 3:

ecorouter#show interface brief | include 3
t34              up               up               
e3               up               up

The output of the command only with interfaces, the title of which does not contains the number 3:

ecorouter#show interface brief | exclude 3
Interface        Status           Protocol         Description
---------------------------------------------------------------
qq1              up               up               
89               up               up               
6                up               up              

The output of the command only with interfaces, the title of which begins with the number 8:

ecorouter#show interface brief | begin 8
Interface        Status           Protocol         Description
---------------------------------------------------------------   
89               up               up         

To send the output of the command to be stored in the specified file, you should enter:

ecorouter#show interface brief | redirect Text1.log

or (the short form of the redirect expression):

ecorouter#show interface brief > Text1.log

Using the ping command

The ping command is a common way of finding faults in networks. The command uses the ICMP protocol to send a series of echo packets to determine whether the remote equipment is active, to determine the time of delay in the transmission, and to determine the presence of packet loss. This utility only works from the administration mode.

The standard version of the utility:
General view of the command:

ecorouter#ping xx.xx.xx.xx
ecorouter#ping ip xx.xx.xx.xx
ecorouter#ping mgmt xx.xx.xx.xx

Use ping mgmt for pinging throught the management port.

Output example:

ecorouter#ping ip 10.10.10.2 
PING 10.10.10.2 (10.10.10.2) 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from 10.10.10.2: icmp_seq=2 ttl=64 time=0.016 ms
...
64 bytes from 10.10.10.2: icmp_seq=9 ttl=64 time=0.015 ms

--- 10.10.10.2 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 8004ms
rtt min/avg/max/mdev = 0.015/0.018/0.023/0.005 ms

After running the utility in this way, runs the endless ping. It will continue until the administrator stops it. To abort command, you should use the shortcut [Ctrl + z] or [Ctrl + c].

Extended version of the ping utility provides additional opportunities for diagnosis. For example, changing the size of sent packet or you can specify an alternate output interface.

To run the extended version in the command prompt, enter the ping command and press [Enter] on the keyboard. At the command prompt, you are prompted to enter the following argument, after which you have to press [Enter]. Thus it will be asked to fill in all arguments fields of the utility. The table below is a description of required and optional arguments to fill.

Field

Description

Protocol [ip]:

Request supported Protocol. Default - IP

Target IP address:

Destination IP-address request. If the supported protocol specified no IP Protocol, enter the appropriate address for the specified Protocol. Not used by default

Name of the VRF :

The request to specify the name of the VRF from which you will be pinging. Not used by default

Repeat count [5]:

The number of ping-packets to the destination address. By default – 5

Datagram size [100]:

Ping-packet size (in bytes). By default - 100 bytes

Timeout in seconds [2]:

Timeout interval. By default: 2 seconds. "ICMP-echo" request is considered successful only if the ECHO-REPLY packet is received before that time period

Extended commands [n]:

Indicates the appearance or absence of additional commands. Not used by default

Broadcast [n]:

Indicates that the target ip-address is the broadcast. Not used by default

 

General view of execution of ping with extended options:

ecorouter#ping 
Protocol [ip]: ip

The address that you want to check:

Target IP address: 192.168.2.2
Name of the VRF : 
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Broadcast [n]:
PING 192.168.2.2 (192.168.2.2) 100(128) bytes of data.
108 bytes from 192.168.2.2: icmp_seq=1 ttl=254 time=26.9 ms
108 bytes from 192.168.2.2: icmp_seq=2 ttl=254 time=30.9 ms
108 bytes from 192.168.2.2: icmp_seq=3 ttl=254 time=26.0 ms
108 bytes from 192.168.2.2: icmp_seq=4 ttl=254 time=29.9 ms
108 bytes from 192.168.2.2: icmp_seq=5 ttl=254 time=24.0 ms

--- 192.168.2.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 24.001/27.606/30.998/2.571 ms

The command completed successfully.

Traceroute command

The traceroute command is used to discover the routes of following the packet to the remote device addresses, and points of routing violations. This utility only works from the administration mode.

Utility sends three test UDP (User Datagram Protocol) packet to each of the intermediate nodes through which the route to a remote host occurs. The utility limits the time of passing the test package through the route, using the parameter Time to live (TTL). With TTL determines the number of transitions that need to make a packet to reach the destination network. TTL parameter is incremented by 1 as long as the packet can not reach the remote host, or TTL parameter reaches its maximum value equal to 30.

General view of traceroute command:

ecorouter#traceroute xx.xx.xx.xx

General output of traceroute command:

ecorouter#traceroute 192.168.2.2 
traceroute to 192.168.2.2 (192.168.2.2), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 11.955 ms 11.945 ms 11.941 ms
2 192.168.2.2 (192.168.2.2) 22.933 ms 22.929 ms 22.927 ms
ecorouter#

In this output we can see that there is only two routers to the destination from the device where the command was performed.

Advanced traceroute utility features.

To start the extended version in the command prompt, enter the traceroute command and press [Enter] on the keyboard. You are prompted to enter the following command-line argument, after which you need to press [Enter]. Thus, it will be asked to fill in all fields utility parameters. The list below is a description of required and optional parameters to fill.

 

Field

Description

Protocol [ip]:

Supported protocol request. By default - IP

Target IP address:

You have to specify the host name or IP address. No default value

Source address:

IP address of the router that will be used as the sender for testing. Not used by default

Name of the VRF :

The request to specify the name of the VRF from which you will be tracing. Not used by default

Numeric display [n]:

By default, there is both symbolic and numeric display; However, you can cancel the symbolic display

Timeout in seconds [2]:

Number of seconds to wait for the answer to a test package. By default – 2 seconds

Probe count [3]:

Number of test packages that you want to send at each level TTL. By default – 3

Maximum time to live [30]:

Maximum TTL value, that may be used. By default – 30. The traceroute command terminates when reaching the destination point or the value

Port Number [33434]:

Destination port, used by test messages UDP. By default – 33434

 

Example:

ecorouter>enable
ecorouter#traceroute  
Protocol [ip]: ip

Address to which you are tracing.

Target IP address: 192.168.2.2 
Source address: 10.10.10.1
Name of the VRF :
Numeric display [n]:
Timeout in seconds [2]:
Probe count [3]:
Maximum time to live [30]:
Port Number [33434]:
traceroute to 192.168.2.2 (192.168.2.2), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 4.919 ms 4.908 ms 4.904 ms
2 192.168.2.2 (192.168.2.2) 25.902 ms 25.899 ms 25.896 ms

Tracing successfully completed.

ecorouter#

Welcome message (banner motd)

The welcome message (so called banner or message of the day(motd)) shown after entering EcoRouter's CLI can be configured. The welcome message is a text string which can be edited by user. In the configuration mode use the banner motd {<text> | default} command where default is the default message. The default message is a string which contains information about current installed EcoRouterOS version.

In the user mode use the show banner motd command to show the current welcome message.

Use the no banner motd command to delete the welcome message.

Use the command banner motd <text> to specify the text of the welcome message.

See the example of specifying the welcome message "Hello, World!!!" below.

ecorouter login: test
Password: example
 
User Access Verification
 
ecorouter>enable
Password: test
ecorouter#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
ecorouter(config)#banner motd Hello, World!!!
ecorouter(config)#exit
ecorouter#exit

The new welcome message will be shown after the next successful authentication. See the example of deleting user welcome message and return to the default settings.

ecorouter login: test
Password: example
 
User Access Verification
 
Hello, World!!!
ecorouter>enable
Password: test
ecorouter#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
ecorouter(config)#no banner motd
ecorouter(config)#exit
ecorouter#exit
ecorouter login: test
Password: example
 
User Access Verification
 
 
ecorouter>enable
Password: test
ecorouter#conf terminal
Enter configuration commands, one per line.  End with CNTL/Z.
ecorouter(config)#banner motd default
ecorouter(config)#exit
ecorouter#exit
ecorouter login: test
Password: example
 
User Access Verification
 
EcoRouterOS version 3.2.0 EcoRouter 06/21/16 09:20:13
ecorouter>