45
11
Are there any practical speed/latency gains from using IPv6, or is it just to make room for more IPs?
45
11
Are there any practical speed/latency gains from using IPv6, or is it just to make room for more IPs?
34
Practical impact? Not really. The effect is pretty small. Where you might run into it is in high latency links (think satellite) where the MTU (maximum transfer unit) is small, which magnifies the impact of the larger overhead IPv6 requires. That's an edge case. The other area where you'll see impacts is when you're doing 6 to 4 translations in the network path, as that always takes some time. But if you had a pure v6 path to that other v6 host such latencies won't be an issue.
In these days of TCP Offload Engines coming built in to more and more network stacks the impact is even less likely to be noticed. If any. In fact, it may even be faster in those cases.
Why is that larger header not as much of a factor as you think? That's because the designers of v6 took some of the lessons of v4 and built things better. Most importantly for cross-internet communications the address fields are handled much more efficiently in routers than in v4, which improves speed of v6 packets through routers as compared to their v4 cousins.
When it comes to same subnet communications where router tables aren't a concern, each packet requires less raw computation. There is one less checksum to validate (Ethernet checksum, no IP checksum for v6, but TCP/UDP checksum is still required) which saves small amounts of time. And on special networks, the ability to have VERY large packets can further save processing.
15
You might see performance improvements with IPv6 if there is a slow router between you and your destination which would have fragmented IPv4 packets along that path. With IPv6, routers will no longer fragment packets for you. (the responsibility has been delegated to end nodes.)
Of course, this is an edge case. There is no reason to believe IPv6 will perform better than IPv4 in the general case.
Also, router vendors may also have optimized their IPv4 data paths more than their IPv6 data paths. So until IPv6 routers have equivalent optimizations, IPv6 may be slower. (For example, some routers may do IPv4 routing in hardware, but IPv6 in software. High-speed performance tests would have to be done to identify this.)
So you have to weigh the chances that there is a router that isn't optimized for IPv6 between you and your destination with the chances that there is a router doing fragmentation of IPv4 packets between you and your destination. ;-)
11
I've been running dual stack IPv6/IPv4 for a while now, and I'm a huge fan.
I can tell you that most of the time the performance and latency are about the same. But on occasion, IPv6 will make your jaw drop.
Consider my ping times to Google:
On IPv4:
rtt min/avg/max/mdev = 35.557/38.225/43.909/3.146 ms
On IPv6:
rtt min/avg/max/mdev = 39.202/40.923/43.105/1.501 ms
Nearly identical. That's what I see most of the time. But every so often, such as when I'm accessing one of my own servers, which is also on IPv6...
On IPv4:
rtt min/avg/max/mdev = 123.510/124.249/125.997/0.909 ms
On IPv6:
rtt min/avg/max/mdev = 87.140/88.600/90.727/1.255 ms
The big difference here, of course, is my ISP's less than optimal IPv4 routing for this route and much better IPv6 routing. (IPv4 goes Boston-Chicago-Denver-Seattle-LA-Phoenix. WTF? IPv6 goes Boston-DC-Atlanta-Dallas-Phoenix.) I suspect there are lots more of these out in the wild.
Your own server's example is clearly due to routing, and not inherent to IPv6 vs IPv4. Your ISP may even fix the convoluted IPv4 route if you contact them for support. – StockB – 2016-05-09T13:20:22.713
@StockB Yes, it's clearly due to routing, and I even said so! – Michael Hampton – 2016-05-09T13:23:09.940
4I see that. I'm just clarifying that this is not due to IPv6, and this part answer is therefore inconclusive. – StockB – 2016-05-10T13:57:13.050
10
In my experience of comparing traceroute6
vs. traceroute
, IPv6 is faster, even through a tunnel broker. This is probably because IPv6 generally requires fewer hops to get from point A to B.
Here's a third-party source backing up my observation:
Accessing sites and content over the Internet is usually faster with IPv6 than with IPv4 because with the new protocol it requires fewer "hops" between network nodesHere is a little experiment I ran using
traceroute
/traceroute6
, ping
/ping6
, and my Hurricane (tunnelbroker.net) tunnel, gathering the sites with both IPv6 and IPv6 capabilities from http://test-ipv6.com:SITE IPv4 hops IPv6 hops IPv4 ping (min/avg/max/mdev ms) IPv6 ping (min/avg/max/mdev ms) 6connect.com 14 8 67.253/72.499/106.113/11.265 55.031/58.340/74.078/5.426 bind.com 13 10 45.450/53.924/98.121/15.158 60.002/82.812/196.221/41.448 comcast6.net >13 10 - 92.043/92.840/94.055/0.680 delong.com 11 7 59.059/66.432/95.884/10.134 52.423/73.042/135.103/30.874 mozilla.org >11 6 33.178/97.481/536.719/148.432 45.562/47.133/48.390/0.805 test-ipv6.chi.vr.org 9 9 85.383/286.941/527.103/155.351 76.788/169.458/516.502/147.166 test-ipv6.com 10 5 34.021/39.507/70.518/10.384 33.009/41.441/70.052/13.069 test-ipv6.iad.vr.org 15 13 86.739/93.772/120.192/10.195 91.341/93.146/97.153/2.006 test-ipv6.motd.be >14 8 86.186/401.432/1629.098/502.373 92.437/481.830/727.557/241.649 test-ipv6.sjc.vr.org 12 6 35.443/40.502/70.426/10.056 33.953/41.144/85.444/14.862 tunnelbroker.net >9 >4 39.504/46.119/73.483/10.290 32.559/63.532/222.700/62.022So, indeed, IPv6 uses fewer hops and is overall no worse, if not slightly better, performance-wise than IPv4, even though my IPv6 is going through a tunnel.
Your third-party source does indeed make the claim that IPv6 requires fewer hops between nodes, but it doesn't explain why. Does anyone have any insight on this? – StockB – 2016-05-09T13:25:59.513
3
I did some research and found a source for empirical analysis of IPv4 and IPv6 hop counts, which suggests that although hop counts are lesser for IPv6 than for IPv4, this number is increasing over time, suggesting that the relatively low hop counts of IPv6 may be attributed to the fact that their are simply less IPv6 nodes, and considering hop counts without evaluating overall latency may be a meaningless metric.
– StockB – 2016-05-09T14:28:24.6730
IPv6 is not 'faster' than IPv4. If your ISP have a better IPv4 BGP peers than IPv6, IPv4 latency is lower than IPv6. And if your ISP have a better IPv6 BGP peers than IPv4, IPv6 latency is lower than IPv4.
3Peering and BGP would be a whole different story than the use of IPv4/IPv6. – Seth – 2017-01-10T14:21:10.360
1Might be super cool to back that up with some statistics, preferably publicly available. – Journeyman Geek – 2017-01-10T14:23:31.260
0
No, there would be no speed gains to speak of, although routing tables are certainly made simpler.
To say that IPv6 "just" makes more room on the net is like saying the Milky Way Galaxy "just" makes more room for dust grains. IPv6 essentially makes it so that it's literally impossible to run out of IP addresses. Even if we were to carpet the entire surface of the earth with CPUs, each with its own IP address, we'd still come nowhere near IP exhaustion. The number of IP addresses in v6 is totally incomprehensible.
1@ErnieDunbar - before the end of which year? – Nas Banov – 2016-06-12T01:00:46.430
1Heh. 2011 was actually the year that we ran out of IPv4 addresses (the last /8 was assigned in January, there was a ceremony and everything). I expected a bigger boom, to be honest. On the other hand, Asia is already moved over to IPv6, and if you have a 4G or LTE phone, then you're also using it that way. – Ernie Dunbar – 2016-06-22T17:28:45.890
@ErnieDunbar People started poaching IPv4 blocks out of AfriNIC, which still has some, and using them in other regions. – Michael Hampton – 2017-01-10T21:20:23.087
1You can only assign 2000 IPv6 addresses to every square meter if those addresses are distributed evenly. In the real world, your refrigerator might request and be assigned a /64 block. – rich remer – 2017-02-21T01:34:56.210
@ErnieDunbar: My understanding of "literally impossible" must be different to yours. – Tyson – 2018-06-04T03:10:32.400
Your understanding of "astronomical" is probably also different than mine. – Ernie Dunbar – 2018-06-18T15:46:10.820
@richremer Drat, then we'd have to limit it to 36000 addresses per square meter of Earth. – Vaelus – 2019-03-20T03:10:56.093
1Can I quote you on that? I'd like to bring it up when every toaster, refrigerator, oven, microwave, pencil sharpener, car, tractor, house, and human being has their own IP and we're looking to expand via IPv8. :P – Aeo – 2011-02-10T18:54:28.580
4You sure can. If you wanted to, you could assign 2000 IPv6 addresses to every square meter of the disc of our galaxy. There are 2^128 possible IP addresses in this scheme, or over 3x10^38. This is more than a billion billion times the total number of IPv4 addresses. You could even assign IPs to every single component of every single household item ever made in the entire history of humanity, until the end of humanity itself. – Ernie Dunbar – 2011-02-10T20:25:54.553
2But it is essentially just to add more IP's? ; ) That is a lot more than I imagined v6 adding, and I thought it added quite a bit. Still, the adage is every time you give someone a mile of rope they realize they needed ten, with double the weight capacity. IP's on a molecular level with nano-tech could eat them up, who knows. (Then again I suppose you could nat that to your local organism IP) – Jane Panda – 2011-02-11T13:50:11.147
Oh don't worry. Before the end of this year, the whole world will see the value of IPv6. In spades. And on the front page of every newspaper. – Ernie Dunbar – 2011-02-11T16:44:55.413
Bob: There are a number of other advantages to IPv6. Some of them have been backported to IPv4, but often not quite as effective. The main driving force currently is v4 address exhaustion though. Check wikipedia: http://en.wikipedia.org/wiki/IPv6#Comparison_to_IPv4
– Martijn Heemels – 2011-07-14T09:42:50.783
1
Just a note that Apple claims that IPv6, "Provides faster routing through the network by using simplified headers" and I find this claim dubious, which is why I found this link.
– StockB – 2016-05-09T13:24:40.5275there's other advantages though, like rendering NAT practically obsolete, and allowing pretty much anyone to have a static ip address – Journeyman Geek – 2010-08-28T01:36:59.560
1Well I dunno if NAT is "obsolete", maybe unnecessary, but I could see benefits in having your network secured off from the rest of the world save for some basic entry points.
Also I think most anyone who wants a static IP currently can have one, ISPs just find it easier to assign them dynamically. You still end up with the same amount of IPs given out. – Jane Panda – 2010-08-28T17:49:55.443
3@Bob Any real security (obscurity does not count) you got from NAT can be done in IPv6 with a stateful firewall. – Azendale – 2012-01-01T04:08:18.473
That argument sounds a lot like "If you have a firewall you don't need a router to protect you online"; in theory it sounds good, but in practice... Well, I imagine we'll all find out soon ; ). – Jane Panda – 2012-01-02T03:44:46.327
@Azendale: Obscurity is a real obstacle, just like how a door lock is a real obstacle. Neither is good enough to prevent against anyone who seriously wants to break in, but they both help making what's already there more secure. – user541686 – 2013-04-04T08:07:23.350
It's not just that ipv6 allows pretty much anyone a static IP address. It allows pretty much anyone to have 18,446,744,073,709,551,615 static IP addresses. – thomasrutter – 2013-07-22T05:07:16.303
1And yes, Azendale is exactly right. Any security benefit from NAT you can also get with a stateful firewall, which is basically what NAT is doing in order to accomplish its routing anyway. And you get the added "obscurity" benefit that anyone who has a /64 has 18,446,744,073,709,551,615 possible IP addresses to choose from. – thomasrutter – 2013-07-22T05:10:02.440
1@Bob When looking for a new ISP just last month, one question I specifically asked was whether they provide for the possibility of statically assigned IP addresses. Out of five or six ISPs I contacted, one answered that they offer that option (at an extra monthly cost), and the one that did offer statically assigned IP addresses certainly is not one of the major/mainstream ISPs. I had never heard of them before. I'd say that ISPs providing statically assigned IP addresses on consumer connections, even at a cost, is definitely the exception rather than the rule. – a CVn – 2013-11-15T14:32:23.430