Bringing IPv6 to Life at Shadow

Claire Tinard
Shadow Tech Blog
Published in
5 min readMay 3, 2023

A brief description of the Internet

We are all familiar with IP addresses looking like this: 104.22.31.126. These are called IPv4 addresses, which stand for Internet Protocol version 4.

When your computer wants to reach an internet server, it does the same thing we used to do back in the paper & pencil days: it uses an envelope. Suppose your computer has the IPv4 address 104.22.31.126 and needs to reach Google DNS servers that are using the 8.8.8.8 address: the “real” message (which will undoubtedly be something like “what is the IP address of google.com?” considering that we are talking with a DNS server) will be enclosed by your computer in an envelope that looks like this :

FROM: 104.22.31.126
TO: 8.8.8.8

Routers in your ISP’s network will look at the “TO” field on the envelopes to determine where to send the packets, and the remote server will use the “FROM” field to know where to send the answer. In more technical terms, these envelopes are called “headers”.

IPv4 addresses are like phone numbers: they have to be unique. Imagine if someone else in the world had the same phone number as you. How would phone companies know where to route the call?

We need more space: introducing IPv6

As seen above, IPv4 addresses are represented by 4 numbers separated by dots. Each number can range from 0 to 255, giving us approximately 4,2 billion possibilities (and not even all of them are usable). While this may seem like a lot, it is not enough to accommodate the ever-growing number of devices connected to the internet, such as smartphones, laptops, smartwatches, and even connected microwaves, which will require IP addresses in the future.

This is one of the reasons why network operators are slowly transitioning to a newer version of IP called IPv6. IPv6 addresses serve the exact same purpose as their IPv4 counterpart, but they look like this: 2a01:cb01:2054:b8c6:81f6:2a63:13d6:2a52 (yeah, we can even put some letters in them!). That’s a lot more addressing space as we network engineers call it, and it can comfortably accommodate many many times the whole Internet.

IPv6 envelopes look like this:

FROM: 2a01:cb01:2054:b8c6:81f6:2a63:13d6:2a52
TO: 2001:4860:4860::8888

You cannot use those with IPv4 envelopes: either your computer and the remote server communicate using only IPv6 envelopes or only IPv4 envelopes, but not a combination of them. When IPv6 envelopes are available, they are preferred over IPv4 ones.

Why do we have to care about all this?

Shadow is a cloud provider. When you connect to your Shadow PC, you expect to experience as little latency as possible. The more latency, the less enjoyable your experience will be. While IPv6 does not inherently provide better latency than IPv4, using it can still result in a better overall experience. In this document, we will explain why.

We discussed earlier that we are running short of IPv4 addressing space, meaning that all existing IPv4 addresses have been allocated. Every combination is used. That’s an issue if new companies, new cites or a new network operators connecting to the Internet for the first time. Imagine your phone company saying that “we are running out of available phone numbers”.

The way network operators circumvent this by using CGNAT, which stands for Carrier-grade Network Address Translation. To put it simply, this is a network equipment that can share a single IPv4 address between multiple customers. In some parts of the world and with certain providers, the IPv4 address you use to access the Internet is the same as other people in your neighborhood. This means that your home internet is routed through a big CGNAT router, which can unfortunately act as a bottleneck when there are high demands on the network (like in the evening when everyone gets home and put on their favorite show).

But wait, why doesn’t everyone use IPv6?

As IPv6 envelopes headers aren’t compatible with IPv4 ones, a lot of networking equipments needs to be renewed and this takes a lot of time. Depending on your provider and your location, your home internet falls into one of the following categories :

  • IPv4 only: you have “plain old” IPv4 access to the Internet, and you are the only one using your IPv4 address. No bottlenecks, hurray!
  • IPv6+IPv4: you can access the IPv6 Internet, how futuristic is that! Alongside this, you still have access to the “plain old” IPv4 Internet. When the service you’re using supports IPv6, data goes this way. Is the service still only supports IPv4, you use the “plain old” IPv4 pipes. You are still the only one using your IPv4 address, it is not shared among your neighbors.
  • IPv6+Shared IPv4: it’s getting complicated. This is the same setup as the above one, except that your IPv4 address is shared with other users using the CGNAT technique. IPv6 access is not shared and is 100% yours. Only your IPv4 pipes to the Internet are prone to CGNAT bottlenecks.

In the near future, almost every provider will use the IPv6+Shared IPv4 method as this is the only one that works when there aren’t enough IPv4 addresses for everyone.
IPv4-only and IPv6+IPv4 architectures still requires a single IPv4 per subscriber, a luxury we cannot afford anymore given the IPv4 shortage.

Having your traffic routed through a CGNAT implies that your latency may suffer when there are peaks load on your ISP’s network. While such events are rare, the detours necessary to reach the CGNAT mean that your IPv4 path to the internet is still longer than your IPv6 path.

Latency-critical services, such as Shadow, can suffer from those longer paths, because the less latency the better the experience will be on your Shadow PC.

Now that Shadow supports IPv6, what can I expect?

If your home internet uses a shared IPv4, the streaming connection to your Shadow PC will now use the shorter IPv6 paths. This will likely reduce the latency peaks you may encounter if your ISP’s CGNATs routers are in high demand. And for the ones that still have access to a “plain old” non-shared IPv4 connection, using IPv6 won’t hurt: it’s the future of the Internet.

You don’t have to do anything, it’s all automatic! If your ISP supports IPv6, you may even be using it right now without even noticing it.

--

--