Tunneling Software for OpenFlow Deployment

From OpenFlow Wiki

Jump to: navigation, search

Contents

Introduction

In Openflow deployment at Stanford, we have some number of WiFi APs that are not directly connected to openflow switches, yet we want to run openflow on them and have them as part of openflow network. One way to achieve this goal is to tunnel traffic from those APs to a machine (we call it border machine) that is directly connected to openflow network. The border machine is responsible for decapsulating packets and feeding them to openflow network.

Capsulator is a simple software written for this purpose. At the AP side, it makes a virtual tap port (tap0) to be grabbed by openflow software instead of the physical eth0 port. Capsulator, then, will receive normal traffic from openflow switch on tap0, do an Ethernet-in-IP encapsulation and forward the encapsulated packets on eth0 to the border machine.

At the border machine, another instance of capsulator will decapsulate the traffic and send out the decapsulated packets to one of its physical ports that is connected to openflow network.

Usage Example

Suppose we want to make the following topology: two WiFi APs are tunneled to a single border machine that is connected to an OpenFlow switch.


Cap example.jpg

Here are the commands that should be run on these machines:

on Left WiFi AP:

./capsulator -f Border_Machine_IP_Addr -t eth0 -vb tap0#20

on Right WiFi AP:

./capsulator -f Border_Machine_IP_Addr -t eth0 -vb tap0#21

on Border Machine:

./capsulator -f Left_AP_IP_addr, Right_AP_IP_addr -t eth0 -b eth1#20 -b eth2#21

Note that order of writing IP addresses in -f is matching the order of -b entries. Also note that tag numbers (#20 and #21) are arbitrary integers.

General format is like this:

./capsulator -f [comma separated list of ip addresses of other side of tunnel]
             -b [border port: the port that is used for forwarding encapsulated traffic]
             -vb[in case of virtual tap ports, use -vb. it is exactly like -b, but it
                 will create tap port for you automatically.]
             -t [list of ports whose traffic is tunneled. note that without -a, the
                first port listed here will send traffic to first ip address listed
                in -f, so order matters.]
             -a [OPTIONAL: if this option used, traffic from every port in -t, will
                 be forwarded to every ip address listed in -f and then matching is
                 done using tag numbers (#20 and #21 in example above)]

Obtaining Code

git clone git://github.com/peymank/Capsulator.git

Contact

You can reach me (Peyman Kazemian) for feedback, comments, questions or bug report at kazemian AT stanford.edu