NVIDIA MLNX-GW User Manual for NVIDIA Skyway Appliance v8.1.1002

Command Line Interface (CLI)

MLNX-GW is equipped with an industry-standard command line interface (CLI). The CLI is accessed through SSH or Telnet sessions or directly through the console port on the front panel, if it exists.

The CLI can be in one of various modes. Each of the modes makes available a certain group (or level) of commands for execution. The following are some of the CLI configuration modes:

Configuration Mode



When the CLI is launched, it begins in Standard mode. This is the most restrictive mode and only has commands to query a restricted set of state information. Users cannot take any actions that directly affect the system, nor can they change any configuration.


The "enable" command moves the user to Enable mode. This mode offers commands to view all state information and take actions, such as rebooting the system, but it does not allow any configurations to be changed. The commands accessible in this mode are a superset of those in Standard mode.


The "configure terminal" command moves the user from Enable mode to Config mode. Config mode is allowed only for user accounts with the “admin” role or capabilities. This mode has a full, unrestricted set of commands to view anything, take any action, and change any configuration. Its commands are a superset of those in Enable mode. To return to Enable mode, enter the command "exit" or "no configure".

Note that moving directly between Standard and Config mode is not possible.

Config interface management

Config Interface Management mode is a configuration mode for management interface mgmt0, mgmt1, and loopback.

Any command mode

Several commands, such as “show” commands, can be applied within any context.

To help identify the different parts of a CLI command, the following table explains conventions of presenting the syntax of commands.

Syntax Convention



< > Angled brackets

Indicate a value/variable that must be replaced.

<1...65535> or <interface>

[ ] Square brackets

Indicate optional parameters. Only one parameter out of the parameters listed with in the brackets can be used—the user cannot have a combination of the parameters unless stated otherwise.

[destination-ip | destination-port | destination-mac]

{ } Braces

Indicate alternatives or variables that are required for the parameter in square brackets.

[mode {active | on | passive}]

| Vertical bars

Identify mutually exclusive choices.

active | on | passive


Do not use the angled or square brackets, vertical bar, or braces in command lines. This guide uses these symbols only to show the different entry types.


CLI commands and options are in lowercase and are case-sensitive.
For example, when entering the enable command, "enable" must be all in lowercase; it cannot be ENABLE or Enable. Text entries created are also case-sensitive.

Context-sensitive help may be requested at any time by pressing “?” in the command line. This will show a list of choices for the word that is currently selected or, if nothing has been typed yet, will show a list of top-level commands.
For example, typing "?" in the command line in Standard mode, will provide a link of the following available commands.


gateway > ? cli Configure CLI shell options enable Enter enable mode exit Log out of the CLI help View description of the interactive help system no Negate or clear certain configuration options show Display system configuration or statistics slogin Log into another system securely using ssh gateway Configure gateway on system telnet Log into another system using telnet terminal Set terminal parameters traceroute Trace the route packets take to a destination gateway >

Typing a legal string and then pressing “?” without a space character before it, will provide either a description of the command that was typed so far or the possible command/parameter completions. Typing “?” after a space character and “<cr>” is shown, means that, so far, a complete command has been typed. Pressing Enter (carriage return) will execute the command.

Try the following, to get started:


? show ? show c? show clock? show clock ? show interfaces ? (from enable mode)

Enter “help” to view a description of the interactive help system.
Note also that the CLI supports command and/or parameter tab-completions and their shortened forms. For example, you can enter “en” instead of the “enable” command, or “cli cl” instead of “cli clear-history”. In case of ambiguity (in case more than one completion option is a vailable), press Tabs twice to obtain the disambiguation options. Thus, to learn which commands start with the letter “c”, type “c” and click twice on the Tab key to get the following:


gateway # c<tab> clear cli configure gateway # c

This signifies that there are three commands that start with the letter “c”: "clear", "cli", and "configure".

The prompt always begins with the hostname of the system. What follows depends on what command mode the user is in. To demonstrate by example, assuming the machine name is “gateway”, the prompts for each of the modes are:


gateway > (Standard mode) gateway # (Enable mode) gateway (config) # (Config mode)

The following session shows how to move between command modes:


gateway > (You start in Standard mode) gateway > enable (Move to Enable mode) gateway # (You are in Enable mode) gateway # configure terminal (Move to Config mode) gateway (config) # (You are in Config mode) gateway (config) # exit (Exit Config mode) gateway # (You are back in Enable mode) gateway # disable (Exit Enable mode) gateway > (You are back in Standard mode)

Commands entered do not print any response and simply show the command prompt after pressing <Enter>.

If an error is encountered while executing a command, the response will begin with “%”, followed by a description of the error.

Several Config commands use the “no” form of the command to reset a parameter value to its inherited, or default, value.

The command sequence below performs the following:

  1. Displays the current CLI session option.

  2. Disables auto-logout.

  3. Displays the new CLI session options (auto-logout is disabled).

  4. Re-enables auto-logout (after 15 minutes).

  5. Displays the final CLI session options (auto-logout is enabled).


    // 1. Display the current CLI session options gateway (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: 15 minutes Paging: enabled Progress tracking: enabled Prefix modes: enabled ... // 2. Disable auto-logout gateway (config) # no cli session auto-logout // 3. Display the new CLI session options gateway (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: disabled Paging: enabled Progress tracking: enabled Prefix modes: enabled ... // 4. Re-enable auto-logout after 15 minutes gateway (config) # cli session auto-logout 15 // 5. Display the final CLI session options gateway (config) # show cli CLI current session settings: Maximum line size: 8192 Terminal width: 157 columns Terminal length: 60 rows Terminal type: xterm Auto-logout: 15 minutes Paging: enabled Progress tracking: enabled Prefix modes: enabled ...

This page provides a key to the meaning and format of angle-bracketed parameters in the commands that are listed in this document.




A domain name


A hostname (e.g., “gateway-1”)


An interface name (e.g., “mgmt0”, “mgmt1”, “lo” (loopback), and so forth).


A number to be associated with aliased (secondary) IP addresses.

<IP address>

An IPv4 address (e.g., "")

<log level>

A syslog logging severity level. Possible values, from least to most severe, are as follows: “debug”, “info”, “notice”, “warning”, “error”, “crit”, “alert”, “emerg”.


Globally unique identifier. A number that uniquely identifies a device or component.

<MAC address>

A MAC address. The segments may be 8 bits or 16 bits at a time, and may be delimited by “:” or “.” (e.g., “11:22:33:44:55:66”, “1122:3344:5566”, “”, or “1122.3344.5566”).


A netmask (e.g., “”) or mask length prefixed with a slash (e.g., “/24”). Both examples express the same information in different formats.

<network prefix>

An IPv4 network prefix specifying a network. Used in conjunction with a netmask to determine which bits are significant. e.g., “”.

<regular expression>

An extended regular expression as defined by the “grep” in the main page. (The value provided here is passed on to “grep -E”.)

<node id>

ID of a node belonging to a cluster. This is a numerical value greater than zero.

<cluster id>

A string specifying the name of a cluster.


TCP/UDP port number.

<TCP port>

A TCP port number in the full allowable range [0...65535].


A normal URL, using any protocol that wget supports, including HTTP, HTTPS, FTP, SFTP, and TFTP or a pseudo-URL specifying an scp file transfer. The scp pseudo-URL format is scp://username:password@hostname/path/filename.

Note that the path is an absolute path. Paths relative to the user's home directory are not currently supported. Because the implementation of FTP does not support authentication, use SCP or SFTP for that.

Note also that omitting “:password” part, may require entering the password in a follow-up prompt, where it can be typed in securely (without the characters being echoed). This prompt will occur if the “cli default prompt empty-password” setting is true; otherwise, the CLI will assume that no password is desired. Including the “:” character, will be taken as an explicit declaration that the password is empty and no prompt will appear.

CLI Filtration Options “include” and “exclude”

The MLNX-GWNVOS CLI supports filtering “show” commands to display lines containing or excluding certain phrases or characters. To filter the outputs of the “show” commands use the following format:


gateway (config) # <show command> | {include | exclude} <extended regular expression> [<ignore-case>] [next <lines>] [prev <lines>]

The filtering parameters are separated from the show command they filter by a pipe character (“|”). Quotation marks may be used to include or exclude a string including space, and multiple filters can be used simultaneously as shown in the example below.


gateway (config) # <show command> | {include <extended regular expression>} [<ignore-case>] [next <lines>] [prev <lines>] | exclude <extended regular expression> [<ignore-case>] [next <lines>] [prev <lines>]]



gateway (config) # show inventory | include SYSTEM ----------------------------------------------------- Module Part Number Serial Number ----------------------------------------------------- gateway (config) # show inventory | exclude SYSTEM SYSTEM SKY-6200-R20A1 Default string

CLI Monitoring Option “watch”



gateway (config) # <show command> | watch [diff] [interval <1-100 secs>]

Running this command displays a show-command output that is updated at a time interval specified by the “interval” parameter (2 seconds is the default).

The “diff” parameter highlights the differences between each iteration of the command.

For example, running the command “show clock | watch diff interval 1” yields something similar to the following:


Time: 18:47:02 Date: 2020/07/05 Time zone: Asia Middle_East Jerusalem (Asia/Jerusalem) UTC offset: +0300 (UTC plus 3 hours)

With the highlighted black blocks indicating the change that has occurred between one iteration of the command from one second to the next.

To exit “watch” mode, press Ctrl+C.
The “watch” option may be used in conjunction with the “include” and “exclude” options as follows:


gateway (config) # <show command> | {include | exclude} <extended regular expression> | watch [diff] [interval <1-100 secs>]

It is possible to count the number of lines in an output of a “show” command by using the following command:


gateway (config) # <show command> | count



gateway (config) # show clock Time: 16:05:43 Date: 2020/05/25 Time zone: UTC (Etc/UTC) UTC offset: same as UTC # show clock | count 4

CLI “json-print” Option

The MLNX-GW NVOSCLI supports printing “show” commands in JSON syntax.
To print the output of the “show” commands as JSON, use the following format:


gateway (config) # <show command> | json-print

Running the command displays an output of the “show” command in JSON syntax structure instead of its regular format. See the following as an example:


gateway (config) # show inventory ----------------------------------------------------- Module Part Number Serial Number ----------------------------------------------------- SYSTEM SKY-6200-R20A1 MT1900X00000   gateway (config) # show inventory | json-print [ { "SYSTEM": [ { "Part Number": "SKY-6200-R20A1", "Serial Number": "MT1900X00000" } ] } ]

The “json-print” option cannot be used together with filtering (“include” and “exclude”) and/or monitoring (“watch”).

For more information on JSON usage, please refer to “JSON API”.

CLI Shortcuts

The following table presents the available keyboard shortcuts on the MLNX-GWNVOS CLI.

Key Combination



Move cursor to beginning of line


Move cursor backward one character without deleting


Terminate operation


If cursor is in the middle of the line, delete one character forward
If cursor is at the end of the line, show autocomplete options for current word or word fragment
If cursor at an empty line, same as Esc


Move cursor to end of line


Move cursor forward one character


Delete one character backwards from cursor


Auto-complete current word (same as TAB)


Return carriage (same as ENTER)


Delete line after cursor


Clear screen and show line at the top of terminal window


Return carriage (same as ENTER)


Next line (same as DOWN ARROW)


Next line (same as UP ARROW)


Transpose the two characters on either side of cursor


Delete line


Delete the last word


Retrieve (“yank”) last item deleted

Esc b

Move cursor one word backward

Esc c

Capitalizes first letter in word after cursor

Esc d

Delete one word forward from cursor

Esc f

Move one word forward from cursor

Esc l

Change word after cursor to lowercase letters

Esc Ctrl-h

Delete one word backward from cursor

Esc [ A

Next line (same as DOWN ARROW)

Esc [ B

Next line (same as UP ARROW)

Esc [ C

Move forward one character from cursor

Esc [ D

Move backward one character from cursor

© Copyright 2023, NVIDIA. Last updated on Sep 8, 2023.