OSDN Git Service

seg6: add support for the SRv6 End.DT4 behavior
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Wed, 2 Dec 2020 13:05:14 +0000 (14:05 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Dec 2020 21:30:50 +0000 (13:30 -0800)
commit664d6f86868bacbfdb3926a975dff29ca9ebe0d0
treeffc6115ca998368960c3ac936be933ae5ff13c84
parentcfdf64a03406351a9d6c1fe568a141a9a85d4710
seg6: add support for the SRv6 End.DT4 behavior

SRv6 End.DT4 is defined in the SRv6 Network Programming [1].

The SRv6 End.DT4 is used to implement IPv4 L3VPN use-cases in
multi-tenants environments. It decapsulates the received packets and it
performs IPv4 routing lookup in the routing table of the tenant.

The SRv6 End.DT4 Linux implementation leverages a VRF device in order to
force the routing lookup into the associated routing table.

To make the End.DT4 work properly, it must be guaranteed that the routing
table used for routing lookup operations is bound to one and only one
VRF during the tunnel creation. Such constraint has to be enforced by
enabling the VRF strict_mode sysctl parameter, i.e:
 $ sysctl -wq net.vrf.strict_mode=1.

At JANOG44, LINE corporation presented their multi-tenant DC architecture
using SRv6 [2]. In the slides, they reported that the Linux kernel is
missing the support of SRv6 End.DT4 behavior.

The SRv6 End.DT4 behavior can be instantiated using a command similar to
the following:

 $ ip route add 2001:db8::1 encap seg6local action End.DT4 vrftable 100 dev eth0

We introduce the "vrftable" extension in iproute2 in a following patch.

[1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming
[2] https://speakerdeck.com/line_developers/line-data-center-networking-with-srv6

Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/seg6_local.h
net/ipv6/seg6_local.c