labs.beatcraft.com
OpenFlow

OpenFlow/Open vSwitch_x86

To use 2 PCs (x86 machines), a network is created. One PC is set up for OpenFlow Controller (Controller or the controller), and the other is configured as OpenFlow Switch (Switch or the switch). Then, to apply OpenFlow Tutorial 1 and 2, the operations of the switch and controller is checked on the network.

To use OpenFlow Controller and Open Switch, a set of mininet environment required, mininet is needed to be installed on both PCs. The OS used for both PCs is Ubuntu 12.04. (32bit version)

The instruction of how to instal mininet on a PC is available at OpenFlow/mininet.

PCs, which are treated as host machines, use Linux OS. This project uses bc10 and x86 machines, which are installed Ubuntu 12.04 (32bit version).

After the installation of mininet is completed, set up a network. The overview of the network is showed in the diagram below. IP address of each machine is fixed. This network is used for checking the operation of vSwitch.

SwithEnv.png

Booting OpenFlow Switch

To operate Open vSwitch on a PC (Switch), OpenFlow Switch is configured and booted.

After booting the PC, check whether ovsdb-server and ovs-vswitchd are operated or not. If they are not operated, execute /etc/init.d/openvswitch- switch start.

Code and Commands> After executing openvswitch-seitch start, this is the results of applying ps axu | grep ovs are shown below.

Code and Commands> Check that there are no unnecessary bridge devices.

Caution: If the device is turned down without removing created bridge devices of Open vSwitch, these created bridge devices remain for the next booting.

Code and Commands #ovs-vsctl show>
If unnecessary bridge devices exist, these bridge devices will be removed. In this example, a bridge device is named br0.

Code and Commands>
As a new bridge device, br0, is created, it is listed with eth2 and eth3.

Code and Commands>
Boot each device.

Code and Commands>
Add the configuration of OpenFlow Controller to a bridge device. In this example, the controller is connected via tcp, its address and port are 192.168.1.10 and 6633, respectively. The switch is configured as tcp 6634 port.

Code and Commands>
As fail-mode is configured as secure, disconnect a communication with the host when there are no specific configurations.

Code and Commands>
Please check that all settings, which have been explained here, are implemented correctly.

Code and Commands> This is the end of the configuration of the switch.

Check the operation of OpenFlow Switch

Check the operation of OpenFlow Switch.

OpenFlow Tutorial 1

Check the operation of OpenFlow Switch in the same checking process as OpenFlow/OpenFlow Tutorial 1.

Check the condition of the switch via dpctl commands from the PC (Controller). The output below indicates that the port1 and port2 are allocated to specific eth-s.

Code and Commands> Make sure that flow table does not exist in the switch.

Code and Commands> Sending pings between Host1 and Host2, make sure that these pings do not reach their targeted hosts.

Code and Commands> Add the flow table, which instructs to flow packets form PC (Controller) to the port1 and port2, individually.

Code and Commands> Make sure that the table has been added.

Code and Commands> Sending pings between Host1 and Host2 again, check whether pings can reach their targeted hosts.

Code and Commands> Make sure that the flow table is removed after a specified period of tine has passed.

Code and Commands>

OpenFlow Tutorial 2

Test the operation of OpenFlow Switch, applying the checking process, which is explained at OpenFlow/OpenFlow Tutorial 2.~
Boot Wireshark in the different terminal on the PC (Switch), and Set up Filter as of.

Code and Commands> Execute a controller command in the different terminal on the PC (Controller).

Code and Commands> At this time, please make sure that OpenFlow packets are captured by Wireshark, which is on the PC (Switch).

OVS.png

Sending pings between Host1 and Host2, make sure that these pings reach their targeted hosts.

Code and Commands>
Then, from the PC (Controller), check the increase of flow tables on the PC (Switch).

Code and Commands> This is the end of replicating the checking process of OpenFlow Tutorial 1 and 2.
(This article does not report the difference in performance by the different settings.)

Topic: The difference against OpenFlow Reference implementation

In this article, the version of OpenFlow, which is used for checking its operation, is 1.0. This employs OpenFlow Reference as Controller, which has no longer maintained.

OpenFlow Switch, which is created from OpenFlow reference implementation, is different from Open vSwitch.

Action of OpenFlow Switch, which is based upon Open vSwitch, is 0x00000fff, but Action of OpenFlow Switch, which uses OpenFlow reference implementation, is 0x00000eff. In OpenFlow Switch, which employs OpenFlow reference implementation, Set IP TOS bit is configured as No.

Since Open vSwitch has been fixed and improved, Set IP TOS bit is set as Yes.

To apply to the command below, check the details of OpenFlow Switch, which is based upon OpenFlow reference implementation. (Controller side has already been checked with the commands shown above.)

Code and Commands>

OpenVswitch.png

Figure 1. Action of OpenFlow Switch based upon Open vSwitch.

OpenFlow.png

Figure 2. Action of OpenFlow Switch originated from OpenFlow reference implementation.

Revision History


Front page   New List of pages Search Recent changes   RSS of recent changes