[ovs-discuss] Create a GRE interface

Lee, Jeongkeun jklee at hp.com
Sat May 1 04:19:14 UTC 2010

Hi Jesse,

Thanks for the info. I could create a gre tunnel and use it for communication between two OVS switches in different subnets.

One bug I found is
calling this command below when another port(s) already exists in br0 crashes the system.
> sudo utilities/ovs-vsctl add bridge br0 ports ...

When the gre0 interface has no remote_ip option, 'ovs-vsctl add bridge br0 ports ..' does not cause a crash but just complains that remote_ip is not given, even if br0 has another ports.

Thank you.
-- JK

From: Jesse Gross [mailto:jesse at nicira.com]
Sent: Thursday, April 29, 2010 4:05 PM
To: Lee, Jeongkeun
Cc: discuss at openvswitch.org
Subject: Re: [ovs-discuss] Create a GRE interface

On Wed, Apr 28, 2010 at 2:33 PM, Lee, Jeongkeun <jklee at hp.com<mailto:jklee at hp.com>> wrote:
Hi Jesse,

I'm trying to create a GRE interface with the latest master branch, in which the new vport GRE is integrated. So, I assume I can skip the first two steps from the instructions you gave before.

1. Unload the Linux ip_gre module if it already loaded
2. Load the OVS GRE module (ip_gre_mod.ko in the same directory as the main OVS module).
3. Create an interface of type "gre" using the config protocol.  The options field on the interface has several GRE specific choices such as remote_ip, local_ip, key, etc.
4. Connect the interface to a bridge and use it like a normal port.

To do the step 3, create an interface of type "gre", I tried ovs-vsctl:

ovs-vsctl create interface type=gre name=gre0 options="remote_ip=x.x.x.x"

which created a corresponding record in the interface DB.

Then, calling 'ovs-vsctl add-port br0 gre0' failed with the errors saying there is no such device with a name gre0. Seems like the OVSDB wire protocol (used by ovs-vsctl and ovsdb-client) does not really configure OVS but just makes DB transactions.

Can you please describe a little bit more about the step 3 and 4?

Sorry, I think I combined a few steps.  You actually have to create an interface and then a port (the difference being that a port can contain more than one interface for bonding but in this case there is only one).  You can then add that port to a bridge.

For example:

jesse at jesse-laptop:~/openvswitch$ sudo utilities/ovs-vsctl create interface name=gre0 type=gre options:remote_ip=x.x.x.x

jesse at jesse-laptop:~/openvswitch$ sudo utilities/ovs-vsctl create port name=gre0 interfaces=[4d158f28-220b-4e6f-aa7c-9ded0b528bdf]

jesse at jesse-laptop:~/openvswitch$ sudo utilities/ovs-vsctl add bridge br0 ports 13cd8b36-c52b-479d-a188-51ee36782ed4

Also, I should point out that while you are correct that you no longer need to load a separate OVS GRE module, you do still need to unload the Linux ip_gre module if it is loaded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20100501/63cf3e81/attachment-0001.html>

More information about the discuss mailing list