-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
[BREAKING CHANGE] Change initial sequence to be 33434 #1203
Comments
This causes another long standing issue, where the trace can be seen to "jump" suddenly to a large ttl and then revert to a lower ttl with (greyed out) higher ttl responses. For example, a trace
The target As the trace progresses, the sequence number (and therefore dest port) will eventually enter the range The result is output such as the following:
Whilst we would expect the For the next round, which begins with the sequence number (and therefore dest port) still in the range, the target is discovered at ttl=6 (seq/dest=33440) as expected. However, as the trace in previous rounds got as far as ttl=15 then Trippy shows all 15 hops, but with hops 7 though 15 greyed out as they are beyond the target found in the current round at ttl=6. Therefore this what is shown:
Screenshot to make it clearer: Aside: Trippy operates a sliding windows probing protocol and sends multiple probes in parallel (with increasing ttl values) before receiving responses, up to a configured miximim window size. That is why we also see ttl=7 (seq/dest=33441) showing a response here. Even more confusingly, the hop with ttl=15 is shown as 🟡 as it is the target and this is 16th probe we have sent for that ttl, and the previous 14 did not response. The hop with ttl=6 is shown as 🔵 it also has "phantom" packet loss for the same reason but is not the target hop. Fixed in #1226 Eventually the sequence number (and therefore dest port) will move beyond the range and therefore no further This behaviour is highly confusing. |
The simple solution is to change the initial sequence to be 33434, which in turn means the dest port for UDP tracing will be 33434. Note that there is no change in the wrapping behaviour. This solution in not perfect but is an improvement on the current situation in that:
The sole downside is that, once the sequence number (dest port) moves beyond the range (33534 or greater) then the target hop will show "fake" packet loss. Technically this is not wrong, as the target does stop responding to probes, but it may confuse users into believing there is a problem when there is not. |
[0.11.0] - 2024-08-11 Added - Added NAT detection for `IPv4/udp/dublin` ([#1104](fujiapple852/trippy#1104)) - Added public API ([#1192](fujiapple852/trippy#1192)) - Added support for NAT detection (`N`) column ([#1219](fujiapple852/trippy#1219)) - Added support for last icmp packet type (`T`) column ([#1105](fujiapple852/trippy#1105)) - Added support for last icmp packet code (`C`) column ([#1109](fujiapple852/trippy#1109)) - Added support for the probe failure count (`f`) column ([#1258](fujiapple852/trippy#1258)) - Added settings dialog tab hotkeys ([#1217](fujiapple852/trippy#1217)) - Added `--dns-ttl` flag to allow refreshing the reverse DNS results ([#1233](fujiapple852/trippy#1233)) - Added `--generate-man` flag for generating [ROFF](https://en.wikipedia.org/wiki/Roff_(software)) man page ([#85](fujiapple852/trippy#85)) - Added Ubuntu PPA package ([#859](fujiapple852/trippy#859)) - Added Chocolatey package ([#572](fujiapple852/trippy#572)) Changed - [BREAKING CHANGE] Changed initial sequence to be `33434` ([#1203](fujiapple852/trippy#1203)) - [BREAKING CHANGE] Renamed `tui-max-[samples|flows]` as `max-[samples|flows]` ([#1187](fujiapple852/trippy#1187)) - Separated library and binary crates ([#1141](fujiapple852/trippy#1141)) - Record `icmp` packet code ([#734](fujiapple852/trippy#734)) - Transient error handling for `IPv4` on macOS, Linux & Windows ([#1255](fujiapple852/trippy#1255)) - Improved error messages ([#1150](fujiapple852/trippy#1150)) - Revamp the help dialog ([#1260](fujiapple852/trippy#1260)) Fixed - Fixed `DestinationUnreachable` incorrectly assumed to come from target host ([#1225](fujiapple852/trippy#1225)) - Fixed incorrect target hop calculation ([#1226](fujiapple852/trippy#1226)) - Do not conflate `AddressInUse` and `AddrNotAvailable` errors ([#1246](fujiapple852/trippy#1246))
For udp tracing, by default Trippy uses a fixed src port which is set from the process id and a variable dest port which is set from the sequence number, starting from
33000
and incremented for each probe, eventually wrapping at64511
(which isu16::MAX
- 2x the maximum sequence per round, gives65535 - (512 * 2) = 64511
).By convention, many devices on the internet allow probes to ports in the range
(33434..=33534)
and will return anDestinationUnreachable
ICMP error which can be used by traceroute to confirm that the target has ben reached.Therefore, given Trippy does not by default use dest ports in this range for udp probes, they do not respond with any ICMP error and so Trippy cannot see that the target was reached and must therefore show the hop as unknown.
The options here are:
33434
and ensure the sequence number wraps at33534
. This is problematic as the "window" is only 100 ports wide, which is less than the theoretically max ttl (255) and also invalidates several constraints the tracing strategy currently upholds, such as ensuring that (i) 2x the number of sequence numbers can be used per-round to account for probe re-issues and (ii) sequence numbers will not be reused within two round to avoid long delayed-packets being incorrectly associated with the wrong round.Note: a probe "re-issue" occurs when a probe cannot be dispatched as the socket cannot be bound to a given local socket address, typically as the port is already in use. In such cases Trippy will "skip" the problematic port and "re-issue" the probe with the next sequence number. In reality this is only an issue for tcp probes (which use variable src ports that must be bound to the socket) but may also effect udp for non-raw mode.
The text was updated successfully, but these errors were encountered: