NCLU is the always helpful Network Command Line Utility. It’s a command interface for our products and platforms that’s designed to provide direct, simple access to network configuration information. Thus, NCLU supports both inspection and modification of Cumulus Networks configuration data. Better yet, NCLU is easy to customize for local environments and naming conventions using its net example facility.
In general, NCLU enables users at the command line to learn about current configurations, and make changes or additions to such configurations. NCLU reports on Interfaces and can provide information about IP addresses, VLANs, Access controls, Trunking, STP, and more. At the routing level, NCLU provides information about Border Gateway Protocol (BGP) and Open Shortest Path First (OSPF) routing protocol settings and configurations. NCLU also offers information about services, including hostnames, NTP (Network Time Protocol), Timezone, and so on.
NCLU also includes comprehensive, context-sensitive help. Starting with the basic net command, users can learn about the various sub-commands available to them. Similarly, entering net <sub-command-name> provides help for that specific sub-command. This is how Cumulus (and other forms of) Linux delivers help information for users of complex commands like net.
In addition, NCLU commands provide control over configuration staging, enable commit or abort for complex operations, and even support rollback for such operations. NCLU commands may be used at the command line (CLI), but they may also be embedded in code for use in scripts or programs at runtime via the runtime API.
Basic net commands include the following commands for working with configurations:
Other useful net commands to verify configurations and counters, handle workflows, and more include:
Admins and power users will quickly find the net command is essential when it comes to setting up, monitoring and managing Cumulus Networks whitebox switches and virtual appliances. This environment also offers some interesting customization capabilities through the net example command (second command in the preceding table).
The Example’s the Thing
Right out of the box, NCLU includes numerous examples to show admins how to make best use of net commands. These examples reside in the following directory in Cumulus Linux:
You can add your own examples to this directory; a file named setupSpine, for example, could provide information on commands and values you might use in your network to set up a Spine switch. Ditto for a file named setupLeaf, which provides information on commands and values you’d use to set up a Leaf switch (See the Cumulus in the Cloud documentation on NETQ for more information).
When you’re at the command line, you can use NCLU to access your customized example files the same way you normally use the net example command. Thus, the following things will happen once those files are added to the aforementioned directory:
- When you enter the net example command at the CLI, it will list setupSpine and setupLeaf along with other predefined examples.
- Users can run either of those options with net example, which means either net example setupSpine or net example setupSpine and see the content from the files that you’ve added as part of the example/help system.
This means that you can provide customized examples to your admins and users that employ local naming conventions with real-world devices referenced and ready for them to copy and paste. This offers terrific flexibility and usability for your technical staff, and helps turn the runtime environment into a useable and useful teaching tool.
Be sure to check this out when you run Cumulus in the Cloud as a demo, or on your own Cumulus Linux devices, both physical and virtual.