DEVNET-1775 Introduction to OpenConfig Santiago Álvarez, TME
Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 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 cs.co/ciscolivebot#devnet-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Model-Driven Manageability Apps APIs App App App Model-Driven APIs YANG Development Kit (YDK) Model-Driven Configuration Protocol NETCONF RESTCONF grpc Encoding XML JSON GPB Transport SSH HTTP Models YANG Models (native, open) Model-Driven Telemetry DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Data Models in Cisco Routers Native Open (OpenConfig / IETF) Data (config and operational) and actions/commands (RPCs) in a tree structure Self-documented and shipped with devices Native (XR/XE/NX specific) and open (vendor neutral) models Native models provide most coverage Open (OpenConfig and IETF) provide reduced coverage Open models internally mapped to native models DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
OpenConfig Introduction Operator group pursuing more dynamic and programmable networks Specifications designed by operators for operators Initial specifications made public mid- 2015 Model coverage still limited, but model development rapidly evolving DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
OpenConfig Major Components Data Config / oper models YANG Management Protocol grpc Network Management Interface (gnmi) protobuf Operational RPCs grpc Network Operations Interface (gnoi) protobuf DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
OpenConfig Data Model Principles Modular model definition Attention to model consistency Model structure combines Configuration (intended) Operational data (applied config and derived state) Model backward compatibility Driven by use of semantic versioning (xx.yy.zz) Diverges from IETF YANG guidelines (full compatibility) module: openconfig-bgp tree-path /bgp/neighbors/neighbor/transport +--rw bgp! +--rw neighbors +--rw neighbor* [neighbor-address] +--rw transport +--rw config +--rw tcp-mss? +--rw mtu-discovery? +--rw passive-mode? +--rw local-address? +--ro state +--ro tcp-mss? +--ro mtu-discovery? +--ro passive-mode? +--ro local-address? +--ro local-port? +--ro remote-address? +--ro remote-port? DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
OpenConfig Data Model Design Each module subtree declares config and state containers Lists are enclosed in a container List key definition points to leafs in config container String patterns regex POSIX (instead of W3C as defined at IETF) module: openconfig-bgp tree-path /bgp/neighbors/neighbor +--rw bgp! +--rw neighbors +--rw neighbor* [neighbor-address] +--rw neighbor-address +--rw config +--rw peer-as? +--rw local-as? +--rw peer-type? +--rw auth-password? +--rw remove-private-as? +--rw route-flap-damping? +--rw send-community? +--rw description? +--rw peer-group? +--rw neighbor-address? +--ro state : DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Native vs Open Data Models Native Model Open Model Native device config/oper data Mapped config/oper data Deviations Native data models provide most configuration and operational coverage Open models mapped to native data models Departures from open models specified as deviation module DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Open Model Mapping Model-Driven APIs YANG Development Kit (YDK) Management Protocol Native Data Models Open Data Models Model Mapping Model mapping converts open model data to native model data and vice versa Support for mapping config and operational data (including telemetry) Single view of config and operational data in internal datastore Planning to enable user defined mapping (Model Mapping SDK) Internal Datastore DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
OpenConfig Releases in IOS XR 6.0.0 6.0.1 6.1.1 6.2.1 oc-bgp rev2015-05-15 oc-routing-policy rev2015-05-15 oc-mpls v0.2.1 (cfg) oc-interfaces v0.2.0 oc-if-aggregate v0.2.0 oc-if-ethernet v0.2.0 oc-if-ip v0.2.0 oc-telemetry rev2015-07-28 oc-mpls v0.2.1 (cfg+oper) oc-telemetry v0.2.0 oc-bgp v1.1.0 oc-routing-policy v1.1.0 oc-vlan v0.1.1 oc-rib-bgp v0.2.0 oc-local-routing v1.0.0 oc-platform v0.4.0 oc-terminal-device v0.2.0 DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
OpenConfig Releases in NX-OS 7.0-3-I5-1 7.0-3-I6-1 oc-interfaces v1.0.2 oc-if-aggregate v1.0.2 oc-if-ethernet v1.0.2 oc-if-ip v1.0.2 oc-bgp v2.1.0 oc-local-routing v1.0.0 oc-routing-policy v2.0.1 oc-vlan v1.0.2 DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Future Work Items Implement recently defined models Forwarding (abstract forwarding table) Network instance (VRF, VSI, etc.) IS-IS ACL OSPF SR Newer versions (revisions) for models already supported DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
OpenConfig BGP: Overview (openconfig-bgp) Model for BGP configuration and operational data Three top-level containers: Global Neighbors Peer groups Multi-protocol support module: openconfig-bgp +--rw bgp +--rw global... +--rw neighbors... +--rw peer-groups... DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
OpenConfig BGP: Neighbors and Peer Groups module: openconfig-bgp tree-path /bgp/neighbors +--rw bgp! +--rw neighbors +--rw neighbor* [neighbor-address] +--rw neighbor-address +--rw config... +--ro state... +--rw timers... +--rw transport... +--rw error-handling... +--rw logging-options... : module: openconfig-bgp tree-path /bgp/peer-groups +--rw bgp! +--rw peer-groups +--rw peer-group* [peer-group-name] +--rw peer-group-name +--rw config... +--ro state... +--rw timers... +--rw transport... +--rw error-handling... +--rw logging-options... : DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
OpenConfig BGP Configuration Example (1/4) router bgp 65001 address-family ipv4 unicast! neighbor-group IBGP remote-as 65001 update-source Loopback0 address-family ipv4 unicast!! neighbor 172.16.255.2 use neighbor-group IBGP!! CLI DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
OpenConfig BGP Configuration Example (2/4) XML <bgp xmlns="http://openconfig.net/yang/bgp"> <global> <config> <as>65001</as> </config> <afi-safis> <afi-safi> <afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> <config> <afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> <enabled>true</enabled> </config> </afi-safi> </afi-safis> </global> DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
OpenConfig BGP Configuration Example (3/4) <peer-groups> <peer-group> <peer-group-name>ibgp</peer-group-name> <config> <peer-group-name>ibgp</peer-group-name> <peer-as>65001</peer-as> </config> <transport> <config> <local-address>loopback0</local-address> </config> </transport> <afi-safis> <afi-safi> <afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> <config> <afi-safi-name xmlns:idx="http://openconfig.net/yang/bgp-types">idx:ipv4-unicast</afi-safi-name> <enabled>true</enabled> </config> </afi-safi> </afi-safis> </peer-group> </peer-groups> XML DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
OpenConfig BGP Configuration Example (4/4) <neighbors> <neighbor> <neighbor-address>172.16.255.2</neighbor-address> <config> <neighbor-address>172.16.255.2</neighbor-address> <peer-group>ibgp</peer-group> </config> </neighbor> </neighbors> </bgp> XML DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
Demo
Testbed Topology (dcloud) Controller YDK App Out-of-band network NETCONF 198.18.1.127/24 s NETCONF R1 198.18.1.11/24 198.18.1.12/24 R2 g0/0/0/0 g0/0/0/0 172.16.1.0/31 172.16.1.1/31 lo0 172.16.255.1/32 IS-IS L2 (Area 49.0001) lo0 172.16.255.2/32 DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Resources OpenConfig Guides Getting started with OpenConfig (https://github.com/ciscodevnet/openconfig-getting-started) Conferences OpenConfig: An Industry Collaboration to Enable Programmable Network Management (http://youtu.be/465nq62t0ya) NANOG 71: Getting started with OpenConfig (https://youtu.be/l7trunk8nji) Infrastructure as a Code Using YANG, OpenConfig and YDK (http://youtu.be/g1b6vjw1r5w) DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Resources (cont.) YDK Portal YDK at DevNet (http://ydk.io) YDK Sample Apps YDK-Py sample apps (https://github.com/ciscodevnet/ydk-py-samples) - Over 700 apps! YDK-Cpp sample apps (https://github.com/ciscodevnet/ydk-cpp-samples ) - Coming soon YDK Documentation for OpenConfig YDK-Py docs (http://ydk.cisco.com/py/docs/ydk.models.openconfig.html) YDK-Cpp docs (http://ydk.cisco.com/cpp/docs/ydk.models.openconfig.html) DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Resources (cont.) Sandboxes dcloud YANG Development Kit sandbox (https://goo.gl/rppbvl) Ubuntu YDK Vagrant box (https://git.io/vaw1u) GitHub YDK Python API YDK-Py (https://git.io/vawsg) YDK C++ API YDK-Cpp (https://git.io/v1cst) DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 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 cs.co/ciscolivebot#devnet-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Please complete your Online Session Evaluations after each session Complete 4 Session Evaluations & the Overall Conference Evaluation (available from Thursday) to receive your Cisco Live T-shirt All surveys can be completed via the Cisco Live Mobile App or the Communication Stations Complete Your Online Session Evaluation Don t forget: Cisco Live sessions will be available for viewing on-demand after the event at www.ciscolive.com/global/on-demand-library/. 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education Demos in the Cisco campus Walk-in Self-Paced Labs Tech Circle Meet the Engineer 1:1 meetings Related sessions DEVNET-1775 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Thank you