NAT64 performance

4 minutes read time

This post is an update of my previous post about NAT64. That post describes the following setup:

          IPv4          IPv4
Internet ────── Router ────── NAT64
          IPv6    │             │ IPv6
                  └────────── Host
                        IPv6

This has the following components in the network:

The is to use the NAT64 server both ways: the NAT64 server is used for IPv4 connectivity (looking at you, GitHub), and to reach the IPv6-only hosts over IPv4.

Currently, I still use Tayga for this setup. The main downside of Tayga is it’s (low) performance. This performance is the main reason various hosts in my network still have an IPv4 address. I have also replaced my home router with a PCEngines APU, which should perform much better than the Edgerouter Lite it replaced.

Alternatives

There are various alternatives to Tayga:

The latter two have been compared against Tayga in this paper, which found the following performance:

Solutionframe/sMbps (est.)
Jool2300002760
Tayga1200001440
map64660000720

Note that the throughput for Tayga is significantly greater than I was able to achieve in my previous post (252 Mbps). Additionally, the performance of Jool looks interesting

Test setup

The following devices are used for testing the performance of Tayga, Jool and PF:

PCEngines APURyzen 2600XRyzen 4650G
CPUAMD GX-412AMD Ryzen 5 2600XAMD Ryzen 5 PRO 4650G
NICIntel i211ATIntel X550-T2Mellanox ConnectX-3 EN
RAM2GB DDR3-133332GB DDR4-320032GB DDR4-3200

Both the PCEngines APU and the Ryzen2600X are used as NAT64 device, while the Ryzen 4650G is used to measure performance.

Fresh installations of OpenBSD 6.8 and Debian Bullseye are used for the tests. No performance tuning is done.

Tests are performed using iPerf3 using a single TCP flow on a single link (in full duplex). The best of three measurements is used as the result.

A few notes:

This means that the results below should be taken with a grain of salt.

Different types of NAT

Tayga, Jool and PF work differently:

Example translations for NAT64:

Orig FromOrig ToNAT FromNAT To
Tayga*64:ff9b::10.64.0.1010.64.0.0/2410.64.0.10
Jool64:ff9b::10.64.1.1064:ff9b::10.64.0.1010.64.1.1010.64.0.10
PF*64:ff9b::10.64.0.1010.64.0.110.64.0.10

Example translations for NAT46:

Orig FromOrig ToNAT FromNAT To
Tayga10.64.1.1010.64.0.102001:db8::10.64.1.102001:db8::10.64.0.10
Jool10.64.1.1010.64.0.102001:db8::10.64.1.102001:db8::10.64.0.10
PF*10.64.0.102001:db8::12001:db8::10.64.0.10

Results

Performance on the PCEngines APU in Mbps:

IPv4IPv6NAT64NAT46
Tayga903887199197
Jool-869805825
PF646488572444

Performance on the Ryzen 2600X in Mbps:

IPv4IPv6NAT64NAT46
Tayga8478836129712807
Jool-781981938091
PF6292500623545440

As a bonus: performance of Jool in a container on the Ryzen 4650G in Mbps:

IPv4IPv6NAT64NAT46
Jool15216144061442610097

This means the performance of the solutions, when compared to the line rate, is as follows:

SolutionPlatformNAT64NAT46
TaygaPCEngines APU21%21%
TaygaRyzen 2600X31%29%
PFPCEngines APU50%47%
PFRyzen 2600X25%58%
JoolPCEngines APU85%88%
JoolRyzen 2600X88%86%

Conclusion

While Tayga claims that it “can saturate gigabit Ethernet on modest PC hardware”, this is clearly not the case for the ‘modest’ PCEngines APU. However, on a modern desktop CPU all solutions were able to attain performance exceeding 1 Gbps.

The clear winner in terms of performance is Jool, which is able to achieve almost 90% line rate on both platforms.