Here at Cumulus Networks, we believe that network engineers are the real heart of an organization. They’re the ones managing switches, running the data center, and generally keeping an organization moving efficiently and securely.

We also believe web-scale networking and the associated benefits should be accessible to everyone and the best way to make that happen is to leverage the power of disaggregation and native Linux. Although web-scale networking is very flexible, agile and offers many benefits, there can be a learning curve as Linux uses separate, independently developed applications which each have their own syntax to configure the switch.

So how do we bridge these two beliefs? Allow us to introduce Cumulus Linux Network Command Line Utility (NCLU). Scheduled for our early December 3.2 release, NCLU empowers and quickens the learning curve so all network engineers can benefit from web-scale networking while integrating with and still supporting the traditional Linux methods. In short, NCLU makes Cumulus Linux easily accessible to everyone.

What is Cumulus Linux Network Command Line Utility?

NCLU is a command line utility for Cumulus Linux that resides in the Linux user space as seen below. It provides consistent access to networking commands directly via bash, thereby making configuration and troubleshooting simple and easy — no need to edit files or enter modes and sub-modes. But not only that, NCLU goes further than traditional Command Line Interfaces (CLIs) by:

  • Embedding help, examples and automatic command checking with suggestions in case you’ve entered a typo
  • Running directly from and integrating with bash, while being interoperable with the regular way of accessing underlying configuration files and automation
  • Automatically configuring dependent features so you don’t have to

Linux Network Command Line Utility Architecture

What are a few key functionalities of NCLU?

We’ll go through several of the key NCLU functionalities here, but this is only a glimpse of the feature. There’s a lot more to look forward to with Cumulus Linux 3.2.

The first major benefit is that Cumulus Linux Network Command Line Utility is so easy to use, you might not even need documentation. With that said, NCLU has embedded context sensitive help with examples as well as we have Cumulus Linux documentation if you prefer to use it. Simply type “net <TAB>” at the bash prompt and let the configuring begin!

cumulus@leaf01:~$ net <TAB>
abort    :  abandon changes in the commit buffer
add      :  add/modify configuration (staged in commit buffer)
clear    :  clear counters, BGP neighbors, etc
commit   :  apply the commit buffer to the system
del      :  remove configuration (staged in commit buffer)
example  :  detailed examples of common workflows
help     :  show this screen and exit
pending  :  show changes staged in the commit buffer
show     :  show command output

As seen above, show commands are provided for troubleshooting.

If you want a little guidance, simply type help on the command line along with any number of keywords to see a set of possible commands. For example:

cumulus@leaf01:~$ net help bgp allow ipv4
The following commands contain keyword(s) ‘bgp’, ‘allow’, ‘ipv4’
net add bgp ipv4 unicast neighbor <bgppeer> allowas-in <1-10>
net add bgp vrf <text> ipv4 unicast neighbor <bgppeer> allowas-in <1-10>
net del bgp ipv4 unicast neighbor <bgppeer> allowas-in [<1-10>]
net del bgp vrf <text> ipv4 unicast neighbor <bgppeer> allowas-in [<1-10>]

In addition to command line help, real-life configuration examples for common scenarios are embedded within. For example:

cumulus@leaf01:~$ net example bond

We are configuring leaf-11 and would like to put swp1 and swp2 in a bond

swp1 | | swp2
| |
| |

net commands
leaf-11# net add bond bond-host-11 bond-slaves swp1-2
leaf-11# net pending
leaf-11# net commit

leaf-11# net show bond

After entering a configuration command, it is placed in a staging area until a net commit is performed. To display what is in the staging area, perform a net pending.

The exact Linux configuration files to be changed along with their locations are also displayed with net pending. Showing which file is edited and its location provides transparency to the classical Linux tool structure and syntax. For example, changing the hostname edits two Linux files, /etc/hosts and /etc/hostname as seen in blue in the display below. The configuration stanzas that will be added to and deleted from the configuration are also displayed, as seen below in green and red:

cumulus@leaf01:~$ net add hostname leaf50
cumulus@leaf01:~$ net pending
— /etc/hosts 2016-11-12 01:59:09.537396000 +0000
+++ /var/run/nclu/netmisc/etc_hosts 2016-11-12 01:59:34.455283294 +0000

@@ -1,6 +1,6 @@ localhost
::1         localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters
- leaf01
+ leaf50

— /etc/hostname 2016-11-12 01:59:11.703299824 +0000
+++ /var/run/nclu/netmisc/etc_hostname 2016-11-12 01:59:34.452283428 +0000

@@ -1 +1 @@

net add/del commands since the last ‘net commit’
User      Timestamp                  Command
——-  ————————–  ———————–
cumulus  2016-11-12 01:59:34.455965  net add hostname leaf50
cumulus@leaf01:~$ net commit

The staging area can be cleared prior to activation by performing a net abort. A net commit applies the staged configuration on the switch.

To see the entire committed configuration, simply type net show configuration as seen below.

cumulus@leaf01:~$ net show configuration

hostname leaf01

interface lo

interface eth0

interface swp1
bridge-access 15


router bgp 65001
bgp router-id
neighbor swp51 interface remote-as external
neighbor swp52 interface remote-as external

address-family ipv4 unicast

line vty

If you accidentally commit the wrong configuration, we support an easy rollback mechanism as well, where you can rollback just prior to the last commit or any prior commit.

cumulus@leaf01:~$ net commit rollback <TAB>
<number> :  Any integer
last     :  add help text

The second major benefit is that since we never leave bash, all Linux tools and configurations are still available, as well as automation. If you are familiar with some bash commands, bash syntax can be used, including piping commands like grep for show command output as seen in the below example.

cumulus@leaf01:~$ net show interface all |grep UP
UPloN/A65536LoopbackIP:,, ::1/128

UPswp11G1500Access/L2Untagged VLAN: 10
UPbridgeN/A1500Bridge/L2Untagged Members: swp1, vni_1
UPvni_1N/A1500Access/L2Untagged VLAN: 10

Finally, unlike some traditional command line interfaces, NCLU will recognize that certain commands require other dependent commands. For example, configuring a VLAN will require a Linux bridge and NCLU will automatically configure it. That’s just another benefit of using NCLU.

If you would like to dive a bit deeper into the features of NCLU, check out the below technical demo.

How and when can I get started?

Cumulus Linux Network Command Line Utility is native in Cumulus Linux 3.2, which is due out in December. Check out the getting started guide to learn more. When our full release comes around, you can look forward to a comprehensive list of functionality options (much more than we could detail here). It brings the flexibility, efficiency and economic value of web-scale networking to engineers of all backgrounds.

We’ll be busy for the next several weeks working on perfecting the robust functionality of NCLU. In the meantime, if you would like to see a small handful of the features that will be included, you can get a sneak peek by heading to our early access repository and downloading the package. Instructions for downloading the early access NCLU package are located in our user guide. Just remember, the early access package is only a fraction of the features that will be available in our full release — just enough to get you excited. Stay tuned!