← Back to context

Comment by simoncion

15 hours ago

> How can you do multiple WAN uplinks with IPv6 without NAT?

Advertise the addresses offered by the primary uplink, then retire those addresses [0] and advertise the secondary when the primary fails. Or are you talking about load balancing, which is its own thing? Either way, this situation is inherently not boring, so the way you solve it is going to be quite a bit more complex -regardless of IP protocol version- than the very boring single-upstream situation.

> How do you prevent your printer on IPv6 from breaking when your Internet connection goes down?

I'll flip this around on you:

How do you prevent your printer from "breaking" when its ISP-provided DHCP lease on its globally-routable IPv4 address expires? How about when the ISP refuses to renew the lease on the printer's current globally-routable IPv4 address and forces it to get a new one?

Obviously, you use the ISP-assigned globally-routable IPv4 address and also assign an RFC 1918 address to the printer.

How to solve this with IPv6? Use ULAs! They're the equivalent of 1918 space in the IPv6 world. Just like in IPv4, IPv6 globally-routable addresses are for global communication and can be used for LAN-local communication. And -just like 1918 addresses- ULAs are for LAN-local communication. Just like with IPv4, if you can't control the addresses that you get from your upstream provider, and/or if your router is set up to retire your upstream provider's delegated address space when your upstream link goes down, then you use ULAs. [1]

I know that OpenWRT has a setting in LuCi to enable advertisement of a ULA prefix, and fifteen seconds of searching revealed that at least some Linksys combination router/APs seem to just generate and advertise a ULA prefix by default. [2]

So, if you're not configuring your LAN this way and upstream provider renumbering is getting in your way, then you really should bother to.

[0] ...by advertising their valid lifetime as zero seconds...

[1] ...or if you happen to like to be able to assign fixed IP addresses to certain pieces of hardware...

[2] <https://support.linksys.com/kb/article/3744-en/>

> Use ULAs

Isn't that the default for modern routers? They just generate a random ULA during setup and assign it.

Random ULAs are also great for LAN-to-LAN VPNs, because there aren't any private IP overlaps. Everyone setting up their LAN on 192.168.0.x makes it quite a mess on IPv4.

  • > Isn't that the default for modern routers?

    I assumed so because it's the obviously correct thing to do, but I haven't used a SoHo router in so many years, so I don't know.

    > Random ULAs are also great for LAN-to-LAN VPNs, because there aren't any private IP overlaps.

    Yep! Extremely low chance of prefix collision is their most important purpose. I've been part of several corporate acquisitions, and it inevitably took 6->18+ months to do enough of the IPv4 renumbering and server-discommissioning [0] process to begin to merge the LANs of the merging companies. Had they used ULA addressing, the odds of having to do that massive amount of work would be effectively zero.

    And if collisions aren't something you give any shits about, nothing stops you [1] from setting your ULA to fd00::/48 and advertising fd00::/64 on your LAN for static IP addresses that are notably shorter than you can get with IPv4!

    [0] ...because there's so little space in the 1918 range...

    [1] ...well, unless your router's configuration system doesn't let you specify your ULA prefix...

  • ULA are useless for most practical purposes because of the source address selection rules.

    • > ULA are useless for most practical purposes because of the source address selection rules.

      /me glances over at my LAN which has been happily using ULAs for local communications and GUAs for global for the past I don't even know how long.

      _Sure_.

      3 replies →

OK, do you _think_ my questions were that easy?

> Advertise the addresses offered by the primary uplink, then retire those addresses

Prefix withdrawal doesn't work reliably on Android. And neither is it required to work, btw. Neither does this solution allow for load balancing, as all traffic will just go through one connection.

Bonus points: triangular routing to your local NAS through the router.

> How do you prevent your printer from "breaking" when its ISP-provided DHCP lease on its globally-routable IPv4 address expires? How about when the ISP refuses to renew the lease on the printer's current globally-routable IPv4 address and forces it to get a new one?

Printers get an RFC1918 address and don't care about global connectivity.

> How to solve this with IPv6? Use ULAs! They're the equivalent of 1918 space in the IPv6 world.

They're not. IPv6 is nothing like IPv4 operationally. Back to my challenge, ULA will NOT work.

The scenario is very simple: the printer gets a ULA prefix and a GUA prefix. Your computer also gets a GUA and a ULA from the same router.

So far so good.

Now the uplink goes down, and the router withdraws the prefix. The printer sees the withdrawal and removes its GUA address. Your computer misses it, and still has the GUA and the ULA addresses.

Whoops. The printing is now broken somehow. Why?

  • > Prefix withdrawal doesn't work reliably on Android.

    Works fine on the Android hardware I have. Are you attempting to retire prefixes that have an infinite lifetime? That doesn't work, and I don't think it's supposed to work.

    > Neither does this solution allow for load balancing...

    As I said

      Or are you talking about load balancing, which is its own thing? Either way, this situation is inherently *not* boring, so the way you solve it is going to be quite a bit more complex -regardless of IP protocol version- than the very boring single-upstream situation.
    

    > Printers get an RFC1918 address and don't care about global connectivity.

    Okay, so why are you complaining about your printer being broken by GUAs that you're not permitting it to have? ;)

    > IPv6 is nothing like IPv4 operationally.

    For anyone who's not an IP stack developer, network hardware developer, or Enterprise sysadmin it absolutely is. And other than the fact that every endpoint is able to get a global address in v6, the sysadmin-visible differences between v4 and v6 are minor. RAs instead of... well, nothing, and DHCP for both.

    > Whoops. The printing is now broken somehow. Why?

    Exactly.

    Why isn't your DHCPv6 server putting either both the GUA and ULA, or -better- only the ULA addresses in your LAN's DNS server? This Just Works™ on dnsmasq, which is one of the most widely-deployed DNS+DHCP servers on SoHo gear. [0] dnsmasq's default TTL for hosts added to the DHCP lease file appears to be 0, so -worst case- your sleepy computer tries to continue its conversation with the printer a couple of times, does ND and discovers that the IP it was using is gone, then looks up the hostname again and gets the new address of the printer. I think the trendy term for this back in the 2000s was "self-healing".

    If you're going to retort "But we don't use dnsmasq in the companies I'm sometimes talking about!"... well, if you can't figure out how to not register upstream-controlled GUA addresses for your LAN hosts in your DNS, then do what dnsmasq does and serve them up with a TTL of 0.

    [0] To head off the "Android doesn't really do DHCPv6" retort: Even though Android refuses to use anything other than DHCPv6-PD for managed address assignment, -AFAIK- Android still sends DHCPv6 ADDR_REG_INFORM messages for addresses it autogenerates on networks with either the "OtherConfig" or "Managed" flags set. I haven't bothered to set up my Linux systems to do this, but I'd be surprised if Windows and Darwin systems didn't do this.

    • > Why isn't your DHCPv6 server putting either both the GUA and ULA, or -better- only the ULA addresses in your LAN's DNS server?

      I don't have a LAN's DNS server or a DHCPv6. BTW, I have had an IPv6-only home network for 10 years, with NAT64 and 464XLAT.

      You still haven't solved my puzzle or even understood what's happening. The current source address selection rules result in hosts prefering a GUA address pair over ULA. This _will_ result in broken connectivity when GUA addresses change.

      There is currently no standards-compliant way to solve my challenge, except getting an ASN, an IPv6 assignment, and announcing it through your uplinks. Which I've also done in my home network, btw.

      There's an in-progress RFC to change this, by preferring ULA-ULA address pairs over GUA-GUA. So it might be usable some time in the 2030-s ( https://www.ietf.org/archive/id/draft-ietf-6man-rfc6724-upda... ).

      And no, this is not a theoretic problem. It affects protocols like SIP or even mDNS that exchange the IP addresses. They will consistently prefer unstable GUAs over ULAs.

      3 replies →