wiki:Internal/OpenFlow/WimaxOpenV

Version 9 (modified by seskar, 13 years ago) ( diff )

Name changed from Documentation/Internal/OpenFlow/WimaxOpenV to Internal/OpenFlow/WimaxOpenV

Installing Open V switch on cons-wm-01

Identifying information:

hostname -f
wm-asngw-01.orbit-lab.org

more /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04

uname -a
Linux wm-asngw-01 2.6.28-18-server #60-Ubuntu SMP Fri Mar 12 05:41:54 UTC 2010 i686 GNU/Linux

ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1f:29:0e:3a:68
          inet addr:10.41.0.3  Bcast:10.41.255.255  Mask:255.255.0.0
          inet6 addr: fe80::21f:29ff:fe0e:3a68/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:636384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:828244 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:176839258 (176.8 MB)  TX bytes:91011015 (91.0 MB)
          Interrupt:17
...

9/20/2010

Currently In opt there is an existing open openvsiwtch tarball, but it seems to be for a slightly older version. I've copied the newest stable version from the openvswitch website.

sudo wget http://openvswitch.org/releases/openvswitch-1.1.0pre2.tar.gz

I'm bascially following Linux and OpenFlow guides.

Building

The build process went as follows:

  1. I checked for some prerequisite apt-packages:
    • pkg-configure
    • libssl-dev
    • kernel-headers
    • build-essential
  2. Run configure with kernel flag
    ./configure --with-l26=/lib/modules/`uname -r`/build
    
    It ran from /opt/openvswitch-1.1.0pre2. Built kernel modules since the are Needed for the Openflow Implementation.
  3. make
  4. make install
  5. Insert the modules
    insmod datapath/linux-2.6/openvswitch_mod.ko
    
    Dmesg should note the addtion of the module:
    [5343452.547746] Open vSwitch 1.1.0pre2, built Sep 20 2010 17:04:53
    

Creating a Virtual Open Flow Switch

We can create Virtual interfaces with the ip command Something of the form

>ip link add type veth

These interfaces are "internal" to the machine and have no-external meaning. They are similar to the named pipes or unix sockets. The internal virtual switch will communicate with other virtual elements in the machine via these virtual interfaces.

Once this is created, we can add the virtual interface to the open flow switch with the ovs-dpctl.

>ovs-dpctl add-dp dp0
>ovs-dpctl add-if dp0 veth0
>ovs-dpctl show
system@dp0:
        flows: cur:0, soft-max:1024, hard-max:1048576
        ports: cur:2, max:1024
        groups: max:16
        lookups: frags:0, hit:0, missed:12, lost:0
        queues: max-miss:100, max-action:100
        port 0: dp0 (internal)
        port 1: veth0

There is a separate daemon that manages the virtual open flow switch, In the current config we'll use it in —out-of-band mode. Thus the interface doesn't need an IP of it's own. The daemon can be started with the ovs-openflowd command:

>ovs-openflowd dp0 tcp:10.0.0.12 --out-of-band --datapath-id=0000002320806da5 --detach

ovs-openflowd dp0 tcp:10.0.0.12 --out-of-band --datapath-id=0000002320806da5
Sep 20 19:52:27|00001|openflowd|INFO|Open vSwitch version 1.1.0pre2
Sep 20 19:52:27|00002|openflowd|INFO|OpenFlow protocol version 0x01
Sep 20 19:52:27|00003|ofproto|INFO|using datapath ID 000000232080116e
Sep 20 19:52:27|00004|ofproto|INFO|datapath ID changed to 0000002320806da5
Sep 20 19:52:27|00005|rconn|INFO|dp0<->tcp:10.0.0.12: connecting...
Sep 20 19:52:27|00006|rconn|INFO|dp0<->tcp:10.0.0.12: connected
Sep 20 19:52:27|00007|ofproto|INFO|dp0<->tcp:10.0.0.12: normalization changed ofp_match, details:
Sep 20 19:52:27|00008|ofproto|INFO| pre: wildcards=  0x3fff4f  in_port=    0  dl_src=00:00:00:00:00:00  dl_dst=00:00:00:00:00:00  dl_vlan=    0  dl_vlan_pcp=  0  dl_type= 0x800  nw_tos=   0  nw_proto= 0x6  nw_src=0x698e9b09  nw_dst=0x3661eb00  tp_src=    0  tp_dst=   80
Sep 20 19:52:27|00009|ofproto|INFO|post: wildcards=  0x3fff4f  in_port=    0  dl_src=00:00:00:00:00:00  dl_dst=00:00:00:00:00:00  dl_vlan=    0  dl_vlan_pcp=  0  dl_type= 0x800  nw_tos=   0  nw_proto= 0x6  nw_src=         0  nw_dst=         0  tp_src=    0  tp_dst=   80

Note the extra padding of 4 zeros at the front of the dpid, as well as the fixed up of nox.orbit-lab.org(10.0.0.12). The open flow daemon doesn't like dns names.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.