sFlow for tunnels: Tunnel extension & IPv6 encapsulation support #574
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.
Hi Peter, we have another suggestion for tunneling support in sFlow, building on our previous pull request.
Let us know what you think! :)
Background
Motivated by pull request #559,
sfcapd
was recently extended with the capability to parse the nested headers used in GRE tunnels. Given the new command-line option-o gre
,sfcapd
will consider the innermost header stack (i.e., the tunneled flow) to be relevant for the stored flow information. In absence of that command-line option, the outermost header stack (i.e., the tunneling flow) is considered critical.Problem
While being a valuable first step, previous
sfcapd
tunnel functionality would benefit from the following two extensions:sfcapd
support for such IPv6 encapsulation would be desirable.Solution approach
We implement the extensions mentioned above as follows:
6in4
(i.e., with-o 6in4
) to convey that the parsing should advance beyond encapsulation headers.Result & Tests
For demonstations, we provide a PCAP file (extended with a 6in4 flow compared to pull request #559), containing sFlow records for 6 different flows that are encapsulated in an IP flow from 1.1.1.1 to 2.2.2.2. When recording these packets with
sfcapd
using-o gre,6in4
,nfdump
now shows the following records:(The third-to-last flow record comes from a pathological packet with an empty GRE payload).
Moreover, all tests run with
make check
still pass.Contributors
This pull request is proposed by Simon Scherrer from NetFabric.ai.