Professional Documents
Culture Documents
Cisco dCloud
Requirements
Topology
Get Started
What’s Next?
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 1 of 22
Sandbox Guide
Cisco dCloud
Requirements
The table below outlines the requirements for this preconfigured sandbox.
Table 1. Requirements
Required Optional
Laptop Cisco AnyConnect®
This sandbox provides you with basic information to get started in the NSO sandbox. For more information about NSO, refer to
Network Services Orchestrator Solutions. Also explore the following NSO documents bookmarked in the browser in the
demonstration workstation:
This sandbox features a ready-to-use NSO environment to test NSO installation and pre-packaged NSO examples. It also enables
you to run your own NSO applications.
• NSO: A single, network-wide interface to all network devices and all network applications and services.
• Service Orchestration: NSO orchestrates the lifecycle of network related service: development, deployment, and activation.
Create, modify, repair, and delete services on-demand.
• NFV Orchestration: Orchestrate the lifecycle of a virtual service - create, modify, repair and delete virtualized services on
customer demand, within minutes or seconds. Manage and configure the Virtual Network Function (VNF) that makes up the
virtual service and how they are chained together. Control a VNF Manager such as Cisco Elastic Services Controller (ESC)
and Virtual Infrastructure Managers (VIMs) including OpenStack and vSphere with the NFV Orchestrator (NFVO) NSO
Package.
• Device Management: Network device turn up, configuration, and capability management is handled by an NSO onboard
device manager. This reduces manual efforts to manage network elements and lowers risk of errors. Cisco and third-party
physical or virtual devices are managed through the device abstraction layer using NEDs (Network Element Drivers).
• Configuration Audit, Network Policy Compliance: NSO ensures the network is correctly configured and device
configurations conform to network-wide rules. Utilizing templates matching “golden configs” for various device types and roles,
NSO audits a device’s most recent running config against corresponding template – any deviations are flagged for correction.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 2 of 22
Sandbox Guide
Cisco dCloud
Topology
This content includes preconfigured users and components to illustrate the scripted scenarios and features of the solution. Most
components are fully configurable with predefined administrative user accounts. You can see the IP address and user account
credentials to use to access a component by clicking the component icon in the Topology menu of your active session and in the
scenario steps that require their use.
Component Description
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 3 of 22
Sandbox Guide
Cisco dCloud
Get Started
Follow the steps to schedule a session of the content and configure your presentation environment.
2. For best performance, connect to the workstation with Cisco AnyConnect VPN [Show Me How] and the local RDP client on
your laptop [Show Me How]
3. Wait until all stages of the Launch Progress bar turn green before proceeding.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 4 of 22
Sandbox Guide
Cisco dCloud
VALUE PROPOSTION:
This scenario demonstrates how to connect to the NSO server. The documentation found on the workstation desktop in the NSO
Docs folder describes the installation process. For more information, refer to the NSO 5.2.1 Documentation Overview and the NSO
Installation Guide.
Steps
1. From the workstation desktop, double-click the NSO Host PuTTY icon to automatically log in to the NSO server as cisco.
2. Enter ls to verify that the NSO installation binary (nso-5.2.1.linux.x86_64.installer.bin) appears in the home directory.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 5 of 22
Sandbox Guide
Cisco dCloud
NOTE: NSO requires certain environmental variables to run. These variables are included in the ncsrc file located in the
installation folder. Running the command above includes them in your profile file for future sessions.
3. Click X (at top right of terminal window) and click OK in the confirmation pop-up to close the PuTTY terminal.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 6 of 22
Sandbox Guide
Cisco dCloud
4. Double-click the NSO Host PuTTY icon to open a new PuTTY terminal and allow the environment to load.
NOTE: As an alternative to closing the PuTTY terminal and opening a new one, enter source $HOME/nso-5.2.1/ncsrc. If
you do this, however, you must enter the command at every login.
5. Before starting NCS, complete the following steps to create a database for your project. Enter the following command to
create a work directory:
mkdir ncs-run
7. Enter the following commands to move to the new directory and start NCS:
cd ncs-run
ncs
8. Enter the following command to stop NCS and return to the $HOME directory:
ncs --stop
cd
1. Enter the following command to create a working directory to store your sandboxes:
mkdir myprojects
2. Enter the following command to copy the pre-packaged NSO examples to your working directory:
cp -r $HOME/nso-5.2.1/examples.ncs/* myprojects/
NOTE: You now can explore the pre-package examples. Each example includes a README file that contains instructions. To
work on each example, you must navigate to the appropriate directory.
3. Enter the following command to change the directory to the example directory:
cd myprojects/
NOTE: The myprojects folder is the location to which you copied the pre-package NSO examples.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 7 of 22
Sandbox Guide
Cisco dCloud
5. Enter the following commands to view the contents of the 0-hello-world directory:
cd getting-started/using-ncs/0-hello-world/
ls
NOTE: The README file in the 0-hello-world directory is an example guide that walks users through the initial steps for
using the NSO application.
7. Close the PuTTY terminal session. Refer to Appendix A for the complete contents of the README file.
There are other examples available in the myprojects directory about how to use NSO. Cisco recommends launching the NSO
Host PuTTY session and exploring the examples in the following order (with increasing difficulty). Refer to the previous procedure
for instructions.
1. myprojects/getting-started/using-ncs/0-hello-world/
2. myprojects/getting-started/using-ncs/4-netconf-device
3. myprojects/getting-started/using-ncs/1-simulated-cisco-ios/
4. myprojects/datacenter/datacenter
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 8 of 22
Sandbox Guide
Cisco dCloud
5. myprojects/service-provider/simple-mpls-vpn
IMPORTANT: This is a sandbox environment. This guide provides a walk-through of the initial NSO installation. It also
directs you to example guides, created by program developers, about how to use the application.
Within your working environment, you can create your own NSO applications and services. Create a new blank folder and re-use
as much as possible from the existing examples.
Additional Tools
• VI editor YANG plugin: Used to create and edit YANG models in the NSO server
• Eclipse IDE: Used as a graphical IDE to create and edit JAVA code or YANG models
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 9 of 22
Sandbox Guide
Cisco dCloud
VALUE PROPOSTION:
This scenario demonstrates how to open YANG files by using the Eclipse editor.
If your laptop has an X11 server, you can launch Eclipse through SSH by entering the following:
ssh -X cisco@198.18.134.28
$ /opt/eclipse/eclipse
However, this document assumes you connect to the workstation by using RDP.
Steps
2. Close the Eclipse welcome screen by clicking on the X on the top left of the screen.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 10 of 22
Sandbox Guide
Cisco dCloud
4. In the New Project dialog box, select General > Project and click Next.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 11 of 22
Sandbox Guide
Cisco dCloud
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 12 of 22
Sandbox Guide
Cisco dCloud
8. From the Import screen, select General > File System and click Next.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 13 of 22
Sandbox Guide
Cisco dCloud
9. Click Browse.
10. Select Cisco from the Places pane. Then select myprojects and click OK.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 14 of 22
Sandbox Guide
Cisco dCloud
11. In the left-hand pane of the Import dialog box, click the right arrow to expand and navigate to the following directories:
myprojects > getting-started > using-ncs > 4-netconf-device.
NOTE: Eclipse may be sensitive to your double-clicking speed, you may need to click faster.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 15 of 22
Sandbox Guide
Cisco dCloud
13. From the Package Explorer pane, expand my_project > getting-started > using-ncs > 4-netconf-device and double-click
host.yang.
NOTE: Examine the host.yang file, but do not make any changes to it because the file is used in the next scenario.
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 16 of 22
Sandbox Guide
Cisco dCloud
VALUE PROPOSTION:
Steps
2. Double-click the NSO Host PuTTY icon to open a new PuTTY terminal.
NOTE: There must be a space before and after the dot (.) in the following command.
5. Enter the following command to build the package (including the parenthesis):
( cd host/src && make )
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 17 of 22
Sandbox Guide
Cisco dCloud
7. Enter the following command to create two simulated netsim devices. This command forces the device names to start with the
letter h.
ncs-netsim create-network host 2 h
8. Enter the following command to enable NCS to run out of the directory:
ncs-setup --dest .
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 18 of 22
Sandbox Guide
Cisco dCloud
13. Enter the following command to read the configuration from the devices:
request devices sync-from
14. Enter the following commands to clean up your session by first exiting the admin-cli and then stopping ncs and netsim:
exit
ncs --stop
ncs-netsim stop
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 19 of 22
Sandbox Guide
Cisco dCloud
File Contents
Hello World
-----------
Preparations
------------
1) Make sure you have sourced the ncsrc file in $NCS_DIR. This sets up paths and
environment variables in order to run NCS. So this must be done all times
before running NCS, so it is recommended to put that in your profile.
Optional:
If you do not want to create the example files in the NCS installation
directory $NCS_DIR/examples.ncs/getting-started/using-ncs/0-hello-world,
for example if you are several users sharing the same installation, you can
run the example in a separate directory.
2) Create an empty directory, for example in your home directory. NCS and the
simulator will create files and directories in this example. Make sure you
change to this directory before continuing.
NCS runs as a daemon, and needs a couple of directories (for logs, its
database etc). The location of all these are in a configuration file,
usually called ncs.conf. Unless supplied as an argument (using the -c
option) the NCS daemon will look for ./ncs.conf, followed by
etc/ncs/ncs.conf in the NCS installation directory. In order to make
it easy to get started NCS includes a script called ncs-setup, this
script will create the directories and files needed to get started (by
default in the current working directory).
$ ls
$ ncs-setup --dest .
$ ls
README.ncs ncs-cdb/ packages/
logs/ ncs.conf state/ scripts/
$ ncs
$ ncs --status
The next thing to do is to start the CLI. The CLI is started using the
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 20 of 22
Sandbox Guide
Cisco dCloud
ncs_cli command. By default you start the CLI as the user you are
running the shell as. Most examples will use a default built-in user
called 'admin', to start the CLI as user admin, use:
$ ncs_cli -u admin
By default NCS also starts it's built-in SSH server, listening on port
2024. So ssh can also be used to log into the CLI:
The default password for the 'admin' user is: admin. Type exit to get
out of the CLI.
$ ncs --stop
NCS will now have lots of logs in the logs directory. The main log
being logs/ncs.log, look at the log to see when it was started, what
files were loaded during start etc
$ less logs/ncs.log
To wipe all log-files, restore all settings done in NCS, and to revert
to the "empty" factory default configuration, use the --reset option
to ncs-setup.
$ ncs-setup --reset
Further reading
---------------
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 21 of 22
Sandbox Guide
Cisco dCloud
What’s Next?
Check out these related demos on Cisco dCloud!
• Cisco WAN Automation Engine 7.1.2 - Segment Routing and XTC Sandbox v1
© 2019 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. Page 22 of 22