Am 04.07.2014 00:02, schrieb Ben Pfaff:
On Wed, Jul 02, 2014 at 09:36:16AM +0200, Daniel Spiekermann wrote:
Hi there,

I am working with ovs and mininet just for a few days, and now I
have some difficulties to unterstand one thing.
I have the "official" mininet VM and locally it works fine. I use
another VM running an OVS-installation. I installed it according to
the INSTALL.Debian instructions. This ovs-installation works locally
fine, too.

If I unterstood the documentation correct, the mininet VM has a
reference controller for Openflow installed, so I tried to connect
my OVS with this mininet controller.
On the ovs, I configured a simple bridge called mybridge with some
virtual interfaces on it and connected it to the mininet-controller
on port 6663 via

ovs-vsctl set-controller mybridge tcp:172.23.56.42:6663

So this is the result:
root@ovs:~/openvswitch-2.1.2# ovs-vsctl show
e4b66793-fd68-4d55-9e0b-63f295cd2ce0
     Bridge mybridge
         Controller "tcp:172.23.56.42:6663"
             is_connected: true
         Port "eth0"
             Interface "eth0"
         Port "vport1"
             Interface "vport1"
         Port mybridge
             Interface mybridge
                 type: internal
         Port "vport2"
             Interface "vport2"
     ovs_version: "2.1.2"


Now I want to add some flows into the ovs, but all trials fail.
With
sudo ovs-ofctl show tcp:127.0.0.1:6663
there is no output or result. Not even the prompt is printing, looks
like waiting for a timeout... and I am waiting for a long time...
Same result after firing this command:

mininet@mininet-vm:~$ sudo ovs-ofctl add-flow tcp:127.0.0.1:6663
in_port=1,actions=output:9
You didn't tell OVS to listen on port 6663.

Do you just want "ovs-ofctl add-flow mybridge
in_port=1,actions=output:9"?
In the mininet-VM I told the controller with
ovs-controller ptcp:6663
to listen on this port
As far as I unterstood the mininet controller listen to port 6663 for incoming of-capable switches like ovs.

In my ovs-VM I ran ovs-ovctl set-controller mybridge tcp:172.23.56.42:6663

Now the ovs should connect to the controller, which produce this logfiles

 sudo ovs-controller ptcp:6663  -v
Jul 03 05:19:42|00001|poll_loop|DBG|wakeup due to [POLLIN] on fd 3 (0.0.0.0:6663<->) at ../lib/stream-fd.c:259
Jul 03 05:19:42|00002|rconn|DBG|tcp:172.23.56.56:40811: entering ACTIVE
Jul 03 05:19:42|00003|vconn|DBG|tcp:172.23.56.56:40811: sent (Success): OFPT_HELLO (xid=0x2): Jul 03 05:19:42|00004|vconn|DBG|tcp:172.23.56.56:40811: received: OFPT_HELLO (xid=0x12): Jul 03 05:19:42|00005|vconn|DBG|tcp:172.23.56.56:40811: negotiated OpenFlow version 0x01 (we support versions 0x01 to 0x01 inc lusive, peer no later than version 0x01) Jul 03 05:19:42|00006|vconn|DBG|tcp:172.23.56.56:40811: sent (Success): OFPT_FEATURES_REQUEST (xid=0x1): Jul 03 05:19:42|00007|vconn|DBG|tcp:172.23.56.56:40811: sent (Success): OFPT_SET_CONFIG (xid=0x3): frags=normal miss_send_len= 128 Jul 03 05:19:42|00008|poll_loop|DBG|wakeup due to [POLLIN] on fd 8 (172.23.56.42:6663<->172.23.56.56:40811) at ../lib/stream-f d.c:149 Jul 03 05:19:42|00009|vconn|DBG|tcp:172.23.56.56:40811: received: OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000080027dd406 a
n_tables:254, n_buffers:256
features: capabilities:0xc7, actions:0xfff
 1(eth0): addr:08:00:27:dd:40:6a
     config:     0
     state:      0
     current:    1GB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG
 LOCAL(mybridge): addr:08:00:27:dd:40:6a
     config:     0
     state:      0
Jul 03 05:19:43|00010|poll_loop|DBG|wakeup due to [POLLIN] on fd 8 (172.23.56.42:6663<->172.23.56.56:40811) at ../lib/stream-f d.c:149 Jul 03 05:19:43|00011|vconn|DBG|tcp:172.23.56.56:40811: received: OFPT_PACKET_IN (xid=0x0): total_len=144 in_port=1 data_len=1 28 buffer=0xffffff00

It seems to me like the connection is established between switch and controller.

But now I can't manipulate the flows. What command to I really need to add a flow via the controller to the ovs-switch? mininet@mininet-vm:~$ sudo ovs-ofctl add-flow mybridge in_port=1,actions=output:9
ovs-ofctl: mybridge is not a bridge or a socket
didn't work

Thanks
Daniel

_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to