Cisco NSO Series Part2 – Installation v5.7

Local vs System Installation Types

  • System Install Use when installing NSO for a centralized, “always-on”, production-grade purpose. You configure it as a system daemon that starts and ends with the underlying operating system. The default credentials and the application installation locations align with a typical Linux application function.
  • Local Install Use for development, lab, and evaluation purposes. The installation unpacks all the application components, including documentation and examples, and you instantiate and start instances of NSO on demand. You use a Local Install on a single workstation to have multiple, unrelated instances of NSO for different labs and demos (not at the same time). This install includes default credentials for ease of use and you typically install it in an easily accessible folder.

This lab is going to focus on the local install NSO since it is easier for new users to navigate and run locally on their laptops.

NSO Linux Prerequisites

Linux with Below Packages as pre-requites:

Java – JDK 8.0 or higher

Install the default Java Runtime Environment ( JRE ). This will install the JRE from OpenJDK 11

# apt install default-jre

To install the JDK , run the following command: This will also install the JRE .

# apt install default-jdk

Verify: #java -version

Python 3.7 or higher

Install make

# apt install make

Install the tools required to prepare the build environment.

# apt install build-essential libbz2-dev libdb-dev \
> libreadline-dev libffi-dev libgdbm-dev liblzma-dev \
> libncursesw5-dev libsqlite3-dev libssl-dev \
> zlib1g-dev uuid-dev tk-dev

Download the source code

# wget
# tar xJf Python-3.10.2.tar.xz

Install it under /usr/local/ with the following command

# cd Python-3.10.2
# ./configure
# make
# make install

Verify: # python3 -V

# which python3

Ant 1.9.3 or higher

Install Ant

apt install ant

Verify: ant -version

Python Paramiko 2.2 or higher

Install Python Paramiko

apt install pip
apt install python3-paramiko

Verify: pip show paramiko

NSO Installation!getting-and-installing-nso/download-your-nso-free-trial-installer-and-cisco-neds

NSO installers and NED are also available for download.

NSO 5.7 Linux, Cisco IOS (XE) NED, Cisco IOS XR NED, Cisco NXOS NED, Cisco ASA NED

Store the NSO build resources in the /tmp directory using WinSCP

image Cisco NSO Series Part2 - Installation v5.7

Go to /tmp directory & see files

$ cd /tmp
ls -l nso*.bin

Execute the signed file while connected to the Internet

sh nso-5.7.1.linux.x86_64.signed.bin –skip-verification

Verify: ls -l

(nso-5.7.1.linux.x86_64.installer.bin will be extracted)

Next, we do the install, specifying a new folder that will get created where the NSO files will live.

/tmp$ sh nso-5.7.1.linux.x86_64.installer.bin –local-install ~/nso-5.7

Go to Installation Directory & explore files

cd ~/nso-5.7

NSO Directory: /nso-5.7/

NED Directory: /nso-5.7/packages/neds$

Doc Directory: /nso-5.7/doc/

Example Directory: /nso-5.7/examples.ncs/

Installing new NED Versions

Existing NEDs can be seen in directory ~/nso-5.7/packages/neds

To install new NEDs, copy NEDs to /tmp directory

rachit@rachit-L-22:~$ cd /tmp
rachit@rachit-L-22:/tmp$ ls -l ncs*.bin
image 1 Cisco NSO Series Part2 - Installation v5.7

Execute the signed files while connected to the Internet

sh ncs-5.7-cisco-asa-6.13.12.signed.bin –skip-verification
sh ncs-5.7-cisco-ios-6.77.10.signed.bin –skip-verification
sh ncs-5.7-cisco-iosxr-7.38.3.signed.bin –skip-verification
sh ncs-5.7-cisco-nx-5.22.8.signed.bin –skip-verification

Verify: ls -l ncs*.tar.gz

(ncs-5.7-****.installer.bin will be extracted)

image 2 Cisco NSO Series Part2 - Installation v5.7

Navigate to the packages/neds directory for your local-install.

cd ~/nso-5.7/packages/neds

While in ~/nso-5.7/packages/neds directory, extract the tarballs into this directory using the tar command with the path to where the compressed NED is located:

tar -zxvf /tmp/ncs-5.7-cisco-asa-6.13.12.tar.gz
tar -zxvf /tmp/ncs-5.7-cisco-ios-6.77.10.tar.gz
tar -zxvf /tmp/ncs-5.7-cisco-iosxr-7.38.3.tar.gz
tar -zxvf /tmp/ncs-5.7-cisco-nx-5.22.8.tar.gz

NCSRC Script

The last thing to note are the files ncsrc and ncsrc.tsch. These are shell scripts for bash and tsch that setup your PATH and other environment variables for NSO. Depending on your shell, you will need source this file before starting your NSO work.

source $HOME/nso-5.7/ncsrc


image 3 Cisco NSO Series Part2 - Installation v5.7

Creating an NSO Instance (Project Folder)

ncs-setup –package <package name> –dest <project folder name>

rachit@rachit-L-22:~$ cd /nso-5.7/
rachit@rachit-L-22:~/nso-5.7$ ncs-setup –package ~/nso-5.7/packages/neds/cisco-ios-cli-6.77 \
   –package ~/nso-5.7/packages/neds/cisco-nx-cli-5.22 \
   –package ~/nso-5.7/packages/neds/cisco-iosxr-cli-7.38 \
   –package ~/nso-5.7/packages/neds/cisco-asa-cli-6.13 \
   –dest nso-instance
rachit@rachit-L-22:~$ ls nso-instance/

Explore Project Directory (ncs-5.7/nso-instance)

ncs.conf is the NSO application configuration file. Used to customize aspects of the NSO instance (change ports, enable / disable features, etc.). The defaults are often perfect for projects like this.

packages/ is the directory that has symlinks to the NEDs that we referenced in the –package arguments at setup.

logs/ is the directory that contains all the logs from NSO. This directory is useful when troubleshooting.

Start NSO Instance

rachit@rachit-L-22:~/nso-5.7/nso-instance$ ncs


$ ncs –status | grep status
$ ncs –version

http://server-ip:8080/login.html                admin/admin

Login to NSO CLI:

$ ncs_cli -u admin -C

Load the NED package on the NSO CLI session. It will take some time

admin@ncs# packages reload

Check the added package file

admin@ncs# show packages package package-version

image 4 Cisco NSO Series Part2 - Installation v5.7
Rachit Gupta

Network Architect | CCIEx3 #29824 JNCIE #2197 VCIX-NV

Leave a Comment