Is your feature request related to a problem? Please describe.
I am sorry if this is a noob question, but how do I know my packets are flowing through the DERP relay or not? Is there any way to get that information? I tried sudo tailscale netcheck and it just shows the nearest DERPs.
โฏ sudo tailscale netcheck
[sudo] password for karan:
Report:
* UDP: true
* IPv4: yes, <PublicIP>:51163
* IPv6: no
* MappingVariesByDestIP: false
* HairPinning: false
* PortMapping:
* Nearest DERP: 3 (sin)
* DERP latency:
- 1, nyc = 299.6ms
- 2, sfo = 262.9ms
- 3, sin = 76.5ms
- 4, fra = 163.5ms
- 5, syd = 437.7ms
Describe the solution you'd like
Probably a DERP: yes/no indication in netcheck ?
Describe alternatives you've considered
Tried to ping the server with/without Tailscale to notice the latencies. If the result is similar then I assume that the traffic is not going via DERP. Assumption could be wrong in case DERP relay is pretty close by which might not add significant latency, so it's not a reliable way.
Additional context
I have seen UDP: true on the above command, so does that indicate it is not going via DERP?
Thanks!
Whether DERP is used is not a function of just your computer's network properties. It's based on the combined properties of the two machines trying to talk to each other.
(But MappingVariesByDestIP: false and UDP: true are the easy case... if both sides have that, it'll almost certainly work.)
The way you check today is ping a peer (or do something to make it active) and then run:
$ tailscale status --active
And look to see where the *asterisks* are around which route. If you see it around an IP:port, then it's using direct UDP.
If you see it around an airport code, then it's using DERP.
We could probably combine that all into one command, like:
$ tailscale check-path <hostname-or-IP>
And tell you which path it took.
@mr-karan, done. See https://github.com/tailscale/tailscale/pull/663 (currently in review)
@bradfitz That was fast :open_mouth: Thanks a lot!