Skip to content

Instantly share code, notes, and snippets.

View rwestphal's full-sized avatar

Renato Westphal rwestphal

View GitHub Profile
# +---------+ +---------+
# | | | |
# | CE1 | | CE2 |
# | | | |
# +---------+ +---------+
# ce1-eth0| |ce2-eth0
# | |
# 172.16.1.0/24| |172.16.2.0/24
# | |
# rt1-eth0| 10.0.1.0/24 10.0.3.0/24 |rt3-eth0
#
# +---------+
# | |
# | RT1 |
# | 1.1.1.1 |
# | |
# +---------+
# |eth-sw1
# |
# |
# +---------+ +---------+
# | | | |
# | CE1 | | CE2 |
# | | | |
# +---------+ +---------+
# ce1-eth0| |ce2-eth0
# | |
# 172.16.1.0/24| |172.16.2.0/24
# | |
# rt1-eth0| 10.0.1.0/24 10.0.3.0/24 |rt3-eth0
#!/usr/bin/env python
"""
Create configuration for model frr-ripd.
usage: ydk_ripd_test_netconf.py [-h] [-v] device
positional arguments:
device NETCONF device (ssh://user:password@host:port)
ripd# conf t
ripd(config)# router rip
ripd(config-router)# network eth2
ripd(config-router)# show configuration candidate changes
@@ -14,6 +14,7 @@
distance 25 172.16.1.0/24
network eth0
network eth1
+ network eth2
redistribute ospf metric 3
#include <stdlib.h>
#include <stdio.h>
#include <err.h>
#include <libyang/libyang.h>
//#define YANG_SEARCH_PATH "/usr/local/share/yang/"
#define YANG_SEARCH_PATH "/mnt/renato/git/rust/yang2-rs/assets/yang/"
int main(int argc, char **argv)
# Dynamic topology
---
autogen:
layout:
type: ring
size: 10
ipv4:
# Dynamic topology
---
autogen:
layout:
type: grid
width: 5
height: 5
# +-------+ +-------+ +-------+
# | | | | | |
# | HOST1 | | HOST2 | | HOST3 |
# | | | | | |
# +---+---+ +---+---+ +---+---+
# | | |
# |fd00:10:1::/64 | |
# +-----+ +------+ fd00:20:1::/64|
# | |fd00:10:2::/64 |
# | | |
#!/usr/bin/env ruby
#$VERBOSE = true
require 'date'
this_dir = File.expand_path(File.dirname(__FILE__))
lib_dir = File.join(this_dir, "ruby")
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
require "grpc"