Skip to content

Instantly share code, notes, and snippets.

@upa
upa / ipsl
Last active May 4, 2023 10:12
a simple ifstat-like command on ip -s (-j) link
#!/usr/bin/env python3
import sys
import time
import json
import argparse
import subprocess
class Counter:
def __init__(self, stats64_json = None ):

nassoc.py

This script retrieves number of associated clients to APs from Cisco WLC via SNMP.

How to use

$ sudo apt install python3
#include <stdio.h>
#include <fcntl.h>
#include <sys/time.h>
#include <lkl.h>
#include <lkl_host.h>
int main(int argc, char **argv)
{
@upa
upa / setup-endam-with-psp.sh
Created November 4, 2019 13:35
Testing End.AM with PSP
#!/bin/bash
ip=/sbin/ip
ipns="$ip netns exec"
function make_netns() {
ns=$1
echo create netns $ns
@upa
upa / README.md
Last active February 23, 2022 21:04
how to play SRv6 PSP and End.AM on a modified linux kernel

This document describes how to play SRv6 PSP and End.AM with a modified linux kernel, which was implemented for Interop Tokyo 2019 ShowNet.

The enhancements are:

  • End.AM (Masquerading proxy)
  • PSP (penultimate segment POP of the SRH) for End, End.X, and End.T
  • End.AC (Caching proxy, designed in ShowNet 2019, and its detail will be presented soon)

We are currently working for brushing up patches to try upstream ;)

@upa
upa / Vagrantfile
Last active February 28, 2019 13:31
A Vagrantfile and Ansible playbooks for deploying a lagopus router and edge node using ansible-based provisioning
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "generic/ubuntu1804"
config.vm.define :lagopus do |box|
box.vm.box = "generic/ubuntu1804"
box.vm.hostname = "lagopus"
box.vm.network :private_network, ip: "192.168.55.11"
@upa
upa / site.yml
Created February 28, 2019 12:27
deploying lagopus router from scratch by a single ansible playbook
- hosts: localhost
vars:
GOPATH : "{{ lookup('env', 'HOME') }}/go"
VSWCONF: /usr/local/etc/vsw.conf
environment:
GOPATH: "{{ GOPATH }}"
PATH: "{{ lookup('env', 'PATH') }}:{{ GOPATH }}/bin"
LD_LIBRARY_PATH: /usr/src/dpdk-stable-17.11.1/build/lib
@upa
upa / frr1.conf
Last active November 28, 2018 11:25
Frrouting EVPN Synmetric VXLAN Routing exmaple
Current configuration:
!
frr version 6.0
frr defaults traditional
hostname frr1
log file /var/log/frr.log informational
service integrated-vtysh-config
username cumulus nopassword
!
vrf vrf1
@upa
upa / recv.py
Created August 7, 2018 14:21
Gatharing interface stats from MX via Network Telemetry
#!/usr/bin/env python3
import sys
import socket
from contextlib import closing
import telemetry_top_pb2
import logical_port_pb2
from pprint import pprint
@upa
upa / restarter.py
Created May 8, 2018 13:19
A Script for Executing Command when Ping is Failed
#!/usr/bin/env python3
import os
import sys
import time
import subprocess
from optparse import OptionParser