Setup IPv6 in Tsinghua on Linux(ArchLinux))

Tsinghua university uses ISATAP to provide IPv6 connectivity to students. In Linux you can use the isatapd program to create an ISATAP tunnel based on an IPv4 device.

You can use the isatapd command as follows to establish an ISATAPD tunnel:

isatapd --router

After connecting check …

Continue reading »

Enable SRIOV on OpenStack Juno

Update: This blog post is deprecated by the official documentation. Please take a look at the official Networking Guide: Using SRIOV functionality. Patch set that added the official documentation: changeset.

Terms used
Term Definition
SRIOV Single Root IO Virtualization. SRIOV allows a PCIe device to appear to be multiple separate …

Continue reading »

Create Linux bridge without losing existing connection

The dillemma: You're accessing your server via SSH through interface eth1.102 with the ip and gateway Now you want to add eth1 to a linux bridge so you can hookin VMs on a vlan trunk.

Solution: Create a script which …

Continue reading »

Hadoop on demand with Openstack, Cloudinit and Salt

This post will describe the whole process of providing hadoop on demand through Openstack, Cloudinit and Saltstack. We will use Openstack to provision servers on demand, cloudconfig to install salt-master and salt-minion and saltstack to deploy hadoop namenode and datanodes, all fully automated. This makes us able to deploy a …

Continue reading »

Neutron Multiple allocation pools single subnet (Solve Fragmented floating ips problem)

In a lab environment in the university I only had access to a list of fragmented public routable IP addresses in a single subnet. For example I got access to the following ips,, But I am not allowed …

Continue reading »

Openstack Networking Study Notes

I recommend these links in the following order:

Continue reading »

Docker get private ip address of container

In order to access other containers from a container it's needed to get the private IP address of the other containers. The following command is able to get the private ip address of the container.

$ docker inspect --format="{{.NetworkSettings.IPAddress}}" $CONTAINER_ID_OR_NAME

Continue reading »

Docker Multiple websites/domains on single ip/host tutorial using a HAproxy as reverse proxy

This post will describe how to expose multiple docker containers running websites on port 80 using HAproxy as a reverse proxy. This makes it possible to run multiple websites on different domains on a single public ip of the host.

The basic setup is to create 1 container for haproxy …

Continue reading »

Move first word to end of line (Linux/awk)

Move the first word of a line to the end of line on Linux using AWK. We first store the first column(first word) in the variable t. Then we set the first column to be empty. At last we add a new column after the last column of the …

Continue reading »

SSH to server behind a firewall via an SSH tunnel

A server behind a firewall was unaccesible from my home, but another server which is on the same local network had public SSH access from my home. So we can create an SSH tunnel via this public server to the server behind a firewall.

For example the public ssh server …

Continue reading »