]> git.proxmox.com Git - mirror_iproute2.git/commit
seg6: add support for vrftable attribute in SRv6 End.DT4/DT6 behaviors
authorPaolo Lungaroni <paolo.lungaroni@cnit.it>
Wed, 2 Dec 2020 13:15:51 +0000 (14:15 +0100)
committerDavid Ahern <dsahern@gmail.com>
Wed, 9 Dec 2020 02:27:42 +0000 (02:27 +0000)
commit69629b4e43c42f01e73e8dcce9aba47ff6a99036
tree560ac1905ba7d069e61e49e2bddba4693be6b607
parentcfad32569f67947110bcdb95da6956c0dbdcfc2d
seg6: add support for vrftable attribute in SRv6 End.DT4/DT6 behaviors

We introduce the "vrftable" attribute for supporting the SRv6 End.DT4 and
End.DT6 behaviors in iproute2.
The "vrftable" attribute indicates the routing table associated with
the VRF device used by SRv6 End.DT4/DT6 for routing IPv4/IPv6 packets.

The SRv6 End.DT4/DT6 is used to implement IPv4/IPv6 L3 VPNs based on Segment
Routing over IPv6 networks in multi-tenants environments.
It decapsulates the received packets and it performs the IPv4/IPv6 routing
lookup in the routing table of the tenant.

The SRv6 End.DT4/DT6 leverages a VRF device in order to force the routing
lookup into the associated routing table using the "vrftable" attribute.

Some examples:
 $ ip -6 route add 2001:db8::1 encap seg6local action End.DT4 vrftable 100 dev eth0
 $ ip -6 route add 2001:db8::2 encap seg6local action End.DT6 vrftable 200 dev eth0

Standard Output:
 $ ip -6 route show 2001:db8::1
 2001:db8::1  encap seg6local action End.DT4 vrftable 100 dev eth0 metric 1024 pref medium

JSON Output:
$ ip -6 -j -p route show 2001:db8::2
[ {
        "dst": "2001:db8::2",
        "encap": "seg6local",
        "action": "End.DT6",
        "vrftable": 200,
        "dev": "eth0",
        "metric": 1024,
        "flags": [ ],
        "pref": "medium"
} ]

v2:
 - no changes made: resubmit after pulling out this patch from the kernel
   patchset.

v1:
 - mixing this patch with the kernel patchset confused patckwork.

Signed-off-by: Paolo Lungaroni <paolo.lungaroni@cnit.it>
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/iproute_lwtunnel.c