You use the Advanced Packaging Tool (
apt) to manage additional applications (in the form of packages) and to install the latest updates.
Updating, upgrading, and installing packages with
apt causes disruptions to network services:
Upgrading a package might result in services being restarted or stopped as part of the upgrade process.
Installing a package might disrupt core services by changing core service dependency packages. In some cases, installing new packages might also upgrade additional existing packages due to dependencies.
If services are stopped, you might need to reboot the switch for those services to restart.
Update the Package Cache
To work properly,
apt relies on a local cache of the available packages. You must populate the cache initially, and then periodically update it with
-E apt-get update:
Cumulus Networks recommends you use the
-E option with
sudo whenever you run any
apt-get command. This option preserves your environment variables (such as HTTP proxies) before you install new packages or upgrade your distribution.
List Available Packages
After the cache is populated, use the
apt-cache command to search the cache and find the packages in which you are interested or to get information about an available package. Here are examples of the
The search commands look for the search terms not only in the package name but in other parts of the package information; the search matches on more packages than you might expect.
List Installed Packages
The APT cache contains information about all the packages available in the repository. To see which packages are actually installed on your system, use
dpkg. The following example lists all the package names on the system that contain
Display the Version of a Package
To show the version of a specific package installed on the system, run the
net show package version <package> command. For example, the following command shows which version of the
vrf package is installed on the system:
As an alternative to the NCLU command described above, you can run the Linux
dpkg -l <package_name> command.
To see a list of all packages installed on the system with their versions, run the
net show package version command. For example:
To upgrade all the packages installed on the system to their latest versions, run the following commands:
A list of packages that will be upgraded is displayed and you are prompted to continue.
The above commands upgrade all installed versions with their latest versions but do not install any new packages.
Refer to Upgrading Cumulus Linux for additional information.
Add New Packages
To add a new package:
First ensure the package is not already installed on the system:
If the package is installed already, you can update the package from the Cumulus Linux repository as part of the package upgrade process, which upgrades all packages on the system. See Upgrade Packages above.
If the package is not already installed, add it by running
-E apt-get install <name of package>. This retrieves the package from the Cumulus Linux repository and installs it on your system together with any other packages on which this package might depend. The following example adds the
tcpreplaypackage to the system:
You can install several packages at the same time:
In some cases, installing a new package might also upgrade additional existing packages due to dependencies. To view these additional packages before you install, run the
apt-get install --dry-runcommand.
Add Packages from Another Repository
As shipped, Cumulus Linux searches the Cumulus Linux repository for available packages. You can add additional repositories to search by adding them to the list of sources that
apt-get consults. See
man sources.list for more information.
Cumulus Networks has added features or made bug fixes to certain packages; you must not replace these packages with versions from other repositories. Cumulus Linux is configured to ensure that the packages from the Cumulus Linux repository are always preferred over packages from other repositories.
If you want to install packages that are not in the Cumulus Linux repository, the procedure is the same as above, but with one additional step.
Installing packages outside of the Cumulus Linux repository requires the use of
-E apt-get; however, depending on the package, you can use
easy-install and other commands.
To install a new package, complete the following steps:
dpkgcommand to ensure that the package is not already installed on the system:
If the package is installed already, ensure it is the version you need. If it is an older version, update the package from the Cumulus Linux repository:
If the package is not on the system, the package source location is most likely not in the
/etc/apt/sources.listfile. If the source for the new package is not in
sources.list, edit and add the appropriate source to the file. For example, add the following if you want a package from the Debian repository that is not in the Cumulus Linux repository:
Otherwise, the repository might be listed in
/etc/apt/sources.listbut is commented out, as can be the case with the early-access repository:
To uncomment the repository, remove the # at the start of the line, then save the file:
-E apt-get update, then install the package and upgrade:
Cumulus Supplemental Repository
Cumulus Networks provides a Supplemental Repository that contains third party applications commonly installed on switches.
The repository is provided for convenience only. You can download and use these applications; however, the applications in this repository are not tested, developed, certified, or supported by Cumulus Networks.
Below is a non-exhaustive list of some of the packages present in the repository:
htoplets you view CPU, memory, and process information.
scamperis an ECMP traceroute utility.
mtris an ECMP traceroute utility.
dhcpdumpis similar to TCPdump but focused only on DHCP traffic.
vimis a text editor.
fpingprovides a list of targets through textfile to check reachability.
scapyis a custom packet generator for testing.
bwm-ngis a real-time bandwidth monitor.
iftopis a real-time traffic monitor.
tsharkis a CLI version of wireshark.
nmapis a network scanning utility.
minicomis a USB/Serial console utility that turns your switch into a terminal server (useful for out of band management switches to provide a console on the dataplane switches in the rack).
apt-cacher-ngcaches packages for mirroring purposes.
iptrafis a ncurses-based traffic visualization utility.
swatchmonitors system activity. It reads a configuration file that contains patterns for which to search and actions to perform when each pattern is found.
dos2unixconverts line endings from Windows to Unix.
fail2banmonitors log files (such as
/var/log/apache/access.log) and temporarily or persistently bans the login of failure-prone IP addresses by updating existing firewall rules. This utility is not hardware accelerated on a Cumulus Linux switch, so only affects the control plane.
To enable the Supplemental Repository:
In a file editor, open the
Uncomment the following lines:
Update the list of software packages:
Install the software in which you are interested:
- Debian GNU/Linux FAQ, Ch 8 Package management tools
- man pages for