Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equal Cost Multi-path Routing #274

Open
5 tasks done
fujiapple852 opened this issue Aug 19, 2022 · 6 comments
Open
5 tasks done

Equal Cost Multi-path Routing #274

fujiapple852 opened this issue Aug 19, 2022 · 6 comments
Labels

Comments

@fujiapple852
Copy link
Owner

fujiapple852 commented Aug 19, 2022

Tracking issue for all Equal Cost Multi-path Routing work items.

We wish to support the following multi-path strategies:

  • Classic (traceroute and MTR)
    • Set the sequence number in either the src or dest port number
  • Paris (see here)
    • Use the IPv4 checksum field to store the sequence and manipulate the UDP payload to ensure a valid packet
  • Dublin (see here)
    • Use the IPv4 identifier field to store the sequence number
    • Manipulate the IPv6 Payload Length to store the sequence number

We wish to support these for IPv4 & IPv6 for both UDP and TCP protocols.

Current support:

Strategy Family Protocol Status
Classic IPv4 / IPv6 UDP / TCP
Paris IPv4 UDP
Paris IPv6 UDP
Dublin IPv4 UDP
Dublin IPv6 UDP
Paris IPv4 TCP
Paris IPv6 TCP
Dublin IPv4 TCP
Dublin IPv6 TCP

Tasks

@fujiapple852 fujiapple852 self-assigned this Aug 19, 2022
@fujiapple852 fujiapple852 changed the title Multipath Equal Cost Multi-path Routing Aug 19, 2022
@crisidev
Copy link

crisidev commented Nov 1, 2023

In this tracking issue there is no mention of supporting Paris for IPv6. Is it something planned by any chance?

@fujiapple852
Copy link
Owner Author

fujiapple852 commented Nov 2, 2023

@crisidev I'd certainly like for Trippy to be able to support the Paris ECMP strategy for IPv6/UDP.

I'm struggling to recall the details now but I know that when I initially added IPv6/UDP support to Trippy I hit some issues with IPv6/UDP checksum on Linux (may have been related to hardware offloading).

As a reminder: the Paris ECMP strategy works by manipulating the UDP checksum (and payload) to encode the sequence number in the checksum. In order to do this we need to be able to specify (or manipulate) the IPv6/UDP header.

It might be possible to set IP_HDRINCL (or perhaps IPV6_HDRINCL?) on the IPv6/UDP raw socket such that the correct checksum could be set, I'd have to try it again to see as a lot has changed since then. At the time I opened this GH issue I likely believed it was not possible. Digging into the libparistraceroute src code may also help point at the right solution.

Is using the Paris ECMP strategy for IPv6/UDP something you have experience with? I'm curious as to your use case for it.

@crisidev
Copy link

crisidev commented Nov 2, 2023

Thanks a lot for the detailed answer. I unfortunately do not have a lot of experience with Paris ECMP for IPv6/UDP. I have a pretty complex IPv6 home network I am currently experimenting using the official Paris traceroute, but I am well versed and love Rust, hence I would like to rewrite my probe code and base it on Trippy.

I just started scratching the surface of your amazing project, but when I have a little bit of time, I could try to reintroduce this support, after properly understanding how Paris traceroute does it in their library.

@fujiapple852
Copy link
Owner Author

fujiapple852 commented Nov 2, 2023

@crisidev I managed to get it to work :)

Tested in Linux and macOS and seems to work. If you were able to try it out that would be great!

Issue #749 and WIP pr in #750

@crisidev
Copy link

crisidev commented Nov 2, 2023

Oh wow, that was fast! I'll try this out today!

@fujiapple852
Copy link
Owner Author

@crisidev Dublin for IPv6 just merged and will be in 0.10.0 if that's of interest to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants