This article introduces how to apply Open vSwitch on bc10. This article discusses form the installation of Open vSwitch on bc10 to testing it. The testing method is identical to the one that is conducted at OpenFlow/Open vSwitch_x86.
Similar to OpenFlow/Open vSwitch_x86, mininet is also used for OpenFlow controller on x86 Linux.
The build environment and the base of SD image for bc10 use VMware image, (Ubuntu 10.05 64bit version) which has been created at bc10-router/arago-projrect. For the details of how to create the build environment, please look at bc10-router/arago-project.
Since the build or rebuild process of arago-project consumes few hours, recommend to use Cross Compile for adding and updating packages.
The hardware configuration of bc10 is shown below.
- bc10 (SD and AC adapter) x1
- USB 4-port AC powered hub x1
- USB wired LAN (LUA3-U2-ATX) x3
Download Open vSwitch (1.9.0) on Ubuntu.
Code and Commands>
The kernel version is updated to version 3.7.2. To update the kernel, please follow the direction that listed at kernel.org of bc10-router/kernel update.
The kernel options, which are specified by README and INSTALL.txt of OpenSwitch, are added to the kernel. The attached file, bc10-openflow.config, is based upon .config.
Assume that bc10-openflow.config is placed at the HOME directory.
Code and Commands>
Add the PATH if there is no PATH to go to ti-sdk-beagleboard-0.5.05.01.00.
Code and Commands> To execute menuconfig, make sure that specific items, which are specified at openvswitch-1.9.0/INSTALL.txt, are checked.
Code and Command> If there are check marks in front of the desired items correctly, then execute the build process.
Code and Commands> Caution: As uImage is being created, an error massage shown below may appear. If the error message shows up, please reinstall uboot-mkimage, and execute it again.
Code and Commands>
Code and Commands> After the build process is completed, install kernel temporally for placing on the boot image.
Code and Commands>
Run the configure command of the extracted OpenvSwitch.
Caution: Actually the configure command is a one-line command. Please ignore line breaks in the example shown below. The line breaks are inserted since the command line is too long.
Code and Commands> To execute build, there is redundancy of definitions, and the redundancy causes errors. To prevent these errors, edit the directory of datapath/linux/compat/include/linux/types.h in the way shown below. Then execute build again.
Code and Commands> Caution: make command is actually a one-line command. Please ignore the line breaks in the example below. Because of the length of the command, these line breaks are inserted.
Code and Commands>
The kernel is generated at directories below linux-3.7.2/arch/arm/boot/uImage and linux-3.7.2/tmp_install/lib/. The generated openvswitch is located at director bekw openvswitch-1.9.0/temp_install/usr. These files are copied to partitions of a boot image of bc10. Two partitions are created at a SD card. fat and ex3 partitions are mounted at /media/FAT and /media/EXT3, respectively.
Code and Commands>
To use OpenvSwitch on bc10, configure and boot OpenFlow Switch.
Caution: If a bridge device of vSwitch is created at booting an OpenFlow session and the OpenFlow session ends without removing the bridge device, this bridge device will not be removed for the next session.
Check that the updated kernel 3.7.2 is working.
Code and Commands>
Execute insmod on openvswitch.ko
Code and Commands> Start up the server and boot OpenFlow Switch.
Caution: In the example shown below, line brakes are included in ovsdb-server command line. However, this command is a one-line command. Please do not type in line breaks.Code and Commands> Create A bridge device br0, and add eth1 and eth2 to br0.
Code and Commands> The configuration of OpenFlow Controller is added to the bridge device.
The controller is tcp connection, and its address and port are 192.168.1.10 and 6633, respectively. The switch is tcp connection, and its port is 6634.Code and Commands> To select fail-mode as secure, the communication to the host is disconnected as it is neither selected nor configured adequately.
Code and Commands> Make sure all configurations, which have been discussed so far, are implemented correctly.
<Code and Commands>
In the same way as OpenFlow/Open vSwitch_x86, check the operation of OpenFlow Switch.
Applying the same process of OpenFlow/OpenFlow Tutorial 1, check the operation of OpenFlow Switch.
From a PC (the controller), check the status of the switch via dpcti commands. In the example shown below, eth1 and eth2 are assigned to the port1 and port2, respectively.
Code and Commands> Realize a flow table has not been created on the switch yet.
Code and Commands> Executing ping between Host1 and Host2 several times, please make sure that pings never reach their targeted hosts.
Code and Commands> Add a table flow via a PC (the controller). This table flow enables packets go through between the port1 and port2.
Code and Commands> Make sure that the table flow is added.
Code and Commands> After the table flow is added, make sure pings reach their targeted hosts as ping executes several times.
Applying the same process of OpenFlow/OpenFlow Tutorial 2, check the operation of OpenFlow Switch.
Execute a controller command on a different terminal of the PC (the controller).
Code and Commands> Make sure there are no flow tables.
Code and Commands> At Host1 and Hos2, execute ping, and make sure that pings can reach their corresponding hosts.
Code and Commands> Check that the flow table of bc10 (the switch) is added from the PC (the controller).
Code and Commands> This is the end of checking the operation of OpenFlow Switch, applying the same process as OpenFlow Tutorial 1 and 2.