Showing posts from 2014

[Xorp] How to use Xorp in RouteFlow

If you use RouteFlow before, you will notice that the routing software it installs is Quagga by default. So, how to change to Xorp in RouteFlow? Here is an example for rftest2 case to do this. I assume the current path is under RouteFlow's directory.

1. Add new configuration files in rftest/config for rfvmA to rfvmD:

    protocols {
        ospf4 {
            area {
                interface eth2 {
                    vif eth2 {
                        address {
            area {
                interface eth3 {
                    vif eth3 {
                        address {
            area {
                interface eth4 {
                    vif eth4 {
                        address {

[NETCONF] Try Netopeer ( NETCONF tools )

Netopeer is a set of NETCONF tools built on the libnetconf library. 

It has single level server, multiple level server, and cli to use. 
Basically I think if we don't try, we won't truly understand what NETCONF/YANG look like and how it works. During the compilation and setup, I encounter some problems, but I find the following information that save me a lot of time to do trouble shooting.

Here is a URL about how to setup Netopeer server and to use it with cli.

This URL provides a lot of YANG Modules and examples to refer:

[TTP] What is Table Type Patterns?

As we know ( if you have to deal with the multiple flow tables of OF 1.1+ ), the multiple flow tables provide the scaling capability but increasing the complex of usage. For software switch either running on hypervisor or on operation system, it can use memory to map to the implementation of such table design. But for hardware switch based on ASIC to handle packet process pipline, the forwarding pipeline and the definition of flow table is specified and fixed. That will generate a big issue: How come application running on SDN controller knows how to deal with these specified limitation. Recently I noticed "TTP", stands for Table Type Patterns, to allow for an OpenFlow controller and OpenFlow switch to agree on a set of functionality to help manage the increased diversity made possible with OpenFlow versions 1.1+. I think that is very useful for the case: OF-DPA.

[OpenFlow] Install OpenFlow Dissector to Wireshark

It is for OpenFlow 1.1 and higher version.

Get sources (for Debian-based) git clone git:// sudo apt-get install wireshark wireshark-dev export WIRESHARK=/usr/include/wireshark Install scons and build openflow library cd ofdissector/src sudo -s apt-get install scons scons install #mv /usr/lib/wireshark/libwireshark1/plugins/ #cd /usr/lib/wireshark/libwireshark1/plugins/ #chown root:root #chmod 644 Run Wireshark. wireshark

[Linux Kernel] How to build Linux kernel on Ubuntu?

The general way to build Linux kernel:
apt-get install libncurses-dev kernel-package bzip2 make ncurses-dev fakeroot module-init-tools patch apt-get install fakeroot build-essential kernel-package libncurses5 libncurses5-devTo find the stable version from and download it and tar the tar.bz2 file into /usr/src/cd /usr/src/linux-source-3.2.0/   <== it is my casemakemrpropermakemenuconfigmake -j 16sudo make modules_install installsudo update-grub2reboot Booting Menu: /boot/grub/grub.cfg
Booting Linux Options: /etc/default/grub

The Ubuntu way to do so:

make-kpkg cleanmake-kpkg --initrd --append-to-version=danny4400 kernel_image kernel-headers cd ..dpkg -ilinux-image-(Push tab button)ls -l /boot/reboot

[Lagopus] Install Lagopus software switch on Ubuntu 12.04

I attended NTT ( Ryu/Lagopus ) seminar in Aug. at NCTU, Taiwan and noticed that Lagopus(SDN/OpenFlow Software Switch) is amazing. Its L2 switch performance with 10GbE X 2 (RFC2889 test ) for most of packet size are near to 10Gbps and the test platform is  Intel xeon E5-2660 (8 cores, 16 threads), Intel X520-DA2 DDR3-1600 64GB.  For more information please see the attachment pictures that I took from the seminar.
The following is the features: Best OpenFlow 1.3 compliant software-based switchMulti tables, Group tables supportMPLS, PBB, QinQ, supportONF standard specification supportOpenFlow Switch Specification 1.3.3OF-CONFIG 1.1Multiple data-plane configurationHigh performance software data-plane on Intel x86 bare-metal serverIntel DPDK, Raw socketBare metal switchVarious management/configuration interfacesOF-CONFIG, OVSDB, CLISNMP, Ethernet-OAM functionality
For installing Lagopus switch, you can refer to the following URL. It can give us a common installation guide for Lagopus switch. htt…

[Indigo] The architecture of Indigo 2.0

After checking with the source code of Indigo 2.0, OF-DPA (CDP) ,and IVS on GitHub, I just draw a simple architecture diagram to show the idea of hardware abstraction layer (HAL). I think the most important part is that Big Switches uses this HAL concept as hardware agnostic to adopt the different forwarding engine / port management implementation in different hardware or platform.

[RYU] Try the RYU Web GUI with Mininet

This post is about the displaying of RYU Web GUI. We can see what the GUI looks like. My environment is with 2 virtual machines running on Virtula-Box. I skep the installation guide with RYU and GUI because there is already some documents to tell how to do so. If interested, please check there:

P.S: Maybe need to do this:
pip install --upgrade pip or pip install -U pip
First, I started with my RYU server and executed the command:> ryu-manager --verbose --observe-links ryu.topology.switches
P.S: Currently the GUI doesn't support OF1.3.
Second, open another console to execute this command under your ryu directory. It is a middle-ware between Web and Controller.> ./ryu/gui/

For Mininet, I just downloaded the Mininet Virtual Machine and directed…

[OF-DPA] Glance at the source code of OF-DPA on GitHub

I just quickly glance at the code ofOF-DPA and draw a skeleton of it. Actually it is only about the integration Indigo with OF-DPA API ( blue color part ), and lock in with SDK and switch device. There is no OF-DPA/SDK source code ( red color part ). As the diagram described, the OEM/ODM Development Package has the full source code distributed under Broadcom SLA.

[Net-Tools] The collection of base networking utilities for Linux

Not only the collection of base networking utilities for Linux but also the great examples of network programming.

[Ruby] Cross-Compile Ruby to MIPS platform

I have spent several days to deal with cross-compiling Ruby to MIPS platform and have encountered some problems that bother me for a while. Hopefully I finish all the problems and get work done. Awesome!
For the sake of avoiding these kind of problems, I give the steps and scripts about how to do it:

Cross Compile OpenSSL
>./config --prefix=$PWD/build --cross-compile-prefix=/home/liudanny/git/NL/toolchains_bin/mipscross/linux/bin/mips64-nlm-linux-elf32btsmip- shared no-asm

We need to check the Makefile with “PLATFORM=mips” and without “-m64”

>make 2>&1 | tee make.out; make install

Cross Compile zlib >CC=your_cross_compile_gcc ./configure --prefix=$PWD/build
>make 2>&1 | tee make.out; make install

Cross Compile Berkeley DB
>CC=your_cross_compile_gcc ../dist/configure --prefix=$PWD/build
>make 2>&1 | tee make.out; make install

Cross Compile OpenLDAP
>CC=your_cross_compile_gcc LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/liudanny/git/db-6.0.30.NC/build_uni…

[Cross-Compile] What's the difference of `./configure` option `--build`, `--host` and `--target`?

When using ./configure especially in cross-compiling purpose, I kind of confuse about the option --build and --host so that the following content is what I found on searching:

some remarks on specifying --host=<host>, --target=<target> and --build=<build
# kindly provided by Keith Marshall:
# 1) build
# this is *always* the platform on which you are running the build
# process; since we are building on Linux, this is unequivocally going to
# specify `linux', with the canonical form being `i686-pc-linux-gnu'.
# 2) host
# this is a tricky one: it specifies the platform on which whatever we
# are building is going to be run; for the cross-compiler itself, that's
# also `i686-pc-linux-gnu', but when we get to the stage of building the
# runtime support libraries to go with that cross-compiler, they must
# contain code which will run on the `i686-pc-mingw32' host, so the `host'
# specification should change to this, for the `runtime' and `w32api…

[NETCONF] The summary of NETCONF Content

The following content is about the summary of the NET-CONF web site: Initiation For Clients <?xml version="1.0" encoding="UTF-8"?> <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <capabilities> <capability>urn:ietf:params:netconf:base:1.0</capability> </capabilities> </hello>]]>]]> Protocol Capabilities <capability> urn:ietf:params:netconf:capability:writable-running:1.0 </capability>
<capability>urn:ietf:params:netconf:base:1.0</capability> Standard Capabilities :candidate :confirmed-commit :interleave :notification :partial-lock :rollback-on-error :startup :url :validate :writable-running :xpath Configuration Databases<running/> <candidate/> <startup/> Protocol OperationsOnce a NETCONF session is established, the client knows which capabilities the server supports. T…

[OpenStack] The resource list for studying OpenStack Neutron

The following list is about the resource documents for those who want to study OpenStack Neutron. It may reduce the time you spend on searching. Here you go:

Introduction to OpenStack Quantum To warm up for jumping into the network world of OpenStackOpenStack Admin Guide Chapter 7. Networking
It is very important to take a look at this offical document firstNeurton Wiki
Architecture of Quantum Grizzly Release This contains the Quantum architecture in details A Cisco Plugin Framework for Quantum L2 Network Overlays Spanning Multiple Physical Switches Cicso's Plugins are a little bit complicated because There are several versions those are different in the configuration and prerequisite.Cisco Nexus Plug-in for OpenStack Neutron 
Give a data sheet to list the functionality and feature it supportsWhat's new Neutron?
Give a overall look of NeutronAnother doc: components are in Neutron: http://www.slideshare.…

[Thoughts] Cumulus Networks and Big Switch Networks

These two companies, Cumulus Networks and Big Switch Networks, are two of  my most favorite network companies in the world because they have a strong technical skill and creative ability/thought to build their networking products. Unfortunately, they walk in two different paths and directions. Big Switch Networks is based on OpenFlow but Cumulus Networks is not. For more information in details, please see below:

[SDN} SDN Migration Use Cases

This document provides three migration use cases and I think they are very useful for those who work in networking field and are interested in SDN and need to take a look at. Here you go:

[Thoughts] RESTful control of switches

OpenFlow is already the standard Southbound API in SDN field, but OpenFlow is the one of the many SouthBound approaches. In SDN solution, we don't necessarily need to use OpenFlow protocol to control data plane. RESTful API is another way to control or configure switches ( data plane ) if they supports. Arista Networks has provides Arista eAPI as RESTful control of switches. For more information in details, please refer to this article:

[LXC] How to use LXC?

At the first glimpse, I was amazed by its way to provide a lightweight container in virtual environment. With shell scripts combining, we can use these to build a convenient and powerful automation solution to test all kind of programs that need multiple virtual machines within a server host ( at least my focus is on the automation test...XD ). There are already a bunch of articles to introduce LXC. Here I only list some common use commands for reference quickly:

# Install LXC
sudo apt-get install lxc

# Create a Linux Container named base ( -t: template, -n: namespace )
sudo lxc-create -t ubuntu -n base

# Start the Linux Container ( -d: daemon )
sudo lxc-start -n base -d

# Stop the Linux Container
sudo lxc-stop -n base

# List Linux Containers
lxc-ls --fancy

# Clone the Linux Container
lxc-clone -o base -n newvm1

# Access the container
lxc-console -n newvm1

# Shudown
lxc-shutdown -n test-container

# Destroy
lxc-destroy -n test-container

LXC can be controlled via Libvirt:…

[Open vSwitch] The basic introduction of Open vSwitch

I post a slide to give a basic introduction of Open vSwitch. For the more in details, please check out the slideshare URL as follows:

Some Useful example of the OVS commands:
sudo ovs-vsctl show
sudo ovs-vsctl add-br mybridge
sudo ovs-vsctl del-br mybridge
sudo ovs-vsctl add-port mybridge port-name
sudo ovs-vsctl del-port mybridge port-name
sudo ovs-vsctl list Bridge/Port/Interface/...
sudo ovs-appctl fdb/show mybridge
sudo ovs-ofctl show mybridge
sudo ovs-ofctl dump-flows mybridge
sudo ovs-ofctl add-flow mybridge dl_src=02:a2:a2:a2:a2:a2,dl_dst=02:b2:b2:b2:b2:b2,in_port=2,dl_type=0x0800,nw_src=,nw_dst=,actions=output:6
sudo ovs-ofctl del-flows mybridge dl_src=02:a2:a2:a2:a2:a2,dl_dst=02:b2:b2:b2:b2:b2,in_port=2,dl_type=0x0800,nw_src=,nw_dst=
sudo ovs-ofctl add-flow dp0 in_port=2,actions=output:6
# This will delete all the flow entries in the flow table
sudo ovs-ofctl del-flows mybr…

[GNS3] All the related URLs with GNS3 and Open vSwitch

[KVM and OVS] Installing KVM and Open vSwitch on Ubuntu

These articles provides a very good explanation about how to install KVM and Open vSwitch on Ubuntu.

I summarize the scripts from the above URLs as follows: ### Installing KVM and Open vSwitch on Ubuntu ### sudo apt-get update && apt-get dist-upgrade sudo apt-get install kvm qemu-kvm libvirt-bin virtinst virt-manager sudo virsh net-destroy default sudo virsh net-autostart --disable default sudo aptitude purge ebtables ### Open vSwitch on Ubuntu ### sudo apt-get install openvswitch-controller openvswitch-brcompat \ sudo openvswitch-switch openvswitch-datapath-source
# Edit this: /etc/default/openvswitch-switch and change this line:   #BRCOMPAT=no ==> #BRCOMPAT=yes 
# to build and install the necessary module sudo module-assistant auto-install openvswitch-datapath ### Add Open vSwitch bridge ### sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-port…