Hi Wayne-

On 6/28/2011 2:22 AM, Wei-Chih Chen wrote:
Dear David,

Thank you, David.
From my intuition, the controller (Beacon) should actively connect to switches.
I do not think of the method in the reverse way.
Is it the normal way for Beacon or OpenFlow operations?

As Ben mentioned it can go any way, typically it does go Switch -> Controller, and this is how Beacon is currently meant to be used.


I know the tutorial "Your First Bundle", but would like to make my concepts clear first: After a switch connects to Beacon, all packets going through this switch will be sent to Beacon.
I can set my bundle and receive OpenFlow messages I specify from switches.
Then I handle these messages, such as routing and filtering, and then send back to the switch or specified destinations.

Correct.


If the above statements are true, now, I would like to setup VLANs.
Then I have to handle VLAN tagging/untagging and routing on my own?
This would be a little strange to me. @@

Beacon currently has the ability to learn your local topology of OpenFlow switches and to perform layer 2 switching/routing, so that part should be handled. As for VLAN tagging/untagging, you'd need to create some code to match the VM to a VLAN tag you want, and add an action to each flow mod you push to tag/untag the packets from the matched flow. Note you also need to ensure the switch your using supports the vlan tag/untag actions, OVS does, but some physical switches do not (at least in hardware).


In brief, my problem is that I have no idea how OpenFlow switches and controller cooperate, what roles they play, how packets are transferred/handled, and how flow the system goes.
Sorry for so many questions. Hope that someone can help me.
Thanks!

No problem, happy to help.

-D


Regards,
Wayne

On Tue, Jun 28, 2011 at 2:28 PM, David Erickson <[email protected] <mailto:[email protected]>> wrote:

    Hi Wayne-
    Why not just tell OVS to connect to Beacon and use all the
    machinery already in place?  Here is a script I run on our
    XenServers to tell OVS to connect to Beacon on startup (run from
    rc.local):

    #!/bin/bash
    ovs-vsctl set-controller xenbr0
    ovs-vsctl set-fail-mode xenbr0 standalone
    ovs-vsctl set-controller xenbr0 tcp:192.168.1.11:6633
    <http://192.168.1.11:6633>

    In Beacon you would then create your own bundle(s) that implement
    the functionality you want by adding event handlers.  There is a
    brief tutorial available at
    https://openflow.stanford.edu/display/Beacon/Your+First+Bundle
    that should get you started.  If you need to do things when a
    switch connects/disconnects there are listeners available on the
    IBeaconProvider class, as well as the ability to listen for any
    incoming OpenFlow message from switches.

    Hope that helps.

    -David


    On 6/27/2011 11:12 PM, Wei-Chih Chen wrote:

        Dear all and David,

        I am using Xen Cloud Platform (*XCP*), which includes *Open
        vSwitch*.
        Now I would like to use *Beacon* to control Open vSwitch
        through OpenFlow protocol.

        All tests in Beacon adopt Easy Mock, and I have no idea how to
        connect to a real OpenFlow switch (although Open vSwitch is
        virtual).
        The following are steps I think:
        1. new an OFSwitch object, /ofSwitch/.
        2. Create and new a connection of SocketChannel, /socket/, and
        set it to sockectChannel field of /ofSwitch/.
        3. Set inStream, outStream, ports fields of OFSwitch
        After these steps (perhaps not quite correct), I think I can
        control Open vSwitch through ofSwitch.

        If successfully connecting to it, I would like to setup
        *VLAN*s for VMs on XCP.

        This may include create virtual bridges, set VLAN tags ....
        Could anyone give more details or examples?
        Thanks!

        Regards,
        Wayne


        _______________________________________________
        openflow-discuss mailing list
        [email protected]
        <mailto:[email protected]>
        https://mailman.stanford.edu/mailman/listinfo/openflow-discuss




_______________________________________________
openflow-discuss mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to