DEVNET-1775-Introduction To OpenConfig
DEVNET-1775-Introduction To OpenConfig
Introduction to
OpenConfig
#CLUS
Agenda
• Introduction
• Data Models
• Network Management Interface
• Network Operations
• Demo
• Conclusion
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Cisco Webex Teams
Questions?
Use Cisco Webex Teams 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 Webex Teams or go directly to the team space
4 Enter messages/questions in the team space
#CLUS © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Model-Driven Manageability
Model-Driven
Telemetry Protocol NETCONF gRPC
Closed-loop
automation Encoding XML JSON GPB
Network Models
YANG Models
Device (native, open)
#CLUS DEVNET-1775 © 2019 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
• Main focus on device manageability
(data models, config management,
telemetry, operational commands and
route injection)
• Model coverage still limited, but model
development rapidly evolving
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
OpenConfig Major Components
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Data Models
Data Models in Cisco Routers and Switches
Native Open • Data (config and operational) and
(OpenConfig / IETF) 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
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
OpenConfig Data Model Principles
• Modular model definition module: openconfig-bgp
tree-path /bgp/neighbors/neighbor/transport
• Attention to model consistency +--rw bgp
+--rw neighbors
• Model structure combines Intended +--rw neighbor* [neighbor-address]
• Configuration (intended)
configuration +--rw transport
+--rw config
| +--rw tcp-mss?
• Operational data (applied config and | +--rw mtu-discovery?
derived state) | +--rw passive-mode?
| +--rw local-address?
• Model backward compatibility +--ro state
Applied +--ro tcp-mss?
• Driven by use of semantic versioning +--ro mtu-discovery?
configuration
(xx.yy.zz) +--ro passive-mode?
+--ro local-address?
• Diverges from IETF YANG guidelines (full +--ro local-port?
compatibility) Derived +--ro remote-address?
state +--ro remote-port?
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
OpenConfig Data Model Design
AFI/SAFI list
• Each module subtree declares module: openconfig-bgp
enclosed in
container
config and state containers tree-path /bgp/global/afi-safis
+--rw bgp
+--rw global
• Lists are enclosed in a container +--rw afi-safis
+--rw afi-safi* [afi-safi-name]
• List key definition points to leafs in +--rw afi-safi-name
+--rw config
->
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Native vs Open Data Models
• Native data models provide
most configuration and
Native device
operational coverage
config/oper data
• Open models mapped to native
Native Model data models
Mapped
Open config/oper data • Departures from open models
Model specified as deviation module
Deviations
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Open Model Mapping
Model-Driven APIs
YANG Development Kit (YDK)
• Model mapping converts open
model data to native model
Management Protocol
data and vice versa
• Support for mapping config
Open Data Models and operational data
(including telemetry)
Model Mapping
• Single view of config and
Native Data Models
operational data in internal
datastore
Internal Datastore
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
OpenConfig Data Model Support
Models
openconfig-acl, openconfig-aft-network-instance, openconfig-bgp-policy, openconfig-bgp, openconfig-
channel-monitor, openconfig-if-aggregate, openconfig-if-ethernet, openconfig-if-ip, openconfig-
IOS XR interfaces, openconfig-isis-policy, openconfig-lacp, openconfig-lldp, openconfig-local-routing,
(6.6.2) openconfig-mpls, openconfig-network-instance, openconfig-optical-amplifier, openconfig-platform-port,
openconfig-platform, openconfig-rib-bgp, openconfig-routing-policy, openconfig-rsvp-sr-ext, openconfig-
telemetry, openconfig-transport-line-common, openconfig-transport-line-protection, openconfig-vlan
openconfig-acl, openconfig-alarms, openconfig-bgp-policy, openconfig-bgp, openconfig-if-ip,
IOS XE openconfig-interfaces, openconfig-local-routing, openconfig-network-instance, openconfig-platform-
(16.9.3 linecard, openconfig-platform-port, openconfig-platform-transceiver, openconfig-platform, openconfig-rib-
bgp, openconfig-routing-policy, openconfig-spanning-tree, openconfig-system, openconfig-transport-line-
)
common, openconfig-vlan
openconfig-acl, openconfig-bgp-policy, openconfig-bgp, openconfig-if-aggregate, openconfig-if-
ethernet, openconfig-if-ip, openconfig-interfaces, openconfig-local-routing, openconfig-mpls, openconfig-
NX-OS
network-instance-policy, openconfig-network-instance, openconfig-ospf-policy, openconfig-platform-
(9.2-3) linecard, openconfig-platform-port, openconfig-platform-transceiver, openconfig-platform, openconfig-
relay-agent, openconfig-routing-policy, openconfig-spanning-tree, openconfig-system, openconfig-vlan
https://github.com/YangModels/yang/tree/master/vendor/cisco
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Network
Management
Interface
gRPC Network Management Interface (gNMI) -
Introduction
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
What is gRPC?
• Open-source, universal RPC
framework Controller
Orchestrator
• RPCs defined using an
interface description language Protocol
Vendor /
Open
• Supports bi-directional RPC RPC
streaming Request Response Encoding protobuf
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
gRPC Encoding - Protocol Buffers
Message / service
• Mechanism for more efficient serialization of description
structured data syntax = "proto3";
package echo;
Protobuf
service Echo {
Client
Key components compiler
rpc Echo (EchoRequest) returns (EchoResponse);
}
• message EchoRequest {
string msg = 1;
}
}
string msg = 1;
message EchoRequest {
string msg = 1;
}
•
}
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
OpenConfig gRPC Network Management
Interface (gNMI)
• Key functional components
• Configuration management
RPC Description
• Retrieval of operational state Discover device capabilities
• Telemetry subscriptions capabilities (models, encodings, version,
extensions)
• Supports user authentication /
authorization per RPC get Retrieve device state
• Config/oper data typically defined in
YANG set
Modify device state (delete,
replace, update)
• No implicit restriction on YANG data
model family
subscribe Subscribe to device update
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
Network
Operations
gRPC Network Operations Interface (gNOI) -
Introduction
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
OpenConfig gRPC Network Operations Interface
(gNOI)
• Operational tasks beyond
configuration and state monitoring Category RPCs
bgp clear neighbor
• Key functional components
cert rotate, install, get, revoke, can generate
• Certificate management
diag start/stop/get BERT
• File management
• System upgrade/reboot file get, transfer, put, stat, remove
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Demo
Peering Use Case
Configure and Validate Peering on ASBR1
validate operation
• Configure BGP neighbor
and validate operation Configuration Telemetry
(gNMI) (gRPC)
• All validation against
actual operational state
https://github.com/CiscoDevNet/ydk-py-samples ASBR1 ASBR2
(AS65001) (AS65002)
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Open Source Tool Chain
YDK Pipeline Kafka
(ydk.io) (git.io/vdnnT) (kafka.apache.org)
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Conclusion
Summary
• OpenConfig provides vendor-neutral data models designed by
operators
• OpenConfig models provide limited coverage compared to native
data models
• OpenConfig models provide open (vendor neutral) model solution
across XR, XE and NX-OS
• gNMI provides configuration and streaming telemetry in a single
data-model-indepent protocol
• gNOI defines popular network operation commands
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Backup
Sample Protobuf Definition for an Echo Service
syntax = "proto3";
package echo;
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
gNMI Implementation in Cisco IOS XR
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
gNOI Implementation in Cisco IOS XR
• Initial focus on reboot, software management and file
operations
• System operations
• Reboot
• RebootStatus
• SetPackage
• File operations
• Get
• Remove
• Additional system, file and certificate operations planned for
next major replace
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 31
Complete your
online session • Please complete your session survey
evaluation after each session. Your feedback
is very important.
• Complete a minimum of 4 session
surveys and the Overall Conference
survey (starting on Thursday) to
receive your Cisco Live water bottle.
• All surveys can be taken in the Cisco Live
Mobile App or by logging in to the Session
Catalog on ciscolive.cisco.com/us.
Cisco Live sessions will be available for viewing
on demand after the event at ciscolive.cisco.com.
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
Continue your education
Demos in the
Walk-in labs
Cisco campus
#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
Thank you
#CLUS
#CLUS