Skip to content

Instantly share code, notes, and snippets.

Avatar

Roman Dodin hellt

View GitHub Profile
@hellt
hellt / cisco.md
Last active Oct 22, 2020
gnmic and Cisco IOS-XR
View cisco.md

Starting the lab

Start Model Driven Telemetry Lab.

Installing gNMIc

Login into the devbox VM inside this lab and clone the gnmic-bin repo to have the gnmic binary available inside the lab:

git clone https://github.com/hellt/gnmic-bin.git
mv gnmic-bin/gnmic ~/gnmic
@hellt
hellt / readme.md
Last active Aug 31, 2020
IOS-XR gNMI issue in MDT sandbox
View readme.md

IOS-XR gNMI list filtering issue in the devnetsandbox MDT lab

As of August 2020 The Model-Driven telemetry lab ships with IOS-XR 6.5.3

This XR version has some issue with the gNMI server that prevents it from accepting YANG list keys without extra quotes around key names.

Problem statement

If one would want to get the interfaces information using the openconfig models they would do this like:

gnmic -a 10.10.20.35:57400 -u admin -p Cisco123 --insecure -e JSON_IETF get --path "openconfig-interfaces:interfaces/interface"
@hellt
hellt / arista.all.json
Created Jul 26, 2020
a full dump of vEOS 4.24.1.1F config/state retrieved with gNMI
View arista.all.json
{
"source": "10.2.0.21:6030",
"time": "1970-01-01T02:00:00+02:00",
"updates": [
{
"Path": "",
"values": {
"": {
"arista-exp-eos:arista": {
"eos": {
@hellt
hellt / sros.md
Created Jul 7, 2020
sros bootstrap
View sros.md

Create disk images

To save on disk space the guide uses libvirt backing store technique, which allows a user to use a common disk image for every guest and each gues will have its own disk image with deltas only.

If the SR OS qcow2 disk image is located at var/sros.qcow2 then the following command will create a snapshot of the original disk image for R1 router that we will start later on.

# sros.qcow2 - original disk image you got from Nokia rep.
# r1.qcow2 - snapshot that using hda.qcow2 as a backing image
qemu-img create -f qcow2 -b /var/sros.qcow2 /var/lib/libvirt/images/r1test/r1.qcow2
View gist:9f02f6c8a2e768fb3d9d25cbcb6f432b
❯ ~/go/bin/errcheck ./...
cmd/capabilities.go:50:20: go reqCapability(ctx, target, wg, lock)
cmd/capabilities.go:111:17: viper.BindPFlag("version", capabilitiesCmd.Flags().Lookup("version"))
cmd/get.go:146:25: getCmd.MarkFlagRequired("path")
cmd/get.go:150:17: viper.BindPFlag("get-path", getCmd.Flags().Lookup("path"))
cmd/get.go:151:17: viper.BindPFlag("get-prefix", getCmd.Flags().Lookup("prefix"))
cmd/get.go:152:17: viper.BindPFlag("get-model", getCmd.Flags().Lookup("model"))
cmd/get.go:153:17: viper.BindPFlag("get-type", getCmd.Flags().Lookup("type"))
cmd/listen.go:79:26: server.grpcServer.Serve(server.listener)
cmd/listen.go:90:17: viper.BindPFlag("max-concurrent-streams", listenCmd.Flags().Lookup("max-concurrent-streams"))
@hellt
hellt / R3_rr_baseline.cfg
Created Jun 17, 2020
R3 Nokia router reflector baseline config
View R3_rr_baseline.cfg
# TiMOS-B-14.0.R4 both/i386 Nokia 7750 SR Copyright (c) 2000-2016 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Thu Jul 28 17:26:53 PDT 2016 by builder in /rel14.0/b1/R4/panos/main
# Generated SUN MAR 13 06:29:22 2016 UTC
exit all
configure
#--------------------------------------------------
echo "System Configuration"
@hellt
hellt / R2_baseline.cfg
Created Jun 17, 2020
R2 Juniper baseline config
View R2_baseline.cfg
## Last changed: 2016-11-06 18:41:14 UTC
version 14.1R1.10;
system {
host-name R2;
root-authentication {
encrypted-password "****"; ## SECRET-DATA
}
syslog {
user * {
any emergency;
@hellt
hellt / R1_nokia.cfg
Created Jun 17, 2020
R1 Nokia baseline config
View R1_nokia.cfg
# TiMOS-B-14.0.R4 both/i386 Nokia 7750 SR Copyright (c) 2000-2016 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Thu Jul 28 17:26:53 PDT 2016 by builder in /rel14.0/b1/R4/panos/main
# Generated SUN MAR 13 06:28:52 2016 UTC
exit all
configure
#--------------------------------------------------
echo "System Configuration"
@hellt
hellt / yang.txt
Created May 18, 2020
yang tree example
View yang.txt
| | | +--rw ipv4
| | | | +--rw multicast? boolean
| | | | +--rw apply-groups* -> ../../../../../groups/group/name
| | | | +--rw monitor-oper-group
| | | | +--rw name? -> ../../../../../../service/oper-group/name
| | | | +--rw operation? enumeration
| | | | +--rw priority-delta? uint32
| | | +--rw ipv6
| | | | +--rw multicast? boolean
| | | | +--rw apply-groups* -> ../../../../../groups/group/name
View cfg.xml
<configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf">
<card>
<slot-number>1</slot-number>
<mda>
<mda-slot>1</mda-slot>
<mda-type>s36-100gb-qsfp28</mda-type>
</mda>
<fp>
<fp-number>1</fp-number>
</fp>
You can’t perform that action at this time.