Add support for the SRv6 End.DT46 behavior #1037
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the support for the SRv6 End.DT46 behavior.
The SRv6 End.DT46 behavior is used to implement L3VPN use-cases in multi-tenants environments. It decapsulates the received packets and it performs IPv4 or IPv6 routing lookup in the routing table of the tenant.
The SRv6 End.DT46 behavior has been introduced in the Linux kernel in the commit [1] and it is available since kernel version 5.15.
The iproute2 suite has been extended as well for supporting the SRv6 End.DT46 behavior [2].
An example iproute2 command to instantiate an SRv6 End.DT46 behavior is the following:
$ ip -6 route add 2001:db8::1 encap seg6local action End.DT46 vrftable 100 dev vrf100.
In the above command, the
vrftable
attribute indicates the routing table associated with the VRF device used by SRv6 End.DT46 for routing IP packets.The only prerequisite to instantiate an End.DT46 behavior is enabling the VRF
strict_mode
sysctl parameter$ sysctl -wq net.vrf.strict_mode=1
Hereafter, we provide an example of how to instantiate an SRv6 End.DT46 behavior with pyroute2.
First, a VRF needs to be created:
Then, the following command can be used to instantiate the behavior:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=8b532109bf885b7b59b93487bc4672eb6d071b78
[2] https://www.spinics.net/lists/netdev/msg749223.html