GNU Guix IPv6/v4 Router

2 hours ago 2

I, like probably many, had put off digging into IPv6. This project forced me to, which is great because IPv6 is empowering. The world ran out of IPv4 addresses years ago, and this comes at a high cost today. They are getting so scarce and expensive that more and more ISPs are using "Carrier Grade" NAT to take 1 IPv4 address and share it between multiple subscribers. Thankfully my ISP doesn't do this (yet). Just imagine sharing an IP address with many other people and the problems that can cause. One of the worst is it causes people to not be able to serve ports to the internet unless some interface is created by the carrier to port forward, which is not a guarantee. This takes sovereignty away from people. IPv6 was created not long after v4 because it became obvious that v4 addresses would run out. Today, about half the internet's traffic is routed through IPv6 and half through v4.

What IPv6 gives is a virtually unlimited number of IP addresses to use. The number is 3.4 x 10³⁸ or 340 undecillion. Compare this to IPv4's 4.3 billion addresses. With this many addresses, every device can have its own IP. This means things like NAT and all the complexity that brings is not needed. Instead of receiving just 1 IPv4 address from an ISP, with IPv6 you get a block delegated of at least /64 which is 18,446,744,073,709,551,616 (18 quintillion) globally routable addresses. Think that'll do. But, and this a big but: only half of the internet's traffic is IPv6, so IPv4 must still be supported. Even today, there are a few websites from big tech companies that don't have IPv6 addresses. There are many ways to support IPv4 alongside v6, from complex 4 to 6 address translation, to the more prevalent, albeit repetitive dual-stack. Dual-stacking is running both IPv4 and IPv6 services natively, no translation, side-by-side. Native is great, the small downside is having to do things twice, serving IPs, configs, etc, must be done for each. Dual-stack is what I chose for my setup.

A few other things. IPv6 is 128 bits and written in hexadecimal. An interface can have multiple IPv6 addresses which is actually really handy. For instance you can have a link-local address, the global address (GUA), and private unique local addresses (ULA). IPv6 addresses also don't need DHCP to assign them, with SLAAC (Stateless Address Auto-configuration) this is done automatically. The smallest block SLAAC requires to work is /64. There are positives and negatives to each, DHCP is usually better suited for large networks where a lot of control is needed. And SLAAC when just keeping it simple, but with tools like mDNS you can see IPs on the network. It should be known that systems like Android don't even support DHCPv6, to the anger of many developers. There is a wealth of info there about IPv6. It will change your thoughts on networking. The mental model of many, including myself, of networking, firewalls, routing, was warped through a lens of scarcity caused by IPv4 and NAT. Took some time to wrap my head around.

Read Entire Article