1. RBFS Command Line Interface
1.1. RBFS CLI Overview
RBFS command line interface is a primary user interface that enables you to interact with RBFS for monitoring, configuring, debugging, and maintaining the system. RBFS command line interface, that runs on top of the Ubuntu shell, provides a rich set of commands which allow you to execute various operations on the system.
RBFS CLI commands are organized in hierarchies based on their functionalities. Commands, which are used to execute the same type of functions, have the same hierarchy. For example, to display information, you can use commands that start with 'show'. Delete
command, in RBFS, is used to remove an existing configuration.
The RBFS command-line interface has three modes: Configuration mode, Operation mode, and Debug mode.
Operational mode: This is the default mode of RBFS command line interface. Operational mode allows you to execute the operational commands such as show commands to view or monitor various system configuration and its current state.
Configuration mode: Configuration mode allows to execute various configurations for services or features. It also allows you to view the information for the existing configurations.
Debug mode: It allows you to execute troubleshooting or debugging operations in the RBFS system.
1.2. Using the CLI
The following are some of the utilities which help you working with the CLI faster and easier.
Complete Partially Typed Commands:
You can press Tab
key to complete a partially typed command. It helps you working with commands faster.
Command Options and Description:
If you do not know the options available for a command and the purposes of the options, you can enter the question mark symbol (?). It displays all the available command options and description for that commands.
![]() |
In any of the modes, if you type the question mark symbol (?), the CLI displays a set of commands which can be executed in that particular mode. |
1.2.1. Launch the RBFS CLI
The following example shows how to start the RBFS CLI.
supervisor@rtbrick>LEAF01:~$ cli supervisor@rtbrick>LEAF01: op>
![]() |
'op>' shows you are in operational mode. |
CLI Prompt
The RBFS CLI prompt reflects the static hostname and host OS hostname. In RBFS, the static hostname is the container name and the dynamic hostname is derived from DHCP.
The format of the RBFS CLI prompt is as follows:
<username> @ <static_hostname> > <hostname.host-os>: <mode>
Example:
supervisor@rtbrick>LEAF01: op>
1.2.2. Switch CLI Modes
RBFS CLI has three modes: Configuration mode, Operation mode, and Debug mode.
You can enter switch-mode
command to change the CLI mode.
For example, enter switch-mode config
to switch to configuration mode.
The following example shows how to switch between modes.
supervisor@rtbrick>LEAF01: op> switch-mode config Enter a given mode debug Enter a given mode operation Enter a given mode
The following example shows how to switch from the operation
mode to the config
mode.
supervisor@rtbrick>LEAF01: op> switch-mode config supervisor@rtbrick>LEAF01: cfg>
1.2.3. Turn on/off Paging
To turn the paging on or off, use the following command:
paging [on | off]
-
off - Pagination will be turned off for the commands that span more than screen length
-
on - Pagination will be turned on for the commands that span more than screen length
Example:
supervisor@rtbrick>LEAF01: cfg> paging on
1.2.4. Display Command History
The history
command enables you to view the previously executed commands. You can execute the command in any of the CLI modes.
history
Example:
supervisor@rtbrick>LEAF01: op> history show config set exit show config set load config test.json load config obj.json show config set exit show config set load config test.json switch-mode config load config test.json load config obj.json exit switch-mode config show config set load config test.josn load config obj load config obj.json exit show config set load config obj.json load config test.json exit show bd running-status load config test.json show config set exit show bd running-status show co show cores exi show datastore confd table test index index2 exit
1.2.5. CLI Access Logs
RBFS supports sending command history log messages to Graylog, a log management software that enables real-time analysis of log messages.
The command history logs help you to understand which user has executed a specific command across multiple CLI sessions.
The log format for CLI command history logs is: User '%s' executed command '%s'.
System logging is implemented for RESTCONF.
![]() |
For RESTCONF error logs, do not set the log level to 'info'. If you set the log level to info , logs are generated for all the restconfd requests.
|
1.3. Operational Commands
1.3.1. Display Core Files
You can use the show cores
command to show a set of system core files created when the device service has been crashed. This command is used for diagnostic purposes.
Example:
supervisor@rtbrick>LEAF01: op> show cores Date Time Filename May 10 09:02 core.lldpd.20220510-090237.1317.zst May 10 09:02 core.igmp.iod.1.20220510-090228.1282.zst May 10 09:02 core.pim.iod.1.20220510-090228.1280.zst May 10 09:01 core.lldpd.20220510-090145.984.zst May 10 09:01 core.igmp.iod.1.20220510-090140.991.zst May 10 09:01 core.pim.iod.1.20220510-090140.989.zst
1.3.2. Reboot Containers and Hosts
The reboot
command allows you to restart containers and hosts.
reboot <option>
Option | Description |
---|---|
- |
Without any option, this command allows you to reboot a container (default). You are prompted to confirm rebooting the container when you enter this command. You must answer yes or no. |
container |
This command allows you to reboot a container. You are prompted to confirm rebooting the container when you enter this command. You must answer yes or no. |
container-and-confirm |
This command reboots the container without prompting yes/no. |
device |
This command allows you to reboot a device. You are prompted to confirm rebooting the device when you enter this command. You must answer yes or no. |
device-and-confirm |
This command reboots the device without prompting yes/no. |
Example:
supervisor@rtbrick>LEAF01: cfg> reboot container
1.3.3. Display System Version Details
To display the version details of RBFS and its various components, use the show version
command.
show version
Example:
supervisor@ixr_pe1>srv3.nbg1.rtbrick.net: op> show version UUID : 2abb4250-2a14-4e5c-84e2-6785eee158f8 Version : 22.6.0-g4internal.20220620060710+Bfs0000bgpauthlatest.C3abc099d Role : spine Platform : virtual Format : lxd Build date : 2022-06-20 06:07:10 UTC Component Version Timestamp Branch alertmanager 0.20.1001-internal.20220613124702+Bdevelopment.... 2022-06-07 20:01:29 development cligen 0.1.0-internal.20220613140225+Bdevelopment.C9457c97b 2022-06-07 20:00:33 development clixon 4.3.1-internal.20220618124913+Bdevelopment.C85593b60 2022-06-13 11:48:32 development <...>
1.3.4. Display Date and Time
To display system date and time, use the date
command.
date
Example:
supervisor@rtbrick>LEAF01: op> date Thu Apr 28 09:56:32 UTC 2022
1.4. Viewing Configuration
1.4.1. View Configuration
To view configuration, enter the show config
command.
Example:
supervisor@rtbrick>LEAF01: cfg> show config
1.4.2. Display Configurations in a Specific Format
The show config
command displays the current committed configurations of the system. By default, this command displays the configurations in a json
format.
show config <format>
You can also specify the format explicitly, if needed. The available display formats are:
-
json: Display configurations in JSON format
-
set: Display configurations in CLI format (similar to commands executed)
-
netconf: Display configurations in XML format
-
text: Display configurations in textual format (similar to YANG definition)
The following example shows how configurations are displayed in the text format.
supervisor@rtbrick>LEAF01: op> show config text daemon-options { instance-name *; afi *; safi *; bd-type bgp.appd; bd-name bgp.appd.1; } daemon-options { instance-name *; afi *; safi *; bd-type bgp.iod; bd-name bgp.iod.1; } interface { name lo-0/0/0; unit { unit-id 0; address { ipv4 { prefix4 192.0.0.3/32; } ipv6 { prefix6 192:0:0::3/128; } } } } <...>
To view configuration in the set format, use the show config set
command.
Example:
supervisor@rtbrick>LEAF01: cfg> show config set set interface memif-0/0/1 set interface memif-0/0/1 memif-id 1 set interface memif-0/0/2 set interface memif-0/0/2 memif-id 2 set instance blue set instance blue protocol bgp address-family ipv4 multicast set instance blue protocol bgp address-family ipv6 unicast set instance red set instance red protocol bgp address-family ipv4 unicast set instance red protocol bgp address-family ipv6 unicast
1.4.3. View Configuration in a Specified Hierarchy
To view configuration in a specified hierarchy, use the following command:
supervisor@rtbrick>LEAF01: cfg> show config set instance red protocol bgp set instance red protocol bgp address-family ipv4 unicast set instance red protocol bgp address-family ipv6 unicast
1.5. Modifying Configurations
1.5.1. Commit CLI Configurations
To commit the configurations, use the commit
command.
The following example shows how to commit your changes.
supervisor@rtbrick>LEAF01:~$ cli supervisor@rtbrick>LEAF01: op> switch-mode config supervisor@rtbrick>LEAF01: cfg> <cli command goes here> supervisor@rtbrick>LEAF01: cfg> commit
When you exit CLI configuration with uncommitted changes, a reminder text appears saying that you have changes to commit, as shown in the following example:
supervisor@rtbrick>LEAF01: cfg> exit Uncommitted changes are present 1. Discard the changes and exit 2. Commit the changes and exit 3. Keep the changes and exit [Default behavior] Enter one of the above choice to proceed :
1.5.2. Add a Configuration Description
An in-line description or comment can be added to a system configuration to describe it.
set system config-description <description>
Example:
supervisor@rtbrick>LEAF01: cfg> set system config-description "This is sample test configuration" supervisor@rtbrick>LEAF01: cfg> commit supervisor@rtbrick>LEAF01: cfg> show config { "ietf-restconf:data": { "rtbrick-config:system": { "config-description": "This is sample test configuration" } }
1.5.3. View Uncommitted Changes
To view the uncommitted changes, use the show diff
command:
supervisor@rtbrick>LEAF01: cfg> show diff supervisor@rtbrick>LEAF01: cfg> set interface memif-0/0/3 memif-id 3 supervisor@rtbrick>LEAF01: cfg> set interface memif-0/0/4 memif-id 4 supervisor@rtbrick>LEAF01: cfg> show diff set +set interface memif-0/0/3 +set interface memif-0/0/3 memif-id 3 +set interface memif-0/0/4 +set interface memif-0/0/4 memif-id 4 supervisor@rtbrick>LEAF01: cfg> show diff } +interface { + name memif-0/0/3; + memif-id 3; +} +interface { + name memif-0/0/4; + memif-id 4; +} instance {
1.5.4. Save Configuration
To save configuration, enter the following command:
supervisor@rtbrick>LEAF01: cfg> save config my_config.json
![]() |
|
1.5.5. Delete the Entire Running Configuration at a Time
To delete the entire running-configuration at a time, use the discard all
command.
Example:
supervisor@rtbrick>LEAF01: cfg> discard all
1.5.6. View the Configuration Differences in the Current and Previous Versions
In RBFS, you can view the configuration differences between the current and the previous versions.
show diff <number>
supervisor@rtbrick>LEAF01: cfg> show diff 2 system { - secure-management-status false; + secure-management-status true; }
1.5.7. Rollback to a Previously Committed Configuration
To rollback to a specific configuration prior to the most recently committed one, use the following command:
rollback <number>
number
: Specifies the rollback ID. Range: 1 through 49. 0 refers to the active configuration, 1 refers to the most recent previous configuration. Default: 1
For example, to rollback to rollback ID 2, use the following command:
supervisor@rtbrick>LEAF01: cfg> rollback 2
1.5.8. Rollback to a Specific Version of Software Configuration
To rollback to a specific version of the software configuration, use the following command:
rollback commit-id <commit-hash>
Example:
supervisor@rtbrick>LEAF01: cfg> rollback commit-id 29d5db038c1920fdsdsdsdsdsd323232
1.5.9. Load Configuration
To load configuration, enter the following command:
load config <filename> <option>
The options include merge
and replace
. You can specify merge
after the file name to merge the configuration with the running configuration. Specify replace
to replace the running configuration with the new one. Without any option, it replaces the running configuration, by default.
supervisor@rtbrick>LEAF01: cfg> load config <filename>
![]() |
|
1.5.10. Discard the Uncommitted Configuration
To discard the uncommitted configuration, enter the following command:
supervisor@rtbrick>LEAF01: cfg> discard
1.6. Supported Platforms
Not all features are necessarily supported on each hardware platform. Refer to the Platform Guide for the features and the sub-features that are or are not supported by each platform.
©Copyright 2023 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrickās Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.