-
Notifications
You must be signed in to change notification settings - Fork 116
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
Use ipv4 and ipv6 to connect to speedtest servers #22
Comments
Hello, what's the point of this change? |
Currently, |
Maybe I wrong? |
Too bad :/ As I understand it, the speedtest api returns a list of hostnames. These hostnames could resolve to v4 and/or v6.
I understand that I really don't have to care about the underlying protocol, but in the case of performing speed tests to explicitly v4 targets and explicitly v6 targets to see, if there is any difference in speed when using different protocols. |
Ok, we can filter server list by ipv4 or ipv6 adressess. We can change Transport. But what point for this changes? |
Measuring speed of v4 and v6 individually |
It doesn't matter in my opinion. ipv6 and ipv4 difference only on server names. You can change server name, or his address. But this not change network speed to this server. |
When performing a speed test, you are not only measuring the performance of the server endpoint (speedtest server) itself but also (and I believe more importantly) the components involved during the whole path which your tcp stream's packets take, namely
Since IPv4 and IPv6 are two different layer3 protocols, the routing may differ significantly and every single on of those stations may handle them differently and cause a different outcome. |
Not sure if relevant, but maybe the following can teach us something: With
Without
We came across Tested with 1.1.5, 1.3.0, and 1.3.1. |
@crbertoldo Yes, I think it's related, maybe using a custom DNS resolver can solve this problem. like this |
While I was looking for a way to test IPv4 and IPv6 separately, I came across an interesting url parameter in the Ookla speed test server (in addition to speedtest.net, they also run the speedtestcustom.com server) To test IPv4 exclusively using the "ipv4-only" parameter in the middle of the url: To test IPv6 if it's available on the connection using the "dualstack" parameter in the middle of the url: Interestingly, when testing it on a mobile phone with some carriers like Tmobile, the two test url's will sometimes display different geographic locations/states on the same connection due to different servers, therefore the ping times may vary depending on IPv4 or IPv6 tests. |
I have dualstack network, but there seems to be no difference on my computer. |
As I mentioned, it pulls up different servers on some mobile carriers, but not all. Does the line below in /etc/resolv.conf help with IPv4v6 DNS conflicts? Here's a puzzler.... netsh int ipv4 set interface iPhone currenthoplimit=65 The IPv4 TTL=65 sticks fine even between reboots, but the IPv6 TTL reverts back to 255 within about a minute for some reason even without rebooting. So I tried the following persistent commands too, but no dice, IPv6 reverts back to 255. netsh int ipv4 set interface iPhone currenthoplimit=65 store=persistent Any idea why, and any tips I should try? |
I try to turn off ipv4 in the adapter. and then visit http://ookla.dualstack.speedtestcustom.com/api/js/servers?engine=js&limit=10 In addition, speedtest.com already supports ipv6. Because the traffic of speedtest.net is proxied by cloudflare (even supports quic). |
Maybe your ipv6 can't connect, the system automatically set ttl to 255, in order to sends it at a longer distance. |
Currently, speedtest-go can test speed through ipv6, but the server must have an ipv6 address. .\speedtest-go.exe --source=[your ipv6 interface] --force-http-ping --custom-url=http://losangeles.ca.speedtest.frontier.com:8080/upload.php Result: The problem that is still unsolved is to determine whether a specific server supports ipv6. |
According to some docs, the "dualstack" ookla server reverts to IPv6 if your connection supports it, otherwise falls back to IPv4... well, at least that's their intent. heh
When I set the IPv4 TTL to 65 it sticks fine even between reboots. netsh int ipv6 show interface IPhone store=active - shows 255 While I use TTL to bypassing mobile hotspot limits, I've noticed that setting it to lower than 40 can improve ping times probably due to servers being forced to find shorter routes on lower TTL values. ymmv |
haha, I got it |
@BillAnt1 Thank you. Did you turn off auto metric? |
I will give that a try later on tonight and report back to you. |
I have turned off Metrics on both IPv4 and v6 protocols in the interface, entered the value 10 for v4, 20 for v6, set the TTL to 65 for both, but after a few minutes v6 reverted back to first 0 then 255, v4 seems to be persistent on 65. Then If flipped the Metrics around 10/20 to 20/10 for v4/v6 set the TTL to 65 for both, but v6 keeps reverting back. :( Any other suggestions? netsh int ipv6 show interface IPhone store=active - shows 0 then 255 after a few minutes of setting the TTL to 65 But the IPv4 TTL value stick just fine. |
Hi, @BillAnt1, I checked Microsoft's documentation. It seems that on Neighbor Discovery the TTL will set to 255. I think you can try turning off Neighbor Discovery. |
Thanks for the find, I will have to investigate that. :) ip6tables -t mangle -I PREROUTING -i iPhone0 -j HL --hl-set 65 And the IPv4 TTL is set via "TTL --ttl-set" You could play around with lower TTL values than 40 to try to force less hops during speed tests. It's best to disable the IPv6 interface in Windows since now we know setting it is not persistent till a solution is found. |
I suggest a command line switch with -4 for IPv4 only and -6 for IPv6 only like iproute2 |
% host speedtest02a.web.zen.net.uk % speedtest-go --custom-url=http://2a02\:8010\:9\:1\:\:2:8080/speedtest/upload.php
⠋ Retrieving User Information ✓ Test Server: [Custom] 2a02:8010:9:1::2:8080 % speedtest-go --custom-url=http://51.148.82.21:8080/speedtest/upload.php
⠋ Retrieving User Information ✓ Test Server: [Custom] 51.148.82.21:8080 |
Using @void-fm's method, I'm seeing a substantial difference in IPv6 vs. IPv4. Both these Speedtest servers are hosted on my ISPs network and in both cases, IPv6 outperforms IPv4. My router in this case is a 1U rackmount server running VPP to handle NAT and routing. Server 1, IPv4:
Server 1, IPv6:
Server 2, IPv4:
Server 2, IPv6:
|
What should we do if the target server unsupported IPV6? |
Fail and display an error about unable to connect, doesn't exist, anything really. |
Hey,
is there a way to use both ipv4 and ipv6 to connect to the speedtest servers?
The text was updated successfully, but these errors were encountered: