[ovs-discuss] How to set up GRE tunnel on openvswitch?
YIMIN CHEN
ymchen.nbzj at gmail.com
Fri May 25 03:37:09 UTC 2012
Hi,
Could anyone familiar with tunnel please help clarify for me this
basic concept regarding openvswitch tunnelling? Sorry for taking your
time!
I have so far worked with 2 VMs on a single host running openvswitch.
I have br0 configured, using eth0. My understanding is that br0 is
used to capture traffic between local VMs on the host, hopefully it is
correct.
Now that I want to set up 2 hosts running openvswitch, and seems like
tunneling is a way for VMs to talk to each other. I have br0 on 2nd
host as well.
My questions are:
1) In such setup, does tunneling between 2 hosts require another
bridge, say br1? If so, how is two bridges related?
2) Is br0 for local VM communications only? Do I need to insert flow
in br0 with action set_tunnel to forward to a tunnel?
3) How do I find out the correct tunnel_id for each tunnel I setup?
4) Do I then need to add flow to br1 for a correct forwarding?
Sorry I have so many questions. I couldn't find a detailed
documentation on how this tunneling feature works and still unclear
about the concept. If any of you have worked on tunneling, could you
please kindly shed lights on this? Thank you so much!
Yimin
On Fri, May 25, 2012 at 10:20 AM, YIMIN CHEN <ymchen.nbzj at gmail.com> wrote:
> Hi,
>
> I am trying to understand the GRE tunnel feature on openvswitch, and
> found the following document on the networkstatic.net/. I have some
> questions after the instructions that would appreciate your
> clarification!
>
> --------------------------------------------
> Open vSwitch 1 configuration
> --------------------------------------------
> #ifconfig eth0 192.168.1.155 netmask 255.255.255.0
> #ifconfig eth0 up
> #ovs-vsctl add-br br1
>
> That creates the bridge and logical BVI. Ifconfig –a will now show a
> new interface named br1.
>
> #ifconfig br1 10.1.1.1 netmask 255.255.255.0
> * br1 is now the gateway for your VM DCI interface. That would
> likely be one of a few connections or part of a 802.1q trunk.
>
> #ifconfig br1 up #ovs-vsctl add-port br1 gre1 — set interface gre1
> type=gre options:remote_ip=192.168.1.152
>
> --------------------------------------------
> Open vSwitch 2 configuration
> --------------------------------------------
> #ifconfig eth0 192.168.1.152 netmask 255.255.255.0
> #ifconfig eth0 up
> #ovs-vsctl add-br br1
> #ifconfig br1 10.1.1.2 netmask 255.255.255.0
> #ifconfig br1 up
> #ovs-vsctl add-port br1 gre1 — set interface gre1 type=gre
> options:remote_ip=192.168.1.152
>
> * Now spin up your VM. I use the following to boot Ubuntu off CD
>
>
> Here is my questions/confusions regarding the feature:
> 1) How is br1 and eth0 related? Is eth0 not part of br1? or just br1
> using eth0 to tunnel the packets? When ovs is started, eth0 is already
> part of br0. What is the difference between br0 and br1? br1 is a
> tunnel between switches and br0 is virtual bridge for VMs on the same
> switch?
> 2) In the example, switch 1 and switch 2's eth0 address configs are
> different, but in the add-port command, the remote_ip was same, was
> that a mistake? should remote_ip same as the configured eth0 ip?
>
> Appreciate your helps! If there is a better documentation about how
> the feature works and how to setup, would you please give me a
> pointer?
>
> Thanks!
> Yimin
More information about the discuss
mailing list