From: Alex Gartrell <agartrell@fb.com>
To: <lvs-devel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>, <ps@fb.com>
Subject: What is the best way to accomplish "decapsulate any" functionality?
Date: Mon, 28 Jul 2014 11:26:32 -0700 [thread overview]
Message-ID: <20140728112632.5f8e8f5f@agartrell-SH67H> (raw)
Short Version:
What's the best way to accomplish "decapsulate any" functionality for
"IPv{4,6} in IPv{4,6}?" Should I write an xfrm module or is there a
simple, existing method?
Long Version:
We've been using IPVS with ipip tunneling for ages, and it's been great,
but our decapsulation story has always been a little weak. At some point,
someone figured out that if you create tunnel interfaces for both v4 and v6
and add loopback or link-local unicast addresses to each, the kernel will
magically start decapsulating these packets for you, and you can put your
virtual IPs on any dummy interface you want (or loopback).
So our load balancer's pre-run script basically boils down to:
ip tunnel add mode ipip
ip addr add dev tunl0 127.0.0.101/32
ip link set dev tunl0 up
ip addr add dev lo ${VIP}/32
# And then the equivalent for v6
And all was well and good in the kingdom. But now we're getting ready to
turn up our IPv6-only internal cluster, and so we're forced to push forward
on things like v4-in-v6 tunneling (currently unsupported by IPVS, but we've
got a patch set that we'll put up when we have a working end-to-end-test).
Predictably, our magic script fell apart and we had to look into how the
sausage was made.
So, before I go off and write some terrible xfrm decapsulate-any module, is
there a "right way" to do this with stock linux?
Thanks,
Alex
next reply other threads:[~2014-07-28 18:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 18:26 Alex Gartrell [this message]
2014-07-29 20:45 ` What is the best way to accomplish "decapsulate any" functionality? Alexey Andriyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140728112632.5f8e8f5f@agartrell-SH67H \
--to=agartrell@fb.com \
--cc=kernel-team@fb.com \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ps@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox