[ovs-discuss] GRE over IPv6 configuration

Eli Britstein elibr at mellanox.com
Wed Jun 5 09:25:16 UTC 2019


On 6/4/2019 9:38 PM, Ben Pfaff wrote:
> On Tue, Jun 04, 2019 at 06:08:00PM +0000, Eli Britstein wrote:
>> On 6/4/2019 8:24 PM, Ben Pfaff wrote:
>>> On Tue, Jun 04, 2019 at 03:13:02PM +0000, Eli Britstein wrote:
>>>> Hello,
>>>>
>>>> I would like to configure a GRE tunnel over IPv6, on a Linux system.
>>>> However, I encounter the following:
>>>>
>>>> My command:
>>>> ovs-vsctl add-port br1 gre6 -- set interface gre6 type=ip6gre
>>>> options:remote_ip= 2001:db8:0:f102::11 options:key=55
>>>>
>>>> Output:
>>>> ovs-vsctl: Error detected while setting up 'gre6': could not add network
>>>> device gre6 to ofproto (Address family not supported by protocol).  See
>>>> ovs-vswitchd log for details.
>>>> ovs-vsctl: The default log directory is "/var/log/openvswitch".
>>>>
>>>> In the log:
>>>> bridge|WARN|could not add network device gre6 to ofproto (Address family
>>>> not supported by protocol)
>>>>
>>>> I notice that if I want to define a ip6gretap with “ip link”, there is a
>>>> need to use “-6” option, to set the correct family.
>>>>
>>>> Is there a way to note the correct family (though I think should be
>>>> implicit by “ip6gre”)? Or maybe some other configuration?
>>> OVS doesn't have an "ip6gre" interface type.  Just use "gre".
>> I see it does in lib/netdev-vport.c, line 1222. Isn't that ip6gre?
> Um, that's weird.  We don't document it.  I thought for sure that we
> tried to make our "regular" tunnels just accept both IPv4 and IPv6
> addresses.
>
> Greg, I see that you're the author of ip6gre (and ip6erspan).  Can you
> comment on the intentions?  If ip6gre is indeed the right way to
> configure a GRE-over-IPv6 tunnel, then we should document it.  I guess
> the same goes for ip6erspan since I don't see any documentation for that
> either.
>
> Also, can you take a look at Eli's report below and perhaps give him
> some tips?

I think it should be ip6gre, as the kernel should have a ip6gretap 
netdev (and not gretap).

I tracked down to see the failure. I use the openvswitch kernel module 
from the kernel in which OVS_VPORT_TYPE_IP6GRE does not exist (upstream 
kernel 5.2-rc2).

When the kernel gets the request, it is not found with ovs_vport_lookup, 
called from ovs_vport_add in file net/openvswitch/vport.c.

I see that the registration of OVS_VPORT_TYPE_IP6GRE is only in 
datapath/linux/compat/ip6_gre.c, but not in upstream kernel, though 
according to "Documentation/faq/releases.rst", it should be supported as 
of 4.18.

Could it be that IP6GRE support was never pushed to OVS kernel module? 
(and maybe others as well?)

>
>> Anyway, indeed trying with just "gre" the configuration passes OK.
>> However, I don't see any traffic on the other machine.
>>
>>           Port "gre6"
>>               Interface "gre6"
>>                   type: gre
>>                   options: {key="55", local_ip="2001:db8:0:f102::f0",
>> remote_ip="2001:db8:0:f102::f1"}
>>
>> $ ping 2001:db8:0:f102::f1
>> PING 2001:db8:0:f102::f1(2001:db8:0:f102::f1) 56 data bytes
>> 64 bytes from 2001:db8:0:f102::f1: icmp_seq=1 ttl=64 time=0.440 ms
>> 64 bytes from 2001:db8:0:f102::f1: icmp_seq=2 ttl=64 time=0.072 ms
>>
>> I even configured an explicit OF rule to redirect to the gre6 port. I
>> see it is hit, but still no traffic.
>>
>> Do I have to configure explicit routes or something of that kind?
>>


More information about the discuss mailing list