OpenFlow/OpenvSwitch_x86
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]]~
[[OpenFlow]]~
#contents
* OpenFlow/Open vSwitch_x86 [#bff1d8db]
>
To use 2 PCs (x86 machines), a network is created. One PC...
as OpenFlow Switch (Switch or the switch). Then, to apply...
>
To use OpenFlow Controller and Open Switch, a set of mini...
both PCs is Ubuntu 12.04. (32bit version)~
~
The instruction of how to instal mininet on a PC is avail...
~
PCs, which are treated as host machines, use Linux OS. Th...
~
After the installation of mininet is completed, set up a ...
is fixed. This network is used for checking the operation...
#ref(SwithEnv.png,,80%);~
* Booting OpenFlow Switch [#d4074d02]
>
To operate Open vSwitch on a PC (Switch), OpenFlow Switch...
~
After booting the PC, check whether ovsdb-server and ovs-...
$ sudo /etc/init.d/openvswitch-switch start
>
After executing openvswitch-seitch start, this is the res...
$ ps axu | grep ovs
root 1360 0.0 0.0 4780 416 ? S< 16:1...
root 1361 0.0 0.1 4904 1652 ? S<s 16:1...
root 1388 0.0 0.0 5464 692 ? S< 16:1...
root 1389 0.0 0.1 5468 1692 ? S<s 16:1...
beat 3713 0.0 0.0 5364 840 pts/3 S+ 17:1...
>
Check that there are no unnecessary bridge devices.~
~
Caution: If the device is turned down without removing cr...
#ovs-vsctl show
>
If unnecessary bridge devices exist, these bridge devices...
# ovs-vsctl del-br br0
>
As a new bridge device, br0, is created, it is listed wit...
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 eth2
# ovs-vsctl add-port br0 eth3
>
Boot each device.~
# ifconfig eth2 up
# ifconfig eth3 up
# ifconfig br0 up
>
Add the configuration of OpenFlow Controller to a bridge ...
# ovs-vsctl set-controller br0 tcp:192.168.1.10:6633 ptc...
>
As fail-mode is configured as secure, disconnect a commun...
# ovs-vsctl set-fail-mode br0 secure
>
Please check that all settings, which have been explained...
# ovs-vsctl show
b8c00762-8c74-455b-9c96-3a9e9c8cf275
Bridge "br0"
Controller "ptcp:6634"
Controller "tcp:192.168.1.10:6633"
fail_mode: secure
Port "eth2"
Interface "eth2"
Port "eth3"
Interface "eth3"
Port "br0"
Interface "br0"
type: internal
ovs_version: "1.4.0+build0"
~
This is the end of the configuration of the switch.~
* Check the operation of OpenFlow Switch [#fdcf1d96]
>
Check the operation of OpenFlow Switch.~
** OpenFlow Tutorial 1 [#b1558ede]
>
Check the operation of OpenFlow Switch in the same checki...
~
Check the condition of the switch via dpctl commands from...
to specific eth-s.~
$ dpctl show tcp:192.168.1.1:6634
features_reply (xid=0x23ede000): ver:0x1, dpid:d0b6a5b34
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
1(eth3): addr:00:0d:0b:6a:5b:34, config: 0, state:0x1
current: 10MB-HD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-F...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-H...
2(eth2): addr:00:1d:73:2e:91:94, config: 0, state:0x1
current: 10MB-HD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPE...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPE...
LOCAL(br0): addr:00:0d:0b:6a:5b:34, config: 0, state:0
get_config_reply (xid=0x272fb894): miss_send_len=0
>
Make sure that flow table does not exist in the switch.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x3c4353aa): flags=none type=1(flow)
>
Sending pings between Host1 and Host2, make sure that the...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
From 192.168.11.2 icmp_seq=1 Destination Host Unreachable
From 192.168.11.2 icmp_seq=2 Destination Host Unreachable
From 192.168.11.2 icmp_seq=3 Destination Host Unreachable
>
Add the flow table, which instructs to flow packets form ...
$ 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 has been added.~
$ dpctl dump-flows tcp:192.168.1.1:6634stats_reply (xid=...
cookie=0, duration_sec=9s, duration_nsec=443000000s, ta...
cookie=0, duration_sec=2s, duration_nsec=309000000s, ta...
>
Sending pings between Host1 and Host2 again, check whethe...
$ 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=6.89 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=2.07 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.74 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.740/3.570/6.897/2.357 ms
>
Make sure that the flow table is removed after a specifie...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x68565278): flags=none type=1(flow)
** OpenFlow Tutorial 2 [#jb697b5b]
>
Test the operation of OpenFlow Switch, applying the check...
~
Boot Wireshark in the different terminal on the PC (Switc...
$ sudo wireshark
>
Execute a controller command in the different terminal on...
$ controller ptcp:
>
At this time, please make sure that OpenFlow packets are ...
#ref(OVS.png,,80%);~
>
Sending pings between Host1 and Host2, make sure that the...
$ 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=11.3 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=2.86 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=2.41 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 2.410/5.534/11.323/4.097 ms
>
Then, from the PC (Controller), check the increase of flo...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xac113424): flags=none type=1(flow)
cookie=0, duration_sec=11s, duration_nsec=597000000s, t...
cookie=0, duration_sec=11s, duration_nsec=594000000s, ...
cookie=0, duration_sec=6s, duration_nsec=592000000s, t...
cookie=0, duration_sec=6s, duration_nsec=588000000s, t...
cookie=0, duration_sec=11s, duration_nsec=599000000s, ...
This is the end of replicating the checking process of Op...
(This article does not report the difference in performan...
*** Topic: The difference against OpenFlow Reference impl...
>
In this article, the version of OpenFlow, which is used f...
longer maintained.~
~
OpenFlow Switch, which is created from OpenFlow reference...
~
Action of OpenFlow Switch, which is based upon Open vSwit...
implementation, is 0x00000eff. In OpenFlow Switch, which ...
~
Since Open vSwitch has been fixed and improved, Set IP TO...
~
To apply to the command below, check the details of OpenF...
already been checked with the commands shown above.)~
# ofdatapath punix:/var/run/dp0.sock -i eth2,eth3 --loca...
# ofprotocol unix:/var/run/dp0.sock tcp:192.168.1.10:663...
>
#ref(OpenVswitch.png,,80%) ~
Figure 1. Action of OpenFlow Switch based upon Open vSwit...
~
#ref(OpenFlow.png,,80%) ~
Figure 2. Action of OpenFlow Switch originated from OpenF...
~
* Revision History [#p5b60a86]
>
- 2013/08/28 This article is initially published.~
End:
[[labs.beatcraft.com]]~
[[OpenFlow]]~
#contents
* OpenFlow/Open vSwitch_x86 [#bff1d8db]
>
To use 2 PCs (x86 machines), a network is created. One PC...
as OpenFlow Switch (Switch or the switch). Then, to apply...
>
To use OpenFlow Controller and Open Switch, a set of mini...
both PCs is Ubuntu 12.04. (32bit version)~
~
The instruction of how to instal mininet on a PC is avail...
~
PCs, which are treated as host machines, use Linux OS. Th...
~
After the installation of mininet is completed, set up a ...
is fixed. This network is used for checking the operation...
#ref(SwithEnv.png,,80%);~
* Booting OpenFlow Switch [#d4074d02]
>
To operate Open vSwitch on a PC (Switch), OpenFlow Switch...
~
After booting the PC, check whether ovsdb-server and ovs-...
$ sudo /etc/init.d/openvswitch-switch start
>
After executing openvswitch-seitch start, this is the res...
$ ps axu | grep ovs
root 1360 0.0 0.0 4780 416 ? S< 16:1...
root 1361 0.0 0.1 4904 1652 ? S<s 16:1...
root 1388 0.0 0.0 5464 692 ? S< 16:1...
root 1389 0.0 0.1 5468 1692 ? S<s 16:1...
beat 3713 0.0 0.0 5364 840 pts/3 S+ 17:1...
>
Check that there are no unnecessary bridge devices.~
~
Caution: If the device is turned down without removing cr...
#ovs-vsctl show
>
If unnecessary bridge devices exist, these bridge devices...
# ovs-vsctl del-br br0
>
As a new bridge device, br0, is created, it is listed wit...
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 eth2
# ovs-vsctl add-port br0 eth3
>
Boot each device.~
# ifconfig eth2 up
# ifconfig eth3 up
# ifconfig br0 up
>
Add the configuration of OpenFlow Controller to a bridge ...
# ovs-vsctl set-controller br0 tcp:192.168.1.10:6633 ptc...
>
As fail-mode is configured as secure, disconnect a commun...
# ovs-vsctl set-fail-mode br0 secure
>
Please check that all settings, which have been explained...
# ovs-vsctl show
b8c00762-8c74-455b-9c96-3a9e9c8cf275
Bridge "br0"
Controller "ptcp:6634"
Controller "tcp:192.168.1.10:6633"
fail_mode: secure
Port "eth2"
Interface "eth2"
Port "eth3"
Interface "eth3"
Port "br0"
Interface "br0"
type: internal
ovs_version: "1.4.0+build0"
~
This is the end of the configuration of the switch.~
* Check the operation of OpenFlow Switch [#fdcf1d96]
>
Check the operation of OpenFlow Switch.~
** OpenFlow Tutorial 1 [#b1558ede]
>
Check the operation of OpenFlow Switch in the same checki...
~
Check the condition of the switch via dpctl commands from...
to specific eth-s.~
$ dpctl show tcp:192.168.1.1:6634
features_reply (xid=0x23ede000): ver:0x1, dpid:d0b6a5b34
n_tables:255, n_buffers:256
features: capabilities:0xc7, actions:0xfff
1(eth3): addr:00:0d:0b:6a:5b:34, config: 0, state:0x1
current: 10MB-HD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-F...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-H...
2(eth2): addr:00:1d:73:2e:91:94, config: 0, state:0x1
current: 10MB-HD AUTO_NEG
advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPE...
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPE...
LOCAL(br0): addr:00:0d:0b:6a:5b:34, config: 0, state:0
get_config_reply (xid=0x272fb894): miss_send_len=0
>
Make sure that flow table does not exist in the switch.~
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x3c4353aa): flags=none type=1(flow)
>
Sending pings between Host1 and Host2, make sure that the...
$ ping -c3 192.168.11.1
PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.
From 192.168.11.2 icmp_seq=1 Destination Host Unreachable
From 192.168.11.2 icmp_seq=2 Destination Host Unreachable
From 192.168.11.2 icmp_seq=3 Destination Host Unreachable
>
Add the flow table, which instructs to flow packets form ...
$ 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 has been added.~
$ dpctl dump-flows tcp:192.168.1.1:6634stats_reply (xid=...
cookie=0, duration_sec=9s, duration_nsec=443000000s, ta...
cookie=0, duration_sec=2s, duration_nsec=309000000s, ta...
>
Sending pings between Host1 and Host2 again, check whethe...
$ 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=6.89 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=2.07 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.74 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 1.740/3.570/6.897/2.357 ms
>
Make sure that the flow table is removed after a specifie...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0x68565278): flags=none type=1(flow)
** OpenFlow Tutorial 2 [#jb697b5b]
>
Test the operation of OpenFlow Switch, applying the check...
~
Boot Wireshark in the different terminal on the PC (Switc...
$ sudo wireshark
>
Execute a controller command in the different terminal on...
$ controller ptcp:
>
At this time, please make sure that OpenFlow packets are ...
#ref(OVS.png,,80%);~
>
Sending pings between Host1 and Host2, make sure that the...
$ 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=11.3 ms
64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=2.86 ms
64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=2.41 ms
--- 192.168.11.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time ...
rtt min/avg/max/mdev = 2.410/5.534/11.323/4.097 ms
>
Then, from the PC (Controller), check the increase of flo...
$ dpctl dump-flows tcp:192.168.1.1:6634
stats_reply (xid=0xac113424): flags=none type=1(flow)
cookie=0, duration_sec=11s, duration_nsec=597000000s, t...
cookie=0, duration_sec=11s, duration_nsec=594000000s, ...
cookie=0, duration_sec=6s, duration_nsec=592000000s, t...
cookie=0, duration_sec=6s, duration_nsec=588000000s, t...
cookie=0, duration_sec=11s, duration_nsec=599000000s, ...
This is the end of replicating the checking process of Op...
(This article does not report the difference in performan...
*** Topic: The difference against OpenFlow Reference impl...
>
In this article, the version of OpenFlow, which is used f...
longer maintained.~
~
OpenFlow Switch, which is created from OpenFlow reference...
~
Action of OpenFlow Switch, which is based upon Open vSwit...
implementation, is 0x00000eff. In OpenFlow Switch, which ...
~
Since Open vSwitch has been fixed and improved, Set IP TO...
~
To apply to the command below, check the details of OpenF...
already been checked with the commands shown above.)~
# ofdatapath punix:/var/run/dp0.sock -i eth2,eth3 --loca...
# ofprotocol unix:/var/run/dp0.sock tcp:192.168.1.10:663...
>
#ref(OpenVswitch.png,,80%) ~
Figure 1. Action of OpenFlow Switch based upon Open vSwit...
~
#ref(OpenFlow.png,,80%) ~
Figure 2. Action of OpenFlow Switch originated from OpenF...
~
* Revision History [#p5b60a86]
>
- 2013/08/28 This article is initially published.~
Page: