0% found this document useful (0 votes)
190 views

DEVNET-1775-Introduction To OpenConfig

Uploaded by

habib kamaie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
190 views

DEVNET-1775-Introduction To OpenConfig

Uploaded by

habib kamaie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

#CLUS

Introduction to
OpenConfig

Santiago Alvarez, TME


@111pontes
DEVNET-1775

#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

Webex Teams will be moderated cs.co/ciscolivebot#DEVNET-1775


by the speaker until June 16, 2019.

#CLUS © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Model-Driven Manageability

Apps App App App


Controller
Orchestrator
Model-Driven SDK
SDK
YANG Development Kit (YDK)

Model-Driven
Telemetry Protocol NETCONF gRPC

Closed-loop
automation Encoding XML JSON GPB

Model-Driven Transport SSH TCP HTTP


Configuration

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

Management Operational RIB


Data
Protocol Commands Injection

gRPC Network gRPC Network gRPC Routing


Config / oper Management Operations Information
models Interface Interface Base Interface
(gNMI) (gNOI) (gRIBI)

YANG protobuf protobuf protobuf

#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
->

config container | +--rw afi-safi-name?


| +--rw enabled?
List key
• String patterns use POSIX regex +--ro state
(reference | +--ro afi-safi-name?
(instead of W3C as defined at to config | +--ro enabled?
leaf) AFI/SAFI
IETF)
| +--ro total-paths?
| +--ro total-prefixes? name
+--rw graceful-restart configuration
:
:

#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

• Configuration management and streaming telemetry in a


single protocol
• Data model independent
• Based on Google RPC framework
• Rich tooling and high performance

#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

• Built-in security Transport HTTP/2

• Rich tooling and programming Network


language support Device

#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;
}

• Binary wire format message EchoResponse {

}
string msg = 1;

• Interface description language


• Compiler
RPC RPC
• Supports data structures (messages) and Request Response
RPCs (services)
• Messages are serialized into a binary wire
Message / service
format (field number, type, value) description
syntax = "proto3";

• Compiler generates message and RPC code package echo;


Protobuf
service Echo {
Server
in numerous languages compiler
rpc Echo (EchoRequest) returns (EchoResponse);
}

message EchoRequest {
string msg = 1;
}

Support for backward compatibility


message EchoResponse {
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

• Network operation commands


• Functionally equivalent to CLI Exec commands
• Based on Google RPC framework

#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

• Network failure detection interface set/get loopback, clear

• Interface/line troubleshooting layer2


clear neighbor, clear ST, perform BERT,
clear LLDP, WoL
• Protocol/interface reset
mpls Clear LSP, clear LSP counters, ping
ping, trace, time, set package, switch
system
RP, reboot, reboot status, cancel reboot

#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

• Load peer configuration Private


Peering
• Configure interface and Config

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)

• Python/C++/Go • Collector for router • Distributed streaming


bindings for streaming telemetry platform (message
OpenConfig models bus)
• Performs basic
• Detailed client-side encoding • Producer, consumer,
data validation transformation stream and connector
APIs
• Protocol / transport / • Data producer for
encoding abstraction Kafka, InfluxDB, • Rich client support
Prometheus, etc. (Python, Java, etc)

#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;

service Echo { // service definition


rpc Echo (EchoRequest) returns (EchoResponse); // call to echo a message
}

message EchoRequest { // request message


string msg = 1;
}

message EchoResponse { // response message


string msg = 1;
}

#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
gNMI Implementation in Cisco IOS XR

• Based on gNMI v0.4.0


• Introduced in release 6.5.1
• Set and Get RPCs use JSON_IETF (RFC 7951) and
ASCII (CLI) encoding
• Subscribe RPC
• Paths must consider data aggregation points (no arbitrary paths)
• No aliases

#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

Meet the engineer


Related sessions
1:1 meetings

#CLUS DEVNET-1775 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
Thank you

#CLUS
#CLUS

You might also like