Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
NCS 3.x
June 2014
Confidential
Agenda
1 Overview and Background
How NCS fits in with the rest of the
world, what it does, and why
2 NETCONF and YANG
Why NETCONF was invented and how
it is different from previous
management protocols
Walk-through of the YANG modeling
language
3 System Setup
Installing NCS, packages, NETSIM
device simulator
4 Device Manager
Work with devices, synchronization,
templates, policies, etc
October 26, 2016
5 Service Manager
Work with high-level services
6 Alarm Manager
The alarm model and how to work
with alarms
7 System Administration
Deeper topics about installation
choices, logging, trouble shooting,
high availability, clustering, backups,
disaster recovery, etc
8 NED Development
NED types, Yang models and Java
code
Confidential
Agenda
Installation
Installation vs. project directory
Quick look at the top level contents
Examples
Overview of NCS example projects
Running a few basic examples
Discovery
Loading device meta data
Connection, Authentication,
Config, Live-status
How NCS knows how to log in to
devices
Basic device management and
identification
Confidential
Installation
Confidential
Contains
NCS, examples, documentation
NETSIM Network Simulator (ConfD)
Confidential
Directories, Files
CHANGES
KNOWN_ISSUES
LICENSE
README
VERSION
bin
doc
etc
examples.ncs
java
lib
man
ncsrc
ncsrc.tcsh
netsim
packages
src
support
var
Check contents of
dirs, files
Confidential
Start
Confidential
Start.
Check contents of rc
files
$ cd <ncs-install-dir>
$ . ncsrc
$ man ncs
$ cd <ncs-install-dir>examples.ncs/web-server-farm/web-site-service/
$ make clean all
Confidential
Confidential
/opt/
ncs-2.9/
ncs-3.0/
bin/
lib/
doc/
examples.ncs
web-server/
ncs-cdb/
ncs.conf
datacenter/
ncs-cdb/
ncs.conf
production/
ncs-cdb/
ncs.conf
October 26, 2016
Confidential
NCS
NCSRuntime
Project directories
directories
10
Examples
Confidential
11
NCS Examples
datacenter
getting-started/using-ncs/
datacenter-qinq
0-hello-world
discovery
1-simulated-cisco-ios
generic-ned
2-real-device-cisco-ios
snmp-ned
3-real-device-juniper
snmp-notification-receiver 4-netconf-device
web-server-farm
5-snmp-alarm-northbound
simple-mpls-vpn
6-access-lists
mpls-vpn
7-scripting
Confidential
getting-started/developing-with-ncs/
0-router-network
1-cdb
2-actions
3-aggregated-stats
4-rfs-service
6-extern-db
7-snmp-mib
8-maapi
9-alarms
10-webui-customization
11-scripting
12-templates
13-rest
14-upgrade-service
15-pre-modification
16-py-maapi
12
Confidential
13
Confidential
14
Confidential
15
Start NCS
ncs
ncs --status
Log in
ssh admin@localhost p2024
ncs_cli -u admin
http://localhost:8080
October 26, 2016
Confidential
16
$ ncs-setup --dest .
Creates
Creates
Creates
Creates
Confidential
17
Confidential
18
Start NCS
Play with the created model
E.g. set services fruit-subscription name properties
Confidential
19
doc
package-meta-data.xml
load-dir
netsim
private-jar
shared-jar
src
Makefile
yang
ncsc-out
Run make
Check ncsc-out
Confidential
20
<load-path>
<dir>./packages</dir>
Make sure your package is in the right place
Normally the ./packages directory
Dont store anything else than NCS packages in the packages/ directory!
Dont keep old packages in the packages directory!
Confidential
21
Bundle Compilation
Bundles are needed to support multiple versions of a device
Hides the version differences to application and operators
Alternative would be to make two (or more) separate packages
ncsc --ncs-compile-bundle
Check
Augment
Revision check
Generate output structure
Confidential
22
Small Example
Confidential
23
Augmentation
devices/device/config
Skipping oper-data
devices/template/config
Skipping oper-data
devices/live-status
Keeping oper-data
Making all oper-data
October 26, 2016
Confidential
24
ncs-out
modules
yang
box.yang
triangle.yang
saved-bundles
fxs
box.fxs
triangle.fxs
revisions
box
triangle
2011-06-01
norev
box.yang
triangle.yang
bundle.hash
bundle.info
triangle.fxs
triangle.yang
triangle.yang.orig
box.fxs
box.yang
box.yang.orig
23_9_2011_16_01_28
Confidential
25
Bundle Info
Confidential
26
Compiling Revisions
Confidential
27
Ncs-out
modules
yang
fxs
saved-bundles
box.fxs
box.yang
box.yang.orig
box.yang
triangle.yang
bundle.hash
bundle.info
triangle
box
norev
23_9_2011_16_01_28
revisions
2011-06-01
triangle.fxs
triangle.yang
triangle.yang.orig
2011-10-01
triangle.fxs
triangle.yang
triangle.yang.orig
Confidential
revision-merge
triangle.fxs
28
Confidential
29
Output in ./netsim
Run a Cisco CLI towards the box
$ ncs-netsim start
$ ncs-netsim cli-c box0
# config terminal
# properties hostname nisse
# commit
Confidential
30
Remember
$ ncs-netsim start
$ ncs-netsim stop
$ ncs-netsim reset (wipe out config)
Confidential
31
Confidential
32
Starting NCS
Start NCS in the runtime directory with a plain
$ ncs
To check the NCS status and health
Independent of current directory
$ ncs --status
Stop NCS with
Independent of current directory
$ ncs --stop
Stop NETSIM devices
Only in the runtime directory
$ ncs-netsim stop
Reset all configuration back to factory default
Use with caution
$ ncs-setup --reset
October 26, 2016
Confidential
33
Go Configure!
Confidential
34
Examples
Confidential
35
UP
FILE
JAVA
BAD NCS
PACKAGE
PACKAGE
CIRCULAR
DATA
JAVA
LOAD
ERROR
UNINITIALIZED
VERSION
NAME
VERSION
DEPENDENCY
ERROR
ERROR
ERROR
INFO
------------------------------------------------------------------------------------------------------
1-ncsuiutil
cisco-ios
cisco-ios-xr
cisco-nx
connectivity
datacenterui
dell-ftos
Confidential
36
Discovery
Confidential
37
Discovery module
Integration with external inventory
Import as XML,
Manual addition
Confidential
38
Confidential
39
Scanning, viewing
admin> request devices discovery scan target [ 127.0.0.1 ]
result ok
Configuration successfully loaded
Input parameters parsed: 1 devices to be scanned
Devices scanned. Alive: 1
Devices successfully stored in operational datastore
[ok][2013-11-29 11:09:20]
admin> show devices discovery latest-run
latest-run info target [ 127.0.0.1 ]
latest-run info time Fri Nov 29 11:09:15 CET 2013
latest-run info hosts-up 1
latest-run info hosts-down 0
latest-run info duration 4.15
latest-run device localhost
address
127.0.0.1
management-port
2022
device-type
netconf
device-vendor
Tail-f
device-description NCS:3.0
open ports
ssh:22/tcp banner:2022/tcp ssh:2024/tcp http:8080/tcp
authgroup
default
snmp-authgroup
[ok][2013-11-29 11:09:25]
admin>
October 26, 2016
Confidential
40
Picking, forgetting
admin> configure
Entering configuration mode private
[ok][2013-11-29 15:35:15]
[edit]
admin% request devices discovery latest-run device 10.60.1.21 pick name asr7
result ok
Configuration successfully loaded
Device loaded from operational database
Device {asr7} stored in the running database
[ok][2013-11-29 15:37:53]
[edit]
admin% request devices discovery latest-run device 10.60.1.26 forget
Are you sure you want to remove the device from the discovery
list? [yes,no] yes
result ok
Device was removed from the discovery list
[ok][2013-11-29 15:38:55]
[edit]
admin%
pick-all
October 26, 2016
Confidential
41
Confidential
42
Confidential
43
Authgroups
admin% set devices authgroups
Possible completions:
public-key
remote-name
remote-password
remote-secondary-password same-pass
same-user
-
Usergroup
admin
enable-password!
Authgroup
asrs
Umap default-map
Device
asr3
Device
asr4
Umap admin
October 26, 2016
Confidential
44
Live-Device
NETCONF GET-CONFIG versus GET
devices/device/config
Configuration data from NCS CDB
devices/device/live-status
Configuration and operational data direct from device
Confidential
45
Confidential
46