From: roopa <roopa@cumulusnetworks.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: Robert Shearman <rshearma@brocade.com>,
ebiederm@xmission.com, netdev@vger.kernel.org,
Vivek Venkatraman <vivek@cumulusnetworks.com>
Subject: Re: [PATCH WIP RFC 0/3] mpls: support for ler
Date: Mon, 08 Jun 2015 08:17:27 -0700 [thread overview]
Message-ID: <5575B207.4040900@cumulusnetworks.com> (raw)
In-Reply-To: <20150608123302.GA3634@pox.localdomain>
On 6/8/15, 5:33 AM, Thomas Graf wrote:
> Yes, the information used to determine the encapsulation and the
> route used to select the outgoing interface might be coming from
> different components. A simple and typical example is if you are
> running quagga to for your underlay which determines which interface
> to use for which tunnel endpoints. On top of that, somebody is
> maintaining your virtual networks which is only aware of the tunnel
> endpoint IP addresses but does not want to manage how to actually
> reach them. So you would have:
>
> ip route add 10.1.1.0/24 via tunnel 20.1.1.1 id 100 [dev vxlan0]
> ip route add 20.1.1.1/24 dev eth0
>
> I've put "dev vxlan0" in brackets for now to indicate that it is
> optional. I'm also using VXLAN as an examples as I think it's
> easier to understand this separation of concern here. The point
> is, whoever is adding the route with the encap information may
> not know what interface to use to reach 20.1.1.1 and we may want
> to rely on existing routes.
>
> I think we want to support three models:
>
> 1. nexthop has encap and outgoing interface
> ip route add 10.1.1.0/24 via tunnel 20.1.1.1 dev eth0
> ip route add 20.1.1.1/24 dev eth0
>
> 2. nexthop has endpoint but no dev
> ip route add 10.1.1.0/24 via tunnel 20.1.1.1
> ip route add 20.1.1.1/24 dev eth0
>
> This would indicate to the routing subsystem to perform a
> fib lookup on 20.1.1.1 to determine the outgoing interface.
>
> 3. virtual tunnel interface to share configuration among routes
> ip route add 10.1.1.0/24 via tunnel 20.1.1.1 dev vxlan0
> ip route add 20.1.1.1/24 dev eth0
>
> I think all of them are intuitive and easy to implement. This will
> also allow to incorporate the bridge model.
>
ack, that sounds intuitive.
With RTA_ENCAP and the mpls examples i was using it looks something like
the below for (1)
ip route add 10.1.1.0/30 encap mpls 200 via 10.1.1.1 dev eth0
The tunnel dst is parsed and understood by the light weight tunnel
driver, which I think will
end up having to do the lookup (needs more thought)...for (2) and (3).
> Your nexthop implementation seemed more correct based on the chunks
> I went through. Can we combine the two series and make the RTA_OIF
> in the nexthop optional if an RTA_ENCAP was provided and provide a
> route lookup instead?
yes, we can do that.
Robert can correct me if i misunderstood, both our patches had similar
code to handle RTA_ENCAP.
Only difference was in the way we stored the encaped data, mine was a
pointer to tunnel state and his was embedded in fib_nh. His patch today
assumes there is a tunnel device.
And mine assumes the output device is specified in the ipv4 fib route.
I am trying to get my code on github to collaborate better. Stay tuned
(hopefully end of day today).
While we are on this conversation, Though the code already supports
nested attributes (with the example robert showed), I introduced
explicit nested attributes for mpls in my version,
and it seemed like it is better to introduce two attributes
RTA_ENCAP_TYPE and RTA_ENCAP and
type determines the nested policy for RTA_ENCAP
RTA_ENCAP_TYPE /* MPLS, VXLAN etc */
RTA_ENCAP {
MPLS_IPTUNNEL_UNSPEC
MPLS_IPTUNNEL_DST
}
RTA_ENCAP { /* this is also similar to the example robert posted for
vxlan */
VXLAN_TUN_UNSPEC,
VXLAN_TUN_ID,
VXLAN_TUN_DST,
VXLAN_TUN_SRC,
VXLAN_TUN_TTL,
VXLAN_TUN_TOS,
VXLAN_TUN_SPORT,
VXLAN_TUN_DPORT,
VXLAN_TUN_FLAGS,
VXLAN_TUN_MAX,
}
Thanks,
Roopa
next prev parent reply other threads:[~2015-06-08 15:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 14:21 [PATCH WIP RFC 0/3] mpls: support for ler Roopa Prabhu
2015-06-05 9:14 ` Thomas Graf
2015-06-05 14:16 ` roopa
2015-06-05 15:26 ` Robert Shearman
2015-06-06 2:54 ` roopa
2015-06-08 12:33 ` Thomas Graf
2015-06-08 15:17 ` roopa [this message]
2015-06-08 22:58 ` Thomas Graf
2015-06-10 7:13 ` roopa
2015-06-12 16:15 ` roopa
2015-06-05 14:31 ` Robert Shearman
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=5575B207.4040900@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
--cc=rshearma@brocade.com \
--cc=tgraf@suug.ch \
--cc=vivek@cumulusnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.