A collection of OpenConfig and Cisco IOS XR examples


The goal of this repo is to provide a set of examples that illustrate how to program network elements using OpenConfig and gRPC. We will leverage different Open Source projects:
- Go as the main programming language.
- xrgrpc (gRPC library for Cisco IOS XR) to interact with IOS XR via gRPC.
- ygot (YANG Go Tools) to generate the OpenConfig data structures required for the gRPC calls.
Examples
Interface Configuration
Telemetry Stream Configuration
BGP Neighbor Configuration
Configuring and Validating a BGP Peer session
The objective is to configure an interface (link) and bring up a BGP session, while setting up a BGP Neighbor Telemetry stream to track the current state of the BGP Finite State Machine. Check out the code here
Steps
-
Configure a Streaming Telemetry subscription using ygot and xrgrpc.
-
Configure the Peer link (interface) using ygot and xrgrpc.
-
Configure a BGP neighbor using ygot and xrgrpc.
-
Subscribe to a Telemetry stream to learn about BGP Neighbor status with xrgrpc.

Tutorials