OpenFlow/Open vSwitch_bc10
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]]~
[[OpenFlow]]~
#contents
* OpenFlow/Open vSwitch_bc10 [#k78ffb1a]
>
This article introduces how to apply Open vSwitch on bc10...
~
Similar to [[OpenFlow/Open vSwitch_x86]], mininet is also...
~
#ref(SwithEnv_bc10.png,,80%) ~
*Overview of Open vSwitch_bc10 [#ceeb4f86]
>
The build environment and the base of SD image for bc10 u...
~
Since the build or rebuild process of arago-project consu...
~
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~
** Downloading Open vSwitch [#r814226d]
>
Download Open vSwitch (1.9.0) on Ubuntu.~
$ cd ~
$ wget http://openvswitch.org/releases/openvswitch-1.9.0...
$ tar xvfz openvswitch-1.9.0.tar.gz
** kernel update [#ed120a81]
>
The kernel version is updated to version 3.7.2. To update...
~
The kernel options, which are specified by README and INS...
Assume that bc10-openflow.config is placed at the HOME di...
$ cd ~
$ wget http://www.kernel.org/pub/linux/kernel/v3.0/linux...
$ tar xvfj linux-3.7.2.tar.bz2
>
Add the PATH if there is no PATH to go to ti-sdk-beaglebo...
$ export PATH={HOME}/ti-sdk-beagleboard-05.05.01.00/linu...
>
Copy bc10-openflow.config to linux-3.7.2/.config. Then, e...
$ cp bc10-openflow.config linux-3.7.2/.config
$ cd linux-3.7.2/
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- o...
>
To execute menuconfig, make sure that specific items, whi...
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- m...
-*- Networking support --->
Networking options --->
<M> 802.1d Ethernet Bridging
...
[*] QoS and/or fair queueing --->
<*> Hierarchical Token Bucket (HTB)
<*> Hierarchical Fair Service Curve (H...
...
<M> Open vSwitch
...
Device Drivers --->
[*] Network device support --->
<*> Universal TUN/TAP device driver supp...
>
If there are check marks in front of the desired items co...
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- u...
Caution: As uImage is being created, an error massage sho...
"mkimage" command not found - U-Boot images will not be ...
>
$ sudo apt-get install uboot-mkimage
>
After the build process is completed, install kernel temp...
$ mkdir tmp_install
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- m...
** Building OpenvSwitch [#r40a7c0d]
>
Run the configure command of the extracted OpenvSwitch.~
Caution: Actually the configure command is a one-line com...
$ cd ~/openvswitch-1.9.0
$ ./configure --target=arm-arago-linux-gnueabi --host=ar...
--with-linux=/home/beat/linux-3.7.2 --with-linux-source=...
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
>
To execute build, there is redundancy of definitions, and...
$ vi datapath/linux/compat/include/linux/types.h
#include_next <linux/types.h>
+ /*
#ifndef HAVE_CSUM_TYPES
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
#endif
+ */
#ifndef HAVE_BOOL_TYPE
>
Caution: make command is actually a one-line command. Exe...
$ make -C /home/beat/openvswitch-1.9.0 \
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
CROSS_COMPILE="arm-arago-linux-gnueabi-" ARCH="arm" KCC=...
>
Create a temporal directory for preparing the installatio...
Caution: make install command is a one line command. Plea...
$ mkdir tmp_install
$ make -C /home/beat/openvswitch-1.9.0
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
CROSS_COMPILE="arm-arago-linux-gnueabi-" ARCH="arm" KCC=...
DESTDIR=/home/beat/openvswitch-1.9.0/tmp_install install
*** Placing files in SD [#y8556561]
>
The kernel is generated at directories below linux-3.7.2/...
$ sudo -s
# cd ~/linux-3.7.2
# cp arch/arm/boot/uImage /media/FAT/uImage
# cd tmp_install
# cp -a lib/ /media/EXT3/
# cd ~/openvswitch-1.9.0/tmp_install
# cp -a usr /media/EXT3/
* Booting OpenFlow Switch [#odfddb92]
>
To use OpenvSwitch on bc10, configure and boot OpenFlow S...
~
Caution: If a bridge device of vSwitch is created at boot...
~
Check that the updated kernel 3.7.2 is working.~
# uname -a
Linux beagleboard 3.7.2 #2 Tue Apr 30 12:34:35 JST 2013 ...
>
Execute insmod on openvswitch.ko~
# insmod /lib/modules/3.7.2/kernel/net/openvswitch/openv...
>
For the frst time boot, please create conf.db.~
# ovsdb-tool create /usr/local/etc/openvswitch/conf.db /...
>
Start up the server and boot OpenFlow Switch.~
Caution: In the example shown below, line brakes are incl...
# ovsdb-server --remote=punix:/usr/local/var/run/openvsw...
--remote=db:Open_vSwitch,manager_options --private-key=d...
--certificate=db:SSL,certificate --bootstrap-ca-cert=db:...
# ovs-vsctl --no-wait init
# ovs-vswitchd --pidfile --detach
>
Create A bridge device br0, and add eth1 and eth2 to br0.~
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 eth1
# ovs-vsctl add-port br0 eth2
# ifconfig eth1 up
# ifconfig eth2 up
# ifconfig br0 up
The configuration of OpenFlow Controller is added to the ...
~
The controller is tcp connection, and its address and por...
# ovs-vsctl set-controller br0 tcp:192.168.1.10:6633 ptc...
>
To select fail-mode as secure, the communication to the h...
# ovs-vsctl set-fail-mode br0 secure
>
Make sure all configurations, which have been discussed s...
# ovs-vsctl show
d64d185f-43f9-48db-9e27-fecd0e10d54b
Bridge "br0"
Controller "ptcp:6634"
Controller "tcp:192.168.1.10:6633"
fail_mode: secure
Port "br0"
Interface "br0"
type: internal
Port "eth1"
Interface "eth1"
Port "eth2"
Interface "eth2"
* Checking the operation of OpenFlow Switch [#wc446f31]
>
In the same way as [[OpenFlow/Open vSwitch_x86]], check t...
** OpenFlow Tutorial 1 [#m0c8dac5]
>
Applying the same process of [[OpenFlow/OpenFlow Tutorial...
~
From a PC (Controller), check the status of the switch vi...
$ dpctl show tcp:192.168.1.1:6634
features_reply (xid=0x7b67dfa0): ver:0x1, dpid:d0b6a5b34
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
1(eth1): addr:00:0d:0b:6a:5b:34, config: 0, state:0
current: 1GB-FD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-...
2(eth2): addr:4c:e6:76:55:44:cd, config: 0, state:0
current: 100MB-FD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPP...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPP...
LOCAL(br0): addr:00:0d:0b:6a:5b:34, config: 0, state:0
get_config_reply (xid=0xdb4bcad5): miss_send_len=0
>
Realize a flow table has not been created on the switch y...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xa654d2d0): flags=none type=1(flow)
>
Executing ping between Host1 and Host2 several times, ple...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
From 192.168.11.10 icmp_seq=1 Destination Host Unreachable
From 192.168.11.10 icmp_seq=2 Destination Host Unreachable
From 192.168.11.10 icmp_seq=3 Destination Host Unreachable
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packe...
>
Add a table flow via a PC (the controller). This table fl...
$ dpctl add-flow tcp:192.168.1.1:6634 in_port=1,actions=...
$ dpctl add-flow tcp:192.168.1.1:6634 in_port=2,actions=...
>
Make sure that the table flow is added.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x8504cde8): flags=none type=1(flow)
cookie=0, duration_sec=10s, duration_nsec=941000000s,...
cookie=0, duration_sec=1s, duration_nsec=943000000s, ...
>
After the table flow is added, make sure pings reach thei...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
64 bytes from 192.168.11.1: icmp_req=1 ttl=64 time=4.17 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=1.25 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.33 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.256/2.256/4.177/1.358 ms
** OpenFlow Tutorial 2 [#hf177402]
>
Applying the same process of [[OpenFlow/OpenFlow Tutorial...
~
Execute a controller command on a different terminal of t...
$ controller ptcp:
>
Make sure there are no flow tables.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xf2eadd2c): flags=none type=1(flow)
>
At Host1 and Hos2, execute ping, and make sure that pings...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
64 bytes from 192.168.11.1: icmp_req=1 ttl=64 time=4.64 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=3.10 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.33 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.331/3.026/4.642/1.353 ms
>
Check that the flow table of bc10 (the switch) is added f...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xb5e0898d): flags=none type=1(flow)
cookie=0, duration_sec=11s, duration_nsec=308000000s,...
cookie=0, duration_sec=12s, duration_nsec=308000000s,...
cookie=0, duration_sec=7s, duration_nsec=301000000s, ...
cookie=0, duration_sec=7s, duration_nsec=297000000s, ...
>
This is the end of checking the operation of OpenFlow Swi...
End:
[[labs.beatcraft.com]]~
[[OpenFlow]]~
#contents
* OpenFlow/Open vSwitch_bc10 [#k78ffb1a]
>
This article introduces how to apply Open vSwitch on bc10...
~
Similar to [[OpenFlow/Open vSwitch_x86]], mininet is also...
~
#ref(SwithEnv_bc10.png,,80%) ~
*Overview of Open vSwitch_bc10 [#ceeb4f86]
>
The build environment and the base of SD image for bc10 u...
~
Since the build or rebuild process of arago-project consu...
~
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~
** Downloading Open vSwitch [#r814226d]
>
Download Open vSwitch (1.9.0) on Ubuntu.~
$ cd ~
$ wget http://openvswitch.org/releases/openvswitch-1.9.0...
$ tar xvfz openvswitch-1.9.0.tar.gz
** kernel update [#ed120a81]
>
The kernel version is updated to version 3.7.2. To update...
~
The kernel options, which are specified by README and INS...
Assume that bc10-openflow.config is placed at the HOME di...
$ cd ~
$ wget http://www.kernel.org/pub/linux/kernel/v3.0/linux...
$ tar xvfj linux-3.7.2.tar.bz2
>
Add the PATH if there is no PATH to go to ti-sdk-beaglebo...
$ export PATH={HOME}/ti-sdk-beagleboard-05.05.01.00/linu...
>
Copy bc10-openflow.config to linux-3.7.2/.config. Then, e...
$ cp bc10-openflow.config linux-3.7.2/.config
$ cd linux-3.7.2/
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- o...
>
To execute menuconfig, make sure that specific items, whi...
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- m...
-*- Networking support --->
Networking options --->
<M> 802.1d Ethernet Bridging
...
[*] QoS and/or fair queueing --->
<*> Hierarchical Token Bucket (HTB)
<*> Hierarchical Fair Service Curve (H...
...
<M> Open vSwitch
...
Device Drivers --->
[*] Network device support --->
<*> Universal TUN/TAP device driver supp...
>
If there are check marks in front of the desired items co...
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- u...
Caution: As uImage is being created, an error massage sho...
"mkimage" command not found - U-Boot images will not be ...
>
$ sudo apt-get install uboot-mkimage
>
After the build process is completed, install kernel temp...
$ mkdir tmp_install
$ make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- m...
** Building OpenvSwitch [#r40a7c0d]
>
Run the configure command of the extracted OpenvSwitch.~
Caution: Actually the configure command is a one-line com...
$ cd ~/openvswitch-1.9.0
$ ./configure --target=arm-arago-linux-gnueabi --host=ar...
--with-linux=/home/beat/linux-3.7.2 --with-linux-source=...
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
>
To execute build, there is redundancy of definitions, and...
$ vi datapath/linux/compat/include/linux/types.h
#include_next <linux/types.h>
+ /*
#ifndef HAVE_CSUM_TYPES
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
#endif
+ */
#ifndef HAVE_BOOL_TYPE
>
Caution: make command is actually a one-line command. Exe...
$ make -C /home/beat/openvswitch-1.9.0 \
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
CROSS_COMPILE="arm-arago-linux-gnueabi-" ARCH="arm" KCC=...
>
Create a temporal directory for preparing the installatio...
Caution: make install command is a one line command. Plea...
$ mkdir tmp_install
$ make -C /home/beat/openvswitch-1.9.0
SSL_CFLAGS="-I/home/beat/oe/arago-tmp/sysroots/armv7a-ar...
SSL_LIBS="-L/home/beat/oe/arago-tmp/sysroots/armv7a-arag...
CROSS_COMPILE="arm-arago-linux-gnueabi-" ARCH="arm" KCC=...
DESTDIR=/home/beat/openvswitch-1.9.0/tmp_install install
*** Placing files in SD [#y8556561]
>
The kernel is generated at directories below linux-3.7.2/...
$ sudo -s
# cd ~/linux-3.7.2
# cp arch/arm/boot/uImage /media/FAT/uImage
# cd tmp_install
# cp -a lib/ /media/EXT3/
# cd ~/openvswitch-1.9.0/tmp_install
# cp -a usr /media/EXT3/
* Booting OpenFlow Switch [#odfddb92]
>
To use OpenvSwitch on bc10, configure and boot OpenFlow S...
~
Caution: If a bridge device of vSwitch is created at boot...
~
Check that the updated kernel 3.7.2 is working.~
# uname -a
Linux beagleboard 3.7.2 #2 Tue Apr 30 12:34:35 JST 2013 ...
>
Execute insmod on openvswitch.ko~
# insmod /lib/modules/3.7.2/kernel/net/openvswitch/openv...
>
For the frst time boot, please create conf.db.~
# ovsdb-tool create /usr/local/etc/openvswitch/conf.db /...
>
Start up the server and boot OpenFlow Switch.~
Caution: In the example shown below, line brakes are incl...
# ovsdb-server --remote=punix:/usr/local/var/run/openvsw...
--remote=db:Open_vSwitch,manager_options --private-key=d...
--certificate=db:SSL,certificate --bootstrap-ca-cert=db:...
# ovs-vsctl --no-wait init
# ovs-vswitchd --pidfile --detach
>
Create A bridge device br0, and add eth1 and eth2 to br0.~
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 eth1
# ovs-vsctl add-port br0 eth2
# ifconfig eth1 up
# ifconfig eth2 up
# ifconfig br0 up
The configuration of OpenFlow Controller is added to the ...
~
The controller is tcp connection, and its address and por...
# ovs-vsctl set-controller br0 tcp:192.168.1.10:6633 ptc...
>
To select fail-mode as secure, the communication to the h...
# ovs-vsctl set-fail-mode br0 secure
>
Make sure all configurations, which have been discussed s...
# ovs-vsctl show
d64d185f-43f9-48db-9e27-fecd0e10d54b
Bridge "br0"
Controller "ptcp:6634"
Controller "tcp:192.168.1.10:6633"
fail_mode: secure
Port "br0"
Interface "br0"
type: internal
Port "eth1"
Interface "eth1"
Port "eth2"
Interface "eth2"
* Checking the operation of OpenFlow Switch [#wc446f31]
>
In the same way as [[OpenFlow/Open vSwitch_x86]], check t...
** OpenFlow Tutorial 1 [#m0c8dac5]
>
Applying the same process of [[OpenFlow/OpenFlow Tutorial...
~
From a PC (Controller), check the status of the switch vi...
$ dpctl show tcp:192.168.1.1:6634
features_reply (xid=0x7b67dfa0): ver:0x1, dpid:d0b6a5b34
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
1(eth1): addr:00:0d:0b:6a:5b:34, config: 0, state:0
current: 1GB-FD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-...
2(eth2): addr:4c:e6:76:55:44:cd, config: 0, state:0
current: 100MB-FD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPP...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPP...
LOCAL(br0): addr:00:0d:0b:6a:5b:34, config: 0, state:0
get_config_reply (xid=0xdb4bcad5): miss_send_len=0
>
Realize a flow table has not been created on the switch y...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xa654d2d0): flags=none type=1(flow)
>
Executing ping between Host1 and Host2 several times, ple...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
From 192.168.11.10 icmp_seq=1 Destination Host Unreachable
From 192.168.11.10 icmp_seq=2 Destination Host Unreachable
From 192.168.11.10 icmp_seq=3 Destination Host Unreachable
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packe...
>
Add a table flow via a PC (the controller). This table fl...
$ dpctl add-flow tcp:192.168.1.1:6634 in_port=1,actions=...
$ dpctl add-flow tcp:192.168.1.1:6634 in_port=2,actions=...
>
Make sure that the table flow is added.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x8504cde8): flags=none type=1(flow)
cookie=0, duration_sec=10s, duration_nsec=941000000s,...
cookie=0, duration_sec=1s, duration_nsec=943000000s, ...
>
After the table flow is added, make sure pings reach thei...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
64 bytes from 192.168.11.1: icmp_req=1 ttl=64 time=4.17 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=1.25 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.33 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.256/2.256/4.177/1.358 ms
** OpenFlow Tutorial 2 [#hf177402]
>
Applying the same process of [[OpenFlow/OpenFlow Tutorial...
~
Execute a controller command on a different terminal of t...
$ controller ptcp:
>
Make sure there are no flow tables.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xf2eadd2c): flags=none type=1(flow)
>
At Host1 and Hos2, execute ping, and make sure that pings...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
64 bytes from 192.168.11.1: icmp_req=1 ttl=64 time=4.64 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=3.10 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.33 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.331/3.026/4.642/1.353 ms
>
Check that the flow table of bc10 (the switch) is added f...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xb5e0898d): flags=none type=1(flow)
cookie=0, duration_sec=11s, duration_nsec=308000000s,...
cookie=0, duration_sec=12s, duration_nsec=308000000s,...
cookie=0, duration_sec=7s, duration_nsec=301000000s, ...
cookie=0, duration_sec=7s, duration_nsec=297000000s, ...
>
This is the end of checking the operation of OpenFlow Swi...
Page: