Working at cloud Speed with the next generation IOS-XR Patrick Warichet, Technical Marketing Engineer ([email protected]) Bhavna Prasad Product Management Engineer ([email protected]) BRKSPG-2069 Cisco Spark

Questions? Use Cisco Spark to chat with the speaker after the session

How 1. Find this session in the Cisco Live Mobile App 2. Click “Join the Discussion” 3. Install Spark or go directly to the space 4. Enter messages/questions in the space

Cisco Spark spaces will be cs.co/ciscolivebot#BRKSPG-2069 available until July 3, 2017.

© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Agenda

• Introduction

• Software Architecture Overview

• Flexible Packaging

• Application Hosting

• Configuration, Monitoring and Troubleshooting

• Examples

• Conclusions Introduction An Evolved Network for a Rapidly Changing Web and SP Landscape

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 6 Key Learning Objectives

• At the end of the session, you should be able to:

• Appreciate rapidly evolving network infrastructure landscape

• Understand how Cisco is evolving IOS-XR network operating systems to meet customer needs

• Identify technical principles of Evolved IOS-XR

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 7 Digitization Drives Data and Infrastructure to the Edge

INCREASING DIGITIZATION A shift in the network model 2014—3.4 ZB 2019—10.4 ZB must occur

60% 31% 37% Inter-DC Most Data Will Cloud Workload Traffic Be Processed Increase Growth at the Edge

Source: Cisco Consulting Services Global IoT Study, 2014; 1230 respondents Cisco Global Cloud Index Forecast, 2014–2019 BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 8 Automating Provisioning Down to Minutes

Traditional Cloud Scale Day 0 Day 1 Day 2 Network Operations Network Operations

INSTALL CONFIGURE Plug in new device Plug in new device

Operating System Automated Boot Network Operations Center Upgrade (Manual)

Manual staging CLI Script Operating Configuration System Configure new device remotely Auto-provisioning (Manual)

Traditional Cloud Scale Device up and running Device up and running Networking Operations Networking Operations • Manual device onboarding • Reduced time to install and provision new devices • Lengthy installation and 4 Hours to 3 Days 10 to 15 Minutes provisioning procedures Operating • Faster disaster recovery System • Automated device onboarding

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 9 Traditional NetOps Upended by Evolved Needs of SP Customers

Traditional Network Evolved SP/Cloud Scale DevOps Operations Network Operations

Day 0

Manual INSTALL • Automated services Automation Provisioning • Simple to scale

Day 1 • Agile, open software SW Inflexible Modularity SW & CONFIGURE Extensibility Fragmented Topology Visibility & Day 2 View and Control Complex Routing MANAGE & OPTIMIZE * Source: Google

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 10 Cisco Evolved IOS XR Innovations Designed for Operational Fit

Software Modularity Automation Visibility and Control and Extensibility Data Third- Service Agility Model party Simplification Driven Agents Telemetry

Asynchronous Upgrade APIs Support Visibility

Granular packaging Modularity Better Customer Open Innovation Experience Operational Efficiency Docker Application Engineered Application Automated Boot and Routing Hosting Auto-provisioning Control Containers

Extensibility Visibility and Control

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 11 Evolved IOS-XR Enablement across Platforms

Shipping

In progress

NCS5001 NCS5011 NCS1002 w/ macsec

NCS5002 NCS5502

NCS5508 NCS1002 NCS5501 ASR9000 64-bit NCS 6000

Q4 CY15 Q4 CY16 CY17

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 12 Pillars of Evolved IOS-XR

Visibility & • Operational Data, Deep analytical hooks Telemetry • Model-based, flexible, Push Model

Evolved • Data accessible via published model driven interfaces (Openconfig & Netconf) • Machine friendly Programmability • Enables automation @ scale

Application • Ability to run 3rd party off the shelf applications built with Linux tool chains Hosting • Run custom applications inside a separate LXC container

• Packages can be inspected on box using standard tool chain (RPM tools) Flexible Platform • Automated installation with dependency checking and Packaging • Open Bootloaders (iPXE) and end-to-end auto-provision • 64-bit Linux

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 13 Software Architecture IOS-XR 6.X: A New Software Infrastructure

• 64-bit OpenEmbedded Linux support. • Processes containerization. Classic XR XR 6.X • Standard Linux toolchain. • Third-Party applications. System System Control Admin Control Admin • NCS5500, NCS5000 and NCS1002 support 64-bit Linux. 32 bit QNX 64 bit Linux NPU X86 Hardware

• ASR 9000 supports 64-bit Linux starting with 6.1.1. • Will still have 32-bit QNX support.

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 15 Introduction to Virtualization

• With eXR, the Admin plane and the Control Plane run in isolated environment. NCS5000-5500 ASR9K • ASR9K uses Virtual Machines (VMs) App App • NCS5000 and NCS5500 use containers App App (LXCs) … Lib Lib … Lib Lib • Provide the same functionalities OS OS Operating System • Use same tools (libvirsh) to Hypervisor Provide the virtualization services X86 Hardware Operating System X86 Hardware • LXCs are lightweight no ISSU support

• VMs are heavier but provide ISSU support

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 16 Why Virtualization ?

• LXCs and VMs Provide HW abstraction Each instance has its • own network interfaces • - Can be bridged, routed... • own filesystem • - e.g.: RedHat host can run container or VM.

• LXCs and VMs provide Isolation between instances • Security • - Two containers or VMs can't harm (or even see) each other. • Resource usage • - Soft & Hard quotas for RAM, CPU, I/O can be assigned on Containers or Vms

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 17 IOS-XR Container Architecture Physical Virtual Router

Control Admin Third Plane Plane Party Virtual Machine

64-bit Host OS Control Admin Data Third Plane Plane Plane Party

Routing Processor

Control

Plane 64

64-bit Host OS

Line Line Card - Fabric bit Host OS

Linux Hypervisor

Admin Admin Plane X86 Hardware

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 18 IOS-XR Container Architecture Modular Router Fixed Router

LXC LXC LXC LXC LXC LXC Control Admin Third Control Admin Third Plane Plane Party Plane Plane Party

64-bit Host OS 64-bit Host OS

Routing Processor Routing Processor

Control

Plane

64

LXC

FrontPanel

Line Line Card -

Fabric bit Host OS Fabric

Admin Admin

Plane LXC

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 19 IOS-XR Entities Roles: The Host

• Runs Yocto based 64-bit Open Embedded . • Built using Windriver 7

• The main functions of the host are: • Interact directly with the underlying hardware. • Provide kernel services for the LXcs/VMs • Provide libraries, tools, and utilities to help launch, monitor, and maintain containers. • Provide the network infrastructure to allow containers to Control Admin Third • communicate. Plane Plane Party

64-bit Host OS

Routing Processor

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 20 Container Architecture (NCS 5500 and NCS-5000)

Runs processes Cisco developed responsible to perform Runs any 64-bit Linux packages for core system diags, monitor distribution. network functions env. variables, and Launched from the XR (BGP, MPLS, etc.) manage hardware container using virsh components and libvirtd. Yocto packages for Control standard Linux tools Admin First container to be Third Access Network Plane and libraries Plane booted by the host, Party Interface through the (bash, python, responsible for the start Global VRF Network tcpdump, etc.). and maintenance of the Name Space. Control Plane container

64-bit Host OS

Routing Processor

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 21 Container Architecture (ASR9K)

VM LXC Runs any 64-bit VM Runs processes Cisco developed . responsible to perform packages for core Launched from the system diags, monitor env. network functions XR virtual machine variables, and manage (BGP, MPLS, etc.) using virsh and hardware components Control Third libvirtd. Admin Yocto packages for Plane Party Plane First VM to be booted by standard Linux Access Network the Hypervisor, tools and libraries Interface through the responsible for the start (bash, python, Global VRF Network and maintenance of the tcpdump, etc.). Name Space. Control Plane VM

Hypervisor 64-bit Host OS Routing Processor

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 22 IOS-XR 6.X Boot Process - iPXE

• All NCS routers are equipped with a UEFI 64-bit Firmware (aka BIOS).

• Supports initial booting from USB drive or iPXE.

• iPXE is an open source boot firmware.

• Fully backward compatible with PXE with several enhancements. • Boot from a web server via HTTP. • Control the boot process with scripts and menus. • DNS support.

• iPXE is supported on the management interfaces.

• Supports both IPv4 and IPv6.

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 23 IOS-XR 6.X Image Format and Boot Process

• IOS-XR 6.X images are released in the form of bootable self-extracting ISOs. • Similar to any Linux distribution.

• IOS-XR 6.X comes with a Zero Touch Provisioning (ZTP) process. • Executed at the end of the control-plane boot sequence. • Executed inside a Shell environment (e.g.: bash). • Can use any IOS-XR interface. • Can execute scripts or apply static configuration.

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 24 DHCP SERVER

IOS-XR Boot Process with iPXE IP address Next-server iPXE Filename=http:///image-new.ISO N boot 1 Y IP address Next-server iPXE 2 Filename=http:///script-SN.sh or Filename=http:///config-SN.txt XR Install HTTP SERVER

XR Boot 3 Image-new.ISO

4 GET script-SN.sh or config-SN.txt AutoProvision script-SN.sh execution config-SN.txt

5 Additional Apply GET addon scripts/packages/configuration Scripts Execute script configuration Packages, etc… BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 25 Single DHCP Server Configuration host NCS5500-rp0 { hardware ethernet e4:c7:22:be:10:ba; DHCP fixed-address 192.168.0.10; option 77 If exists user-class and option user-class = "iPXE" { DHCP # Image request, provide ISO option 67 filename "http://192.168.0.10/images/ncs5500-mini-x.iso-r6.1.1"; } elsif exists user-class and option user-class = "exr-config" { # Auto-provision request, provide script or configuration DHCP option 77 filename "http://192.168.0.10/scripts/ncs5500-rp0.sh"; } DHCP } option 67

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 26 Flexible Packaging Networking Software Delivery Direction

• Server-like Workflows

• Modular Disaggregated

• Update, Upgrade, Remove • RPM – RPM

• Dependency management • – Yellowdog Updater Modified

• Secure • New Install Commands

• Repository Support

• Third Party Applications

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 28 RPM: IOS-XR New Package Format

• RPM Package Manager is the new Package format starting with IOS-XR 6.0.

• Packages are placed in a reachable repository and accessed via FTP/SFTP/SCP/TFTP or HTTP or pre-staged on the box

• Third Party packages are installed with RPM or YUM inside the Shell.

• IOS-XR packages are installed with “install update/upgrade”.

• Install commands are a wrapper around YUM to provide multi-arch support.

• Both YUM and install commands provide dependency verification/resolution.

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 29 Anatomy of RPM Packages

RPM

Archive binary archive

Describe package contents MetaData Install structure /var/lib/rpm Dependencies

Scriptlet Pre and Post install instructions Database of installed packages

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 30 XR Packages Naming Convention

Package --..rpm

ncs5500-mgbl-3.0.0.0-r612.x86_64.rpm

Major.Minor.Build.SMU SMU --...rpm

ncs5500-mgbl-1.0.0.1-r612.CSCab12345.x86_64.rpm

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 31 Package Repository www.cisco.com Local Repository

Mini ISO Platform + Pkgs 6.1.2 Release Mini ISO ncs-5500-mini-x.iso-6.1.2 + k9 pkg ncs-5500-mpls-te-rsvp-2.2.0.0-r612.x86_64.rpm XR Software + Pkgs ncs-5500-isis-1.1.0.0-r612.x86_64.rpm

Full K9 ISO ncs-5500-mcast-2.0.0.0-r612.x86_64.rpm ncs-5500-k9sec-1.0.0.0-r612.x86_64.rpm Full ISO ncs-5500-mgbl-3.0.0.0-r612.x86_64.rpm

XR SMUs DDTS SMU ncs-5500-mpls-2.1.0.0-r612.x86_64.rpm ncs-5500-ospf-1.1.0.0-r612.x86_64.rpm

Svc Pak DDTS SMUs ncs-5500-mgbl-3.0.0.1-r612.CSCab12345.x86_64.rpm

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 32 ISO Customization : Golden ISO

gisobuild.py Open ISO

Boot ISO Install PKG/SMUs Install PKG/SMUs Apply Configuration Reboot iPXE USB Apply System Upgrade Configuration

Golden ISO BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 33 Updating XR Packages

Command Line Behavior install update source No package specified, update latest SMUs of all installed packages install update source ncs5500-mpls Package name specified, will install that package, update all latest SMUs of that package(s) (along with its dependencies). install update source ncs5500-mpls- SMU installation: the SMU will be downloaded and 1.0.0.1-r611.CSCab12345.x86_64.rpm installed (along with its dependent SMUs). install update source ncs5500-mpls- Asynchronous package upgrade, that package will 1.0.2.0-r621.x86_64.rpm be installed (along with its dependent SMUs). Available since 6.1.1

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 34 Upgrading XR Packages

Command Line Behavior install upgrade source version 6.1.3 Upgrade the base image to the specified version. All installed packages will be upgraded to same release as the base package. install upgrade source version 6.1.3 Perform install upgrade and install update for a ncs5500-mpls-1.0.2.0-r611.x86_64.rpm specific package(s) in one operation.

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 35 Asynchronous Updating

• Deliver a functional feature (such as BGP) independent of XR release

• Installer checks dependency

BGP 6.1.3 RPM BGP 6.1.2 BGP 6.1.2 BGP 6.1.2 BGP 1.1.0.0 OSPF 6.1.1 OSPF 6.1.3 BGP 1.1.0.0 RPM RPM RPM OSPF 1.1.0.0 OSPF 1.2.0.0 OSPF 1.2.0.0 OSPF 1.1.0.0 OSPF 1.2.0.0 RPM Install Release 6.1.2 Release 6.1.2 RPM Release 6.1.2 Release 6.1.2 Base Base Base Base

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 36 PIE Install RPM Install

• No dependency • Dependency management management • Online process over secure • Offline process required to transport copy packages • Single operation • Require multiple operations • install update or install upgrade • install add • install activate • On-box / Off-box package • install commit inspection using rpm tool • Description • Cisco Software Manager • Dependencies (CSM) for package content • Content

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 37 Installing and Updating Third Party Packages

• Third Party Packages are traditional Linux tools available from the Shell • Communication: lighttpd ,openssh, wget, curl, etc. • Programming: python, ruby, perl, etc. • Utilities: sed, gawk, tar, , vi, etc.

• Additional packages provided by vendors (No Cisco Support) • Chef • Puppet

• Installed using yum or rpm

yum-config-manager --add-repo=http://192.168.0.254/XR/6.X.0 yum install chef –y

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 38 Ansible, Puppet and Chef

• Open Source Software with Commercial Support or Add-Ons.

• Configuration management tools.

• Idempotent

• Describe infrastructure as code. • Can then be managed from within a VCS such as git. • Changes are attempted, shared, rolled forward and rolled back in a much more frictionless way than traditionally.

• Agentless • Agent based • Agent based • Uses Python 2.7 • Uses Ruby based DSL • Uses a subset of Ruby for for configuration configuration • Communicates over SSH

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 39 Application Hosting Application Hosting Inside the Control Plane Inside the Third Party LXC

• Visibility of all XR processes • No direct visibility of XR processes

• Visibility of all XR resources • No direct visibility of XR resources

• Run alongside XR Processes • Run in a separate namespace • No isolation • Isolation

• Must be built for WRL7 • Must be built for the third

distribution VM/LXC party LXC distribution LXC LXC

Control Third Third Plane Party Party

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 41 Global VRF Network Name Space

• Provides visibility of fabric attached interfaces outside of XR CLI. Control Plane Admin Plane Third Party Global-VRF Global-VRF • Available to processes Mgmt Mgmt inside the Control Plane or Internal Gig Gig Third Party containers. IPC TenGig Interfaces TenGig • Requires that the interface HunGig HunGig is up.

• Routing handled by XR. Global-VRF 64-bit Host OS Routing Processor

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 42 Third Party Container Application Workflow

• Create the Container archive on a 2 Deploy 3 Launch Linux Server.

• Copy the to Server /misc/app_host.

• Unarchive in a rootfs directory.

• Create XML file specifying LXC Control Admin Third TAR parameters. Plane Plane Party

• Run virsh command. 1 Create 64-bit Host OS Routing Processor

virsh create

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 43 XML File example xr-lxc-app 327680 exe /sbin/init 1 /usr/lib64/libvirt/libvirt_lxc destroy restart destroy

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 44 Demo

3rd Party LXC

Control Admin Plane Plane iPerf Session

rtr1

• RTR1 and the Linux host are deployed using Vagrant and Virtual Box • A Third Party LXC is pushed from the Linux host to RTR1 • RTR1 is running Ubuntu inside the 3rd Party LXC • iPerf is running inside the container and a session is created with the Linux host

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 45 Configuration, Monitoring and Troubleshooting Model-Driven Programmability Stack

Model-Driven Apps App1 App2 App3 Configuration

Model-Driven APIs APIs YANG Development Kit (YDK)

Protocol NETCONF RESTCONF gRPC

Encoding XML JSON GPB

Transport SSH HTTP HTTP/2

YANG Models Model-Driven Models (native, open) Telemetry

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 47 Programmatic Configuration using Data Models

• YANG: A Data Model Language • Explicitly and precisely determines the structure, syntax and semantics of the Protocols data… • …that is externally visible • Consistent and complete Instance • NETCONF, RESTCONF, GRPC: Protocols Data • Provides primitives to view and manipulate data Data • Encoding of the data as defined by the data model Model

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 48 Benefits of Model-Driven Programmability

• Model based, structured, computer friendly

• Multiple model types (native, OpenConfig, IETF, etc.)

• Models decoupled from transport, protocol end encoding

• Choice of transport, protocol and encoding

• Model-driven APIs for abstraction and simplification

• Wide standard support while leveraging open source

Reduce Operational Costs

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 49 Introduction to YANG

• Modeling language Leaf Leaf list (initially for NETCONF)

• Main node types • Leaf – node with name and value of Container certain type (no children) (grouping) List • Leaf list – sequence of leafs • Container – groups nodes and has no key value • List – Sequence of records with key Container leafs (presence)

Node without a value Node with a value

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 50 YANG Model Example

YANG CLI container community-sets { community-set CSET1 description “Container for community sets"; 65172:1, list community-set { 65172:2, key community-set-name; 65172:3 description "Definitions for community sets"; end-set leaf community-set-name { ! type string; community-set CSET10 description "name of the community set"; 65172:10, } 65172:20, leaf-list community-member { 65172:30 type string { end-set pattern '([0-9]+:[0-9]+)'; ! } description "members of the community set"; } } }

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 51 Model Data Example

JSON CLI { "community-sets": { community-set CSET1 "community-set": [ 65172:1, { "community-set-name": "CSET1", 65172:2, "community-member": [ 65172:3 "65172:1", end-set "65172:2", ! "65172:3" ] community-set CSET10 }, 65172:10, { "community-set-name": "CSET10", 65172:20, "community-member": [ 65172:30 "65172:10", end-set "65172:20", ! "65172:30" ] } ] } }

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 52 YANG Models (Github)

IOS XR Models XR models per release

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 53 NETCONF Protocol Overview

• Rich functionality to manage configuration and operational (state) XML data

• Operations defined as RPCs (request / reply) in XML NETCONF

• Client/app initiate request towards server/device SSH • Supports running, candidate and startup configurations YANG • Capability exchange during session initiation

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 54 Network Configuration Protocol (NETCONF)

• NETCONF provides mechanisms to install, manipulate, and delete device configuration.

• It uses an XML based data encoding for the configuration data as well as the protocol messages.

• NETCONF protocol operations are realized as remote procedure calls (RPCs) over SSH. SSH Clients Networking Device SSH Retrieve, Configure, Copy, and Delete

RPC calls are divided in 4 groups of methods: Retrieve, Configure, Copy, and Delete. Additional methods can be supported

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 55 Main NETCONF Protocol Operations

Operation Description get-config Retrieve all or part of a specified configuration

Loads all or part of a specified edit-config configuration (merge, replace, create, delete, remove)

copy-config Create or replace an entire configuration datastore

get Retrieve all or part of running configuration and device operational data

get-schema Retrieve device schema (model)

lock Lock entire configuration datastore (e.g. candidate)

unlock Remove lock on entire configuration datastore (e.g. candidate)

close-session Request graceful session termination

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 56 Model-Driven APIs

• Simplify app development Class Hierarchy YANG Model (Python, C++, Ruby, Go) • Abstract transport and encoding

• Generated from YANG model

• One-to-one correspondence between model and class hierarchy

• Multi-language (Python, C++, Ruby, Go, etc.)

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 57 Generation of Model-Driven APIs Using YANG Development Kit (YDK)

YDK Python Docs YDK-Py

YDK-gen Data C++ Docs YDK-CPP Models API YANG(YANG) YANYANG Generator Ruby Docs G

go Docs

: :

C♯ Docs

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 58 Programmatic Interface

Secure Connection Negotiate RPC-based Configuration Manager Transport Oriented Capabilities communication model

Backend Apps XR SSH NETCONF YANG SSHd Programmatic Proxy Agent Framework SysDB Interface Server Client SysDB Library

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 59 RESTCONF Protocol Overview

• RESTful API for NETCONF

• Functional subset of NETCONF JSON XML

• Single hierarchy of resources (data + allowed methods) RESTCONF • Resource hierarchy rooted at ‘restconf/’ HTTP / HTTPS • Configuration and operational data located under ‘restconf/data’

• Web app friendly YANG

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 60 Main RESTCONF Protocol Operations

Operation Description

Retrieve data for a resource GET (config/operational)

POST Create a configuration data resource

Create or replace a configuration data PUT resource Merge configuration data with target resource

DELETE Delete a configuration data resource

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 61 Overview of gRPC on Cisco IOS XR

• Google RPC provides a general (open source) RPC framework JSON CLI • Interface definition in Cisco IOS XR specifies device operations Cisco gRPC • Functional subset of NETCONF

• Simple client development HTTP/2 • High performance

YANG

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 62 Protocol Operations in Cisco IDL

Operation Description GetConfig Retrieve configuration MergeConfig Merge configuration DeleteConfig Delete configuration ReplaceConfig Replace configuration CommitReplace Replace entire configuration GetOper Retrieve operational data CliConfig Merge configuration data in CLI format ShowCmdTextOutput Retrieves CLI show-command output data

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 63 Streaming Telemetry: Introduction

Where Data Is Created Where Data Is Useful

SNMP

syslog Sensing & Measurement Storage & Analysis CLI Strong burden on back-end Normalize different encodings, transports, data models, timestamps

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 64 Traditional Monitoring Concepts No Longer suited for Cloud-Scale Network Operations

Where Data Is Created Where Data Is Useful

SNMP

syslog Sensing & Measurement Storage & Analysis CLI Strong burden on back-end Normalize different encodings, transports, data models, timestamps

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 65 Streaming Telemetry Concepts Better suited for Cloud-Scale Network Operations

Where Data Is Created Streaming Telemetry Where Data Is Useful

Push paradigm

One consistent way to access Statistics, Oper Sensing & state & Events @ all layers Measurement High Performance: 10 sec Storage & Analysis Multiple encodings & Transport Volume: Scale of Data Velocity: Analysis of Streaming Data Variety: Different Forms of Data

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 66 Streaming Telemetry Design Vision

• Get as much data off the box as Performance quickly as possible

• Grant full access to all operational Coverage data on the box*

• Serialize the data in a flexible, Automation efficient way that fits customers automated tools

*User needs to have the correct privileges

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 67 Telemetry

• Common modeling language • Describes monitoring data structure and attributes • Goal is YANG (6.1.1) • 6.0.0 and 6.0.1 use experimental SysDB name space

• Push Model • Stream data continuously with incremental updates based on subscriptions

• Data delivery • JSON (compressed) inside TCP • Google Protocol Buffer inside UDP • Google Protocol Buffer inside gRPC (6.1.1)

• Observe network state through a time-series data stream

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 68 Streaming Telemetry Model

• Telemetry Configuration XR Control Plane Telemetry • Define one or multiple collection YANG group(s). Configuration SysDB • Each group contains a rate and a pointer to one or more Yang models - or objects in the SysDB path (6.0.0, 6.0.1 only) • Define the encoder, transport and the receiver(s) for each sensor group. Telemetry • Telemetry Agent Receiver • XR process that runs automatically Telemetry and looks for registered sensors to act Agent on. • Policy-based Telemetry Host OS • Model-driven Telemetry (MDT)

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 69 Layers of Functionalities

• Unstructured/partially structured data (syslogs, debug traces) Data • Text • Structured data Representation • YANG models

• Binary formats • Compact Google Protocol Buffer(GPB) • Self-describing Google Protocol Buffer(GPB) Encoding • ASCII • JSON • XML

• GRPC Transport • TCP • UDP

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 70 Streaming Telemetry Example (6.0 and 6.0.1)

{ "Name": "GenericCounters", "Metadata": { "Version": 25, "Description": "This is a sample policy to demonstrate the syntax", "Comment": "This is the first draft", "Identifier": "" }, "CollectionGroups": { "FirstGroup":{ "Period": 30, Cadence "Paths":["RootOper.InfraStatistics.Interface([*]).Latest.GenericCounters"] SysDB } Path } }

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 71 Model Driven Telemetry Example (6.1.1)

RP/0/RP0/CPU0:Sun601#show run telemetry

Tue Jul 5 17:56:19.745 UTC telemetry

destination 1 GRPC with GPB encoding encoding self-describing-gpb

protocol grp

destination-address ipv4 192.168.0.22 2122 Native Yang Model !

sensor-group 1

sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/ generic-counters

! subscription 1 Cadence sensor-group-id 1 sample-interval 30000

destination-id 1 Follows the Openconfig Telemetry Configuration YANG model BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 72 Model-Driven Telemetry Example telemetry model-driven destination-group DGroup1 address family ipv4 10.60.19.8 port 2104 Where to Send and How encoding self-describing-gpb protocol tcp GRPC with GPB encoding ! sensor-group SGroup1 sensor-path Cisco-IOS-XR-infra-statsd-oper:infra- What Data to Collect statistics/interfaces/interface/latest/generic-counters Native Yang Model ! subscription Sub1 sensor-group-id SGroup1 sample-interval 10000 How Often destination-id DGroup1

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 73 Examples iPerf Based Path Selection in OSPF

3rd Party LXC 3rd Party LXC

Control Admin Admin Control Plane Plane Plane Plane iPerf Session

rtr1 rtr2 OSPF

• Each router is running a Linux distribution (Debian, Red Hat, etc…) inside the 3rd Party LXC • iPerf is running inside the container and a session is created between the two routers • Link degradation is detected by iPerf inside the container • Netconf client inside the container will update the OSPF cost of links based on iPerf result

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 75 Automatic BGP prefix-monitoring and Alerts

Kibana Logstash Elasticsearch Telemetry Data “external” Vary Telemetry automatically Receiver

XR Third Party LXC Telemetry LXC BGP Data Monitor “local” telemetry data Telemetry Telemetry Agent-”external” Agent-”local” Telemetry eBGP Helper

Telemetry Telemetry Telemetry Policy-”external” Policy-”local” Receiver

Automatically update Policy file

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 76 Conclusions Key Takeaways

• No Change in traditional CLI Operation with IOS-XR 6.X

• 6.X is available on NCS5500, NCS5000 and NCS1000 Platforms

• 6.1.1 is available on ASR9k (traditional 32-bit QNX offering will still be supported)

• Operational enhancement for Automated Operations

• Operating System change for Open Source tooling

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 78 IOS-XR 6.X Operational Enhancements

IOS-XR 6.X

& Packaging &

Application Hosting Application

Visibility Telemetry & Visibility

Evolved programmability Evolved Flexible PlatformFlexible

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 79 Related Sessions

• BRKSPG-2303: Model-driven programmability for Cisco IOS XR

• BRKSPG-2333: Model-Driven Telemetry: The Foundation of Big Data Analytics

• BRKARC-2022: Introduction to High Performance Network Convergence System Routers (NCS6008, NCS5000 and NCS5500)

• BRKSPG-2404: IOS-XR Platforms: System and Hardware Architectures

• CTHSPG-2900: Intoduction to NCS 5500 and NCS 5000

• LTRSPG-2601: Cisco IOS XR Programmability

• DEVNET-1775: Introduction to OpenConfig

• DEVNET-1002: DevNet Workshop - NetDevOps for the Network Dude - How to get started with API's, Ansible and Python

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 80 References

• IOS-XR Documentation, Blogs Tutorials and more : https://xrdocs.github.io/

• IOS-XR YANG Models: https://git.io/vg7fk YANG Developer Kit: http://ydk.cisco.com/py/docs/

• Getting Started With OpenConfig in Cisco IOS XR: https://git.io/vg7vF

• Getting Started With gRPC in Cisco IOS XR: https://git.io/vg7vP

• IOS-XR Ansible: https://github.com/ios-xr/iosxr-ansible

• IOS-XR Puppet: https://docs.puppet.com/pe/latest/install_iosxr.html

• IOS-XR Chef: https://downloads.chef.io/chef-client/iosxr/

• Cisco IOS XR 6.0 Application Hosting Lab v1: https://dcloud-cms.cisco.com/demo/cisco-ios-xr-6-0-application-hosting-lab-v1 • Cisco IOS XR 6.0 Software Management Lab v1: https://dcloud-cms.cisco.com/demo/cisco-ios-xr-software-management-lab-v1 • Cisco IOS XR 6.0 End-to-End Automation Lab v1: https://dcloud-cms.cisco.com/demo/cisco-ios-xr-6-0-end-to-end-automation-lab-v1

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 81 Complete Your Online Session Evaluation

• Give us your feedback to be entered into a Daily Survey Drawing. A daily winner will receive a $750 gift card. • Complete your session surveys through the Cisco Live mobile app or on www.CiscoLive.com/us.

Don’t forget: Cisco Live sessions will be available for viewing on demand after the event at www.CiscoLive.com/Online.

© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Continue Your Education

• Demos in the Cisco campus

• Walk-in Self-Paced Labs

• Lunch & Learn

• Meet the Engineer 1:1 meetings

• Related sessions

BRKSPG-2069 © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 83 Q & A Thank you