Professional Documents
Culture Documents
PSOCRS-3114
Welcome Aboard
This Session IS
• an Overview of Network Programmability Capabilities
• based on real-life Enterprise Examples
• fast
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
We are using Cisco Spark
Use Cisco Spark to communicate with the Speakers and
fellow participants
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Agenda
Network-enabled Applications
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Cisco Digital Network Architecture
Cloud Services and Management
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Cisco Digital Network Architecture
Cloud Services and Management
Automation Analytics
Controller-Level APIs
Abstraction & Policy Control Network Data, Examples include: APIC-EM NB REST API,
from Core to Edge Contextual Insights DNA Analytics NB API, ...
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Embedded Automation
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Embedded Event Manager (EEM)
email SNMP set SNMP SNMP Reload or Application CLI IOS.sh TCL
Syslog
notification Counter get notification switch-over specific Applets Policies Policies
Actions
EEM Applets
multi-event-correlation Embedded Event
Manager
Event Detectors
Interface XML CDP
Syslog SNMP Timer none HW Watchdog CLI OIR ERM EOT RF GOLD NetFlow IPSLA Route 802.1x MAC
Counter RPC LLDP
ED EDs EDs ED EDs ED ED ED ED ED ED ED ED ED ED ED ED
ED ED ED
Remote:
• Fan
• Notification • Cron Process Interface
Syslog • Temp
Local: • Count Scheduler Descriptor
Event • Env
• Notification down Database Blocks
• ...
• Get/Set
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
1+1>2
EEM
+ Python
+ guestshell
(from 16.5 / 16.3.1)
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Example: Time Domain Reflectometry (TDR) – 1/2
Problem: How to accurately detect cabling issues?
most cabling issues are non-fatal (initially)
not all wire-pairs may be affected
may not be located at cable termination
specialized test equipment may not be available
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Example: Time Domain Reflectometry (TDR) – 2/2
But: You may not want to run on all interfaces and only escalate relevant results
1) Run TDR Test:
switch# test cable-diagnostics tdr interface gigabitethernet1/0/3
TDR test on Gi1/0/9 will affect link state and traffic
TDR test started on interface Gi1/0/3
A TDR test can take a few seconds to run on an interface
Use 'show cable-diagnostics tdr' to read the TDR results.
Solution: Run on-box from guestshell / Python and parse / filter results before escalating
See https://github.com/CiscoDevNet/python_code_samples_network/tree/master/tdr-test
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Model-based APIs
Standard
Device
Specific
Standard
Device
Specific
Physical and Virtual Network Infrastructure
Device Features
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Open Device Programmability – YANG Models
(Open) Common (Cisco) Common (Cisco) Native
Model Model Model
• Industry definition • Cisco definition • Cisco definition
• Compliant with standard • Common across 2 or • Unique to a single Cisco
(IETF, ITU, etc) definition more Cisco operating operating system
systems
• Compliant with customer
definition (ie OpenConfig)
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Working with YANG Models
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Working with YANG Models - YangExplorer
(1) Select a Profile
Python Scripts
Check Capabilities
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Unfair Advantage
apiconsole.cisco.com
Example: Preventive Analytics – Connected TAC
Problem: Most root causes of production outages have been in the network for some time and
have been seen before in other networks. How to prevent them from affecting YOUR network?
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Example: Preventive Analytics – Connected TAC
In use at Cisco, ISVs,
REST APIs, node.js Agent JSON Results Partners, Customers
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Technical Solutions Clinic – Hall 2.2 (The Hub)
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Cloud Services and Management
Network-enabled Applications
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Cisco Digital Network Architecture
Cloud Services and Management
Network-enabled Applications
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Deploy, Report, Measure, Adjust, Repeat
Business Intent
Business Insight
Automation Analytics
Service Policy
Abstraction & Policy Control Network Data, Service Analytics
from Core to Edge Contextual Insights
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
APIC-EM Platform Architecture – Today
APIC-EM Applications Applications built on top of APIC-EM
Network Path Network Applications packaged with APIC-EM
IWAN Easy QoS
Inventory Trace PnP
Core Applications bundled
Advanced Topology Visualizer IWAN Application separately licensed
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
APIC-EM Northbound REST API
Bundling, Versioning, Deprecation and Release Strategy
• API changes within a version will be backward compatible i.e adding a new optional
parameter to existing API URL does not constitute a version change
• Telemetry will be used to get insights in API usage and retire unused APIs early in cycle
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Using a Controller API
Example:
1) In the APIC-EM User Interface,
click on [API]
2) Navigate to the desired API
in our example:
/network-device/count
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
Real-World Example
40.0.0.0 /24
40.0.1.0 /30
: 40.0.1.4 /30
1) For each network device: for item in interface_list: 40.0.1.8 /30
if (item[0] != '') & (item[1] != ''): 40.0.1.12 /30
subnet = ipcalc.Network(item[0] + "/" + item[1])
2) Extract IP/Subnet Information of all subnets.append(...)
40.0.1.16 /30
40.0.1.20 /30
interfaces into a list : 40.0.1.24 /30
40.0.1.28 /30
40.0.1.32 /30
3) De-duplicate Subnets 40.0.1.36 /30
40.0.1.40 /30
40.0.1.44 /30
4) Sort the List 40.0.1.48 /30
40.0.2.0 /30
40.0.2.4 /30
40.0.2.8 /30
40.0.2.12 /30
See: 40.0.2.16 /30
https://communities.cisco.com/people/steffenwebb/blog/ virtual NETWORK-, APPLICATION-, MANAGEMENT- FUNCTIONS
40.0.5.0 /24
2016/04/07/get-all-subnets-from-apic-em-controller 40.0.7.0 /24
172.10.0.0 /24
SWITCHING | ROUTING | WIRELESS 172.20.0.0 /24
192.168.1.0 /24
192.168.2.0 /24
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Real-World Example
Traditional IT
3. Share APIC-EM Inventory via REST APIs
and modular PowerShell Tool/Adapter
4. Correlate with EoX and proTACtive
information via apiconsole.cisco.com
5. Visualize and Share with IT and
DevOps users via PRTG virtual NETWORK-, APPLICATION-, MANAGEMENT- FUNCTIONS
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
Automated Deployment
Deployment
Device receives target
image and configuration
2
Discovery
Device can reach
PnP Server on APIC-EM
1
No Staging
Routers (ISR, ASR)
No Staging Required
PnP Runs from Cisco
Switches (Catalyst®) Wireless Access Points
Factory-Default Configuration
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
Network Plug and Play (PnP) – Components
PnP Server
Cloud Redirect Service
Central Server on APIC-EM
PnP Helper App [ Optional ]
Manages sites, devices, images,
[ Optional ] Roadmap Phase 2 licenses, workflow
Delivers bootstrap, status Provides Northbound REST APIs
and troubleshooting checks
GetConsole
Redpark RJ45 Redpark RJ45
Airconsole2.0
Apple 8pin Apple 30pin
Bluetooth Adapter PnP Protocol
Runs between
PnP Agent Agent and Server
Runs on Cisco® switches, routers, Open Schema
and wireless access points
Automates the deployment process
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
PnP – Simple & Secure & Consistent
APIC-EM PnP Dashboard APIC-EM PnP REST API Support
Device Repository
and Database
APIC-EM API
Automation Framework
(i.e. Python scripts,
configuration generator, etc)
Customer’s Existing
Automation Frameworks
Switches Routers
Wireless AP
(Catalyst) (ISR/ASR)
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Network Plug and Play (PnP) – Templates
PnP Templates
• Introduced in 1.3
• Based on Apache Velocity
• UI Support
• API Support
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
Real-World Example
Traditional IT
• 1st PnP Prodution Reference
• Custom App on top of PnP
‘Config Writer’
• OPEX Reduction
• Standardization
• Enables Innovation
See www.computacenter.com
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
Real-World Example
4. Auto-Provision AP into
correct WLC Group
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
How does my Traffic flow?
Problem: How to capture Application Flow Information along a complex wireless, wired path?
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Path Trace
Accurate 5-tuple path flow-analysis – available via GUI and REST APIs
CAPWAP Tunnel ACL Check Stats: Device, Interface, QoS, Perfmon Link Source Information
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Path Trace
Accurate 5-tuple path flow-analysis – available via GUI and REST APIs
{
"response": { "sourceIP": "65.1.1.83",
"request": {
"sourceIP": "212.1.10.20", "destIP": "212.1.10.20"
"destIP": "65.1.1.6" }
},
"lastUpdate": "Thu Apr 23 01:23:21 UTC 2015",
"properties": [ ],
"networkElementsInfo": [
{
"id": "424621be-d2b4-4d42-ad16-92d4d5c19fa4",
"type": "WIRED",
"ip": "212.1.10.20",
"linkInformationSource": "Wired"
},
{
"id": "8beada2e-cd2c-421d-941f-3ba42696c489",
"name": "CAMPUS-Access1",
"type": "SWITCH",
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
(dynamic) Policy Injection
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Easy QoS App
Client A calls Client sends call setup App Server calls APIC-EM QoS policy enabled
client B info to App server to setup policy on network device
Call ends Client sends call teardown App Server calls APIC-EM QoS policy removed
info to App Server to delete policy from network device
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
Real-World Example
Solution:
1. Upgrade to APIC-EM 1.4
3. Run Commands
5. Read Results
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just
need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
Solution:
1. Upgrade to APIC-EM 1.4
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just
need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
[{'commandResponses': {'BLACKLISTED': {},
'FAILURE': {},
'SUCCESS': {'show configuration id detail': 'Configuration '
Solution: 'version
': 56303\n'
'Last '
'
'change '
'time '
1. Upgrade to APIC-EM 1.4 ': '
'2017-01-19T06:12:53.573Z\n'
'Changed by '
'user '
': cisco\n'
'Changed '
2. Select Devices from Inventory 'from '
'process '
': Virtual '
'Exec',
'show ip interface brief': 'Interface '
'IP-Address '
'OK? Method '
3. Run Commands 'Status
'Protocol\n'
'
'Embedded-Service-Engine0/0 '
'unassigned '
'YES NVRAM '
'administratively '
'down down \n'
4. Wait for Task Completion 'GigabitEthernet0/0
'172.16.2.2 '
'
Solution:
1. Upgrade to APIC-EM 1.4
3. Run Commands
5. Read Results
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Building Apps on Top
See: http://www.anyweb.ch
http://www.hsr.ch
Network
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Cloud Services and Management
Network-enabled Applications
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Cisco Digital Network Architecture
Cloud Services and Management
Network-enabled Applications
Policy | Orchestration
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 57
Separation of IT areas and buying
centers preventing IT to move at the
speed demanded by the business
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – #1 Requirement
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 59
Interacting with Humans – #1 Requirement
Enable
• Rapid Adoption
- TTFHW (time-to-first hellow world): Minutes
- TTFPP (time-to-first production pilot) : Hours
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
Multi-Domain Topology
Visualization
NeXt UI Toolkit
Interacting with Humans – NeXt
Problem: How to quickly provide a Graphical UI for
network-centric custom SDN/DevOps Applications ?
Solution: NeXt
Embedded User eXperience for Network UIs Web Applications
• HTML 5 / JavaScript based
• Open source Topology Component
• Developed within Cisco
• Used by APIC-EM, Glance, DNA and others UI Core
UI Component/View Engine/DOM/AOP/Application Support
• Rapid Adoption
developer.cisco.com/site/neXt/ JavaScript Core
OOP/MVVM/Data Binding/Data Type
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
NeXt is on DevNet – Try it Out
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
It is all open sourced now for free with
eclipse license 1.0
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
Anatomy of a NeXt UI
<html>
• index.html your web page <head>
<link rel="stylesheet" href="dest/css/next.css">
<script src="dest/js/next.js"></script>
can be dynamic, no static body elements required <script src="Data.js"></script>
<script src="Shell.js"></script>
</head>
<body>
</body>
• Data.js topology data </html>
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
Sharing NeXt Code – Client Side JavaScript
NeXt on DevNet
• Documentation
• Tutorials and Labs
• Downloads
• Community
http://developer.cisco.com/site/neXt/
http://communities.cisco.com/community/developer/devnetlabs/next
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
ChatOps
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
Cisco Spark for Developers
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
Interacting with Humans – Spark
Problem: How to post instant information
to a chat room and/or interact?
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
ChatOps Advanced
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: ChatOps with Humans Bots
Bot
Human: @Bot Who has the
lease for 10.100.252.43?
Bot: 10.100.252.43 is
leased by …
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – ChatOps
Problem: What if your Ops users are road
warriors, managers and remote workers?
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 76
Reaching Road Warriors
and Managers
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – Tropo
Example - Simple IVR Readout and Choice
• Create an App in Development Mode
• Script based on QuickStart Examples
• Call in to test (+41 43 508 13 03)
• Evolve ...
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 80
Agenda
Automation Analytics
Controller-Level APIs
Abstraction & Policy Control Network Data, Examples include: APIC-EM NB REST API,
from Core to Edge Contextual Insights DNA Analytics NB API, ...
Cloud-enabled | Software-delivered
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 82
What can DevNet Accelerate Your Journey
do for me? as you and your business
adopt Programmability and
DevOps Practices
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 83
Helping you on the Journey….
Learn Code Inspire
Technology Tracks
DevNet membership
Learning Paths 300+ Network
DevNet Zone
350,000+ Partners and Growing
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 84
DevNet Learning Labs
• Self paced learning
• Modular format (modules 10 – 45
min in duration)
• Beginner and refresher content
• Content includes; programming
technologies, concepts and APIs
learninglabs.cisco.com
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 85
Join a DevNet Express
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 86
Join a DevNet Express
DNA Programmability free flowing step-by-step
Hackathon Instructor-Led
Training (ILT)
• Learn and be inspired
• Meet with Peers
Technical
• Engage with DevNet Seed Talks
Side-by-side
• Seed Talks, Hands-On Missions, Exploration
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
To learn more about the API just described and other LEARN
development opportunities…
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 89
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Lunch & Learn
• Meet the Engineer 1:1 meetings
• Related sessions
PSOCRS-3114 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 90
SDN @ CiscoLive 2017
Software-Driven Network Architectures
• Analytics
• Automation
• Programmability
• Virtualization
Highlights Include:
BRKSDN-1009 Python 101 for Network Engineers
BRKSDN-2935 From Zero to Network Programmability in 90 minutes - APIC-EM, Prime Infrastructure, UCSD, Spark and Tropo
BRKARC-3004 APIC-EM: Policy automation with DNA and network automation easy, fast, reliable
BRKSDN-1001 Programming Cisco APIC Enterprise Module with visual oriented programming languages
BRKSDN-2046 DNA Quality of Service
BRKSDN-2066 Service Function Chaining: Programming Your Data and Service Planes
BRKSDN-2116 Containers on routers and switches: Run your apps and tools natively on Cisco boxes
BRKSDN-3004 DNS-AS - How to use DNS as a Source of Metadata to Identify your Applications for QoS and Beyond...
BRKSDN-3900 Network Automation with the Meraki API
BRKSDN-2901 Next-gen Network Telemetry is Within Your Packets: In-band OAM
PSOCRS-3114 13 Smart Ways to Program Your Cisco Network
LTRSDN-2500 A Practical Look at Cisco Application Policy Infrastructure Controller Enterprise Module (APIC-EM): Hands-On Lab
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
LTRSDN-2870 Implementing Cloud based virtual managed services with NFV & vBranch
Q&A
What will YOU
Program First?
Thank You