Professional Documents
Culture Documents
BRKDCN 2025
BRKDCN 2025
BRKDCN 2025
Maximizing Network
Programmability and
Automation with NX-OS
Nicolas Delecroix
Technical Marketing Engineer, DCNBU
ndelecro@cisco.com
Open NX-OS
• Extensibility, automation and streaming
telemetry features of NX-OS running
in standalone mode on Nexus 9K.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Objectives
>>> TM-HTTP-VER
: /network/Cisco-NX-OS-
device%3ASystem%2Feps-items
: 1.0.0
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Agenda • Extending NX-OS
• Docker and Kubernetes
• NX-SDK
• Automating NX-OS
• NX-API
• Ansible
• SaltStack
• NETCONF, YANG, OpenConfig, YDK
• Monitoring NX-OS
• Streaming Telemetry
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
Extending NX-OS
Docker
Securely Run 3rd Party Apps Prior to NX-OS 9.2(1)
• Prior to NX-OS 9.2(1), the only solution
is the Guest Shell.
• It works fine but...
• Only one Guest Shell instance can be
defined.
• The container Linux distribution is
always CentOS.
• The setup of apps in the Guest Shell
must be done from a Nexus 9K.
• Re-using and distributing Guest Shell
images can be done with the
import/export feature, but is fairly
limited.
• No container orchestration support.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Docker Engine
NX-OS 9.2(1) – July 2018
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Standardization, Flexibility, and Efficiency
Guest Shell Docker Engine
Number of container instances One Many
Access to storage and network Yes Yes
Linux distribution type CentOS Any
Container manipulation NX-OS CLI (# guestshell *) Standard Linux docker tool
primitives
Definition of the container Must be done on a Nexus 9K Can be done from any
image content computer supporting Docker
Repository of existing None Docker Hub
container images
Container orchestration None Docker Swarm or Kubernetes
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
What Apps are Interesting to Host on N9K with Docker?
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Demo: Docker on
Nexus 9K
switch(config)# feature bash-shell
switch(config)# run bash sudo su
bash-4.3#
# Start Docker
bash-4.3# service docker start
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
NX-SDK
Tighter Integration of Custom Linux Apps
with NX-OS
• NX-SDK is a simple, flexible and powerful set of APIs for
custom on-box applications to gain access to NX-OS infra
functionalities.
• Apps are still regular Linux programs. They just use the NX-SDK
APIs.
• Apps run natively as NX-OS features just like the Cisco-developed
features.
• Startup and management of the apps is handled by NX-OS.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Your NX-SDK App Your NX-SDK App Your NX-SDK App Nexus 9K
Linux 4.1
NX-SDK APIs
NX-OS Infrastructure
(CLI Manager, Syslog Manager, RIB Manager...) CLI
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Your Your Native Native Nexus 9K
NX-SDK App NX-SDK App NX-OS Feature NX-OS Feature Linux 4.1
NX-SDK APIs
NX-OS Infrastructure
(CLI Manager, Syslog Manager, RIB Manager...) CLI
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
NX-SDK Features
NX-OS 7.0(3)I6(1) – May 2017
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
NX-OS Structured Data Model
• Object Store:
sys
• Hierarchical tree-structure representing switch configuration and
state.
• Comprised of Managed Objects (MOs) representing an element of bgp ospf
configuration or operational state.
• Data Management Engine (DME): read/write interface to the inst inst
object store.
• Object store documentation and examples on cisco.com: dom dom
https://developer.cisco.com/site/nxapi-dme-model-
reference-api/#. peer peer
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
NX-SDK Features
NX-OS 9.2(2) – November 2018
• Go language.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Direct DME access
NX-OS Infrastructure
(CLI Manager, Syslog Manager, RIB Manager...)
CLI
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Code and installation guide
https://github.com/CiscoDevNet/NX-SDK/tree/master/examples
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
NX-SDK Use Cases
ECMP Imbalance Monitoring
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
NX-SDK Use Cases
FEX Pre-Provisioning
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
Automating NX-OS
Telnet NX-API NX-API
SNMP NETCONF / RESTCONF / gRPC
or CLI REST
Client YANG Clients
SSH Client Client
Management Server
NX-OS Infra
(CLI Mgr, Syslog Mgr, ...) CLI
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
NX-API
{
"jsonrpc": "2.0",
"method": "cli",
CLI "params": {
"cmd": "show version",
Request "version": 1
Management },
Server }
"id": 1
{
"jsonrpc": "2.0",
"result": {
"body": {
"bios_cmpl_time": "03/02/2017",
JSON "bootflash_size": 7906304,
"kickstart_ver_str": "7.0(3)I7(3)",
Response "chassis_id": "Nexus 9508",
... Nexus 9K
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
NX-API Rollback on Error
• When a sequence of commands is sent
via NX-API, the only possible behavior
prior to NX-OS 9.2(1) is to stop upon
getting the first error.
• But all the previous commands that
went fine are still in the running config. 2000
This can lead to inconsistent
entries
configurations, especially for elements
that depend on limited hardware total
resources. Example with a large ACL
• NX-OS 9.2(1) supports rollback-on-
error:
• A checkpoint is automatically created
before executing the first command.
• Upon hitting an error, NX-API automatically
rolls back to the checkpoint.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
switch# sh ip access-lists myACL
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Get Started With Just Two Commands
• Ready-to-use Docker container with:
• Pre-built Python environment.
• NX-API libraries and apps.
• https://hub.docker.com/r/ndelecro/nx-os-programmability/
• https://github.com/ndelecro/nx-os-programmability/blob/master/Dockerfile
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
[devops@server ~]$ docker run -it ndelecro/nx-os-programmability
Status: Downloaded newer image for docker.io/ndelecro/nx-os-programmability:latest
root@a3d1f69d8067:~# cd NX-API_CLI/VXLAN_BGP_EVPN/
root@a3d1f69d8067:~/NX-API_CLI/VXLAN_BGP_EVPN# ./1.Create_L2VNI.py vteps 42 42000 239.1.1.1 e1/41
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
[devops@server ~]$ docker run -it ndelecro/nx-os-programmability
Status: Downloaded newer image for docker.io/ndelecro/nx-os-programmability:latest
root@a3d1f69d8067:~# cd NX-API_CLI/VXLAN_BGP_EVPN/
root@a3d1f69d8067:~/NX-API_CLI/VXLAN_BGP_EVPN# ./1.Create_L2VNI.py vteps 42 42000 239.1.1.1 e1/41
****** VTEP 93180-EX-1 ******
vlan 42
vn-segment 42000
int nve1
member vni 42000
mcast-group 239.1.1.1
suppress-arp
evpn
vni 42000 l2
rd auto
route-target import auto
route-target export auto
int e1/41
switchport access vlan 42
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
Ansible
Benefits of Ansible
• No developer skills needed.
Management Server
• NX-OS modules abstract the CLI.
Ansible Controller • Can also re-use existing CLI
templates.
Inventory Modules
• Easy authentication, transport,
grouping of target devices.
Playbooks Config
• Idempotency.
• Parallelization.
Configure
• Advanced features:
• Variables • Events
Targets
• Conditionals • Loops
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Management NX-API NX-API NETCONF / RESTCONF / gRPC
SSH SNMP
Server CLI REST YANG
NX-OS Infra
(CLI Mgr, Syslog Mgr, ...) CLI
tasks:
- name: Create VLAN and map to to VNI
nxos_vlan:
vlan_id: 2200
mapped_vni: 20200
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
[devops@server ~]$ ansible-playbook vxlan.yml
PLAY [Create L2VNI] ************************************************************
[devops@server ~]$ BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 53
What’s the Cleanest Way to Handle This Error?
[devops@server ~]$ cat vxlan.yml Config prior to the playbook
... execution:
tasks:
- name: Create VLAN and map to to VNI interface nve1
nxos_vlan: no shutdown
vlan_id: 2200 host-reachability protocol bgp
mapped_vni: 20200 member vni 20200
admin_state: up suppress-arp
ingress-replication protocol bgp
- name: Add L2VNI to Overlay
nxos_vxlan_vtep_vni:
interface: nve1
vni: 20200
multicast_group: 239.239.239.100
suppress_arp: true
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 54
[devops@server ~]$ cat rollback.yml
...
Checkpoint and Rollback! tasks:
- name: Create checkpoint
nxos_rollback:
checkpoint_file: backup.cfg
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
[devops@server ~]$ ansible-playbook rollback.yml
TASK [Create checkpoint]
*************************************************************************************************
changed: [93180-FX-2]
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 57
[devops@server ~]$ ansible-playbook rollback.yml
TASK [Create checkpoint]
*************************************************************************************************
changed: [93180-FX-2]
PLAY RECAP
*************************************************************************************************
93180-FX-2 : ok=5 changed=3 unreachable=0 failed=1
[devops@server ~]$
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 58
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 59
Upgrade or Downgrade NX-OS at Scale
---
- name: Install NX-OS
hosts: my_switches
tasks:
- name: Enable scp-server feature
nxos_feature:
feature: scp-server
state: enabled
- debug:
var: install_state BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
[devops@server ~]$ ansible-playbook install_nxos.yml
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
TASK [Install NX-OS]
************************************************************************************************
changed: [93180-EX-1]
tasks:
- name: Get the NX-OS version
nxos_facts:
gather_subset: "!interfaces"
- debug:
var: ansible_net_version
handlers:
- name: Get OSPF neighbors
nxos_command:
commands: ["show ip ospf neighbors"]
register: ospf_neighbors
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Challenge of Ansible Loops
---
- name: Create VLANs
hosts: nxos_vteps • How long do you think it
gather_facts: no takes to execute on one
tasks:
switch?
- name: Create VLANs • 12 minutes
nxos_vlan:
vlan_id: "{{ item.vlan_id }}" • Why?
loop:
- { vlan_id: 100 }
- { vlan_id: 101 }
- { vlan_id: 102 }
... 50 VLANs total
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
Challenge of Ansible Loops
Source: https://www.ansible.com/blog/accelerate-ansible-networking-aggregate-resources
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 68
Challenge of Ansible Loops
503 steps
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
Performance at Scale with Aggregation
Source: https://www.ansible.com/blog/accelerate-ansible-networking-aggregate-resources
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
Performance at Scale with Aggregation
4 steps
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
Performance at Scale with Aggregation
--- • 15 seconds
- name: Create VLANs
hosts: nxos_vteps • 98% improvement!
gather_facts: no
tasks:
- name: Create VLANs
nxos_vlan:
aggregate:
- { vlan_id: 100 }
- { vlan_id: 101 }
- { vlan_id: 102 }
... 50 VLANs total
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 72
https://github.com/ndelecro/nx-os-programmability/tree/master/Ansible/2.5
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Get Started With Just Two Commands
Ready-to-use Docker container with Ansible installed and configured, and
NX-OS playbooks available:
[devops@server ~]$ docker run -it ndelecro/nx-os-programmability
Status: Downloaded newer image for docker.io/ndelecro/nx-os-programmability:latest
root@a3d1f69d8067:~# ansible-playbook ~/Ansible/vxlan_nxapi.yml
PLAY RECAP
*************************************************************************************************
93180-EX-1 : ok=1 changed=1 unreachable=0 failed=0
93180-FX-2 : ok=1 changed=1 unreachable=0 failed=0
root@a3d1f69d8067:~#
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 74
Agenda • Extending NX-OS
• Docker and Kubernetes
• NX-SDK
• Automating NX-OS
• NX-API
• Ansible
• SaltStack
• NETCONF, YANG, OpenConfig, YDK
• Monitoring NX-OS
• Streaming Telemetry
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 75
SaltStack
SaltStack Overview
• Automation tool, comparable to Chef, Puppet and Ansible.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 77
Salt States (nxos.py)
High-speed bus
Salt Minion
Guest Shell or Docker
NX-API Nexus 9K
NX-OS CLI
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
[devops@server ~]$ salt 93180-EX-2 grains.get nxos
93180-EX-2:
----------
hardware:
----------
Device name:
93180-EX-2
bootflash:
7906304 kB
software:
----------
NXOS:
version 9.2(1)
[devops@server ~]$
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
NX-OS Execution Module
• NX-OS module for Salt: nxos
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 80
[devops@server ~]$ salt 93180-EX-2 nxos.show 'show version’
93180-EX-2:
- Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (C) 2002-2018, Cisco and/or its affiliates.
All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under their
own licenses, such as open source. This software is provided "as
is," and unless otherwise stated, there is no warranty, express or
...
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
[devops@server ~]$ salt 93180-EX-2 nxos.show 'show version' raw_text=False
93180-EX-2:
|_
----------
TABLE_package_list:
----------
ROW_package_list:
----------
package_id:
----------
bios_cmpl_time:
05/17/2018
bios_ver_str:
07.64
bootflash_size:
7906304
chassis_id:
Nexus9000 93180YC-EX chassis
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
[devops@server ~]$ salt '93*' nxos.config commands="['vlan 42']"
93240-FX2-1:
COMMAND_LIST: vlan 42
---
+++
@@ -34,7 +34,7 @@
rmon event 4 description WARNING(4) owner PMON@WARNING
rmon event 5 description INFORMATION(5) owner PMON@INFO
-vlan 1
+vlan 1,42
93180-EX-2:
COMMAND_LIST: vlan 42
... © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
[devops@server ~]$ cat /srv/salt/vlans.j2
{% for vlan in vlans %}
vlan {{ vlan }}
{% endfor %}
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 85
[devops@server ~]$ salt 93180-EX-2 state.apply nexus
93180-EX-2:
----------
ID: Create user Nicolas
Function: nxos.user_present
Name: Nicolas
Result: True
Comment: User set correctly
Started: 14:10:17.737023
Duration: 5490.00000022 ms
Changes:
----------
password:
----------
new:
COMMAND_LIST: username nicolas password 5 $5$TQ9LMz
---
+++
@@ -32,6 +32,7 @@
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 88
Agenda • Extending NX-OS
• Docker and Kubernetes
• NX-SDK
• Automating NX-OS
• NX-API
• Ansible
• SaltStack
• NETCONF, YANG, OpenConfig, YDK
• Monitoring NX-OS
• Streaming Telemetry
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 89
NETCONF, YANG,
OpenConfig, YDK
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 91
NX-OS OpenConfig Support
Core Feature Set for Multi-Vendor Solution
Model NX-OS 7.0(3)I7(5) NX-OS 9.2(2)
AAA 0.3.0
ACL 1.0.0
AFT (Abstract Forwarding Table, similar to
0.3.1
FIB)
BGP 2.1.0 (partial) 4.0.1
Interfaces 1.0.2 (partial) 2.0.0
ISIS 0.3.3
Local Routing 1.0.0 (partial) 1.0.1
MPLS 2.4.1
Network Instance (VRF) 0.8.1
OSPF 0.1.1
Packet Match AKA ACL 1.0.0
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 92
NX-OS OpenConfig Support
Core Feature Set for Multi-Vendor Solution
Model NX-OS 7.0(3)I7(5) NX-OS 9.2(2)
Platform including LC, port, transceiver 0.8.0
Policy Forwarding AKA PBR 0.2.0
Routing Policy: Prefix Lists and Route
2.0.1 2.0.1
Maps
Segment Routing 0.0.3
STP 0.2.0
System (Date & Time, NTP, DNS...) 0.3.0
VLAN 1.0.2 (partial) 1.0.2
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 93
Read all VRFs with OpenConfig
<get-config>
<source>
<running/>
</source>
<filter>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance/>
</network-instances>
</filter>
</get-config>
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 94
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
<data>
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<config>
<description/>
<enabled>true</enabled>
<name>default</name>
<type>L3VRF</type>
</config>
<name>default</name>
</network-instance>
<network-instance>
<config>
<description/>
<enabled>true</enabled>
<name>Testing1</name>
<type>L3VRF</type>
</config>
...
NX-OS Native YANG Support
For the Complete Feature-Set
• ACL • OSPF
• QoS • HSRP
• Segment Routing • Syslog
• VXLAN F&L and BGP EVPN • NTP
• ARP • Route Policy
• Interfaces • HSRP
• VLAN • L2 and L3 Tables
• IPv4 and IPv6 for interfaces • SNMP
• RBAC • MPLS
• Tunnels • Static Route
• VRRPv2 and v3 • Streaming Telemetry Configuration
Supported protocols for OpenConfig and Native models are NETCONF, RESTCONF, and gRPC.
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 96
How Do I Create and Transport Those YANG Payloads?
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 97
https://developer.cisco.com/site/cisco-nexus-nx-api-references
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 98
https://developer.cisco.com/site/cisco-nexus-nx-api-references
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Ansible as a Generic NETCONF Engine
vxlan.j2 Jinja2 template vxlan_generic.yml playbook
<config> ---
<System xmlns="http://cisco.com/ns/..."> - name: VXLAN NETCONF GENERIC
<bd-items> hosts: netconf_vteps
<bd-items>
<BD-list> tasks:
- name: TEMPLATE
<fabEncap>vlan-{{vlan_id}}</fabEncap>
template:
<accEncap>vxlan-{{vxlan_id}}</accEncap>
src: vxlan.j2
<name>{{vlan_name}}</name> dest: vxlan.config
</BD-list> vars:
</bd-items> vlan_id: 42
</bd-items> vxlan_id: 90042
</System> vlan_name: ansible jinja
</config>
- name: VXLAN
netconf_config:
datastore: running
BRKDCN-2025 src:
© 2019 Cisco and/or vxlan.config
its affiliates. All rights reserved. Cisco Public 104
Beyond Payloads: Code APIs
• Let’s generate APIs that follow
exactly the YANG models
definitions.
• They will automatically create the
YANG payloads (edit-config).
• They will also automatically decode
the payloads received from the
switch (get-config).
• Let’s also have those APIs validate
the data we feed them, and the
return data from the switch.
• While we’re at it, let’s abstract the
communication to the switches too!
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 105
YANG Development Kit (YDK)
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 106
Telnet NX-API NX-API
SNMP
or CLI REST
Client
Client YDK
SSH Client
Management Server
NX-OS Infra
(CLI Mgr, Syslog Mgr, ...) CLI
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 107
Demo: VXLAN BGP EVPN
Automation on NX-OS
with YDK
Choosing an Automation
Strategy
100
90
80
70
60
50
40
30
20
10
0
Transport Abstraction Data Model Simplicity Customization Developer Skills Turn-Key
90
80
70
60
50
40
30
20
10
0
Transport Abstraction Data Model Simplicity Customization Developer Skills Turn-Key
90
80
70
60
50
40
30
20
10
0
Transport Abstraction Data Model Simplicity Customization Developer Skills Turn-Key
90
80
70
60
50
40
30
20
10
0
Transport Abstraction Data Model Simplicity Customization Developer Skills Turn-Key
90
80
70
60
50
40
30
20
10
0
Transport Abstraction Data Model Simplicity Customization Developer Skills Turn-Key
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 115
Monitoring NX-OS with
Streaming Telemetry
Telemetry Collector
Server
NX-OS
NX-OS Telemetry Engine Telemetry CLI
Configuration
sensor-group 1
data-source NX-API
path "show mac address-table" depth 0
sensor-group 2
sys
data-source DME
path sys/intf/phys-[eth1/41]-dbgIfIn depth 0
path sys/acl/ipv4/name-CLEUR/seq-10 depth 0
bgp ospf
filter-condition gt(ipv4aclACE.packets,"10000")
path sys/bgp depth unbounded
inst inst
subscription 1
dst-grp 1
snsr-grp 1 sample—interval 5000
snsr-grp 2 sample-interval 30000 BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 118
Streaming Telemetry of YANG Models
NX-OS 9.2(1)
• Do-It-Yourself
NX-OS-device%3ASystem%2Feps-items HTTP/1.0" 200 -
>>> URL : /network/Cisco-NX-OS-
device%3ASystem%2Feps-items
>>> TM-HTTP-VER : 1.0.0
http://cs.co/telemetry_receiver
node_id_str : 93180-EX-2
collection_id : 161
data_source : YANG
data : {
Questions?
Use Cisco Webex Teams (formerly Cisco Spark)
to chat with the speaker after the session
How
1 Find this session in the Cisco Events Mobile App
2 Click "Join the Discussion"
3 Install Webex Teams or go directly to the team space
4 Enter messages/questions in the team space
cs.co/ciscolivebot#BRKDCN-2025
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 123
Complete your online
session survey
• Please complete your Online Session
Survey after each session
• Complete 4 Session Surveys & the Overall
Conference Survey (available from
Thursday) to receive your Cisco Live T-
shirt
• All surveys can be completed via the Cisco
Events Mobile App or the Communication
Stations
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 124
Continue Your Education
BRKDCN-2025 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 125
Thank you