[ale] IPv6 local devices with a prefix that may change

James Sumners james+ale at sumners.email
Fri Nov 4 14:21:20 EDT 2022


Well... my internal DNS still only reports `A` records:

```
❯ dig A @192.168.1.2 +short xbox
192.168.1.50

~
❯ dig A @fd01:1::1 +short xbox
192.168.1.50
```

This is primarily due to the limited interface for assigning statics in 
the UDM-PRO interface. Basically, it only supports IPv6 addresses (in 
fact, the interface only shows the IPv4 on the WAN port). I want to keep 
the UDM-PRO doing as many "gateway" things as possible, so I have not 
offloaded the DHCPv4/DHCPv6 services to my home server. Instead, I have 
a service on my home server that queries the UDM-PRO for the devices 
that are connected to it, the names those devices has, and adds them to 
the dnsmasq instance on that home server (.1.2 and ::1 shown above).

Technically, as long as I know my prefix delegation, then the prefix 
assigned to me upstream wouldn't matter. I would be able to use 
_whatever_ prefix has been randomly assigned to me and then configure my 
router/dhcp to hand out stuff within the delegation.

Some quick searching shows that CISCO supports a "prefix-from-provider" 
option[1]. And the manpage for dnsmasq indicates they support using the 
provider prefix as well. I assume ISC's dhcpd or Kea would have similar 
support.

[1] -- 
https://www.cisco.com/c/en/us/support/docs/ip/ip-version-6-ipv6/113141-DHCPv6-00.html

On 2022-11-04 13:46, Alex Carver via Ale wrote:
> I was being generic to capture a lot of different cases but one where
> I think this has an issue is smaller microcontroller devices. They're
> not likely going to have lots of RAM and OSes that can handle services
> to be able to respond to things we take for granted on larger
> computers.
> 
> So if I'm to address by hostname only then you're saying I'll need to
> operate a DNS server but how do I establish that DNS server to point
> at those devices when the prefix changes without having to reconfigure
> it at every prefix change? Or is this where you're applying ULA as
> well?
> 
> On 2022-11-04 10:33, James Sumners wrote:
>> I'll answer in my limited capacity based upon what I have done.
>> 
>> First, forget about knowing all of your local addresses. And forget 
>> about static assignments. Each host should be addressed by hostname, 
>> and each host should work out its IPv6 addresses (of which it will 
>> have several).
>> 
>> Second, if you _really_ need to know your local addresses _and_ want 
>> them to be IPv6, look into Unique Local Addresses (ULA)[1]. Be 
>> forewarned, though, that smarter people than me have discovered issues 
>> with those[2].
>> 
>> I actually do have a use case for ULAs that is described in 
>> https://jrfom.com/posts/2022/09/29/unifi-udm-pro-at-home/
>> 
>> In short, all you really should care about is the prefix delegation so 
>> that your devices can be assigned addresses correctly by the discovery 
>> protocols. Let them then register their name in some way.
>> 
>> [1] -- https://en.wikipedia.org/wiki/Unique_local_address
>> [2] -- https://twitter.com/jsumners79/status/1576186161063944193
>> 
>> On 2022-11-04 13:04, Alex Carver via Ale wrote:
>>> This is a purely academic question and thought experiment. It is not
>>> tied to anything I'm doing specifically or at this time.
>>> 
>>> Every website/how-to/explainer I've ever run across talks about
>>> issuing an IPv6 address to each device with the prefix provided by 
>>> the
>>> router and that you don't use the equivalent of NAT because IPv6
>>> reasons.
>>> 
>>> Great, fine, all well and good except no one ever discusses what
>>> happens when your whole network suddenly has its prefix change.  
>>> These
>>> sites just seem to assume the prefix is static for all time. Well 
>>> that
>>> works if you're a company or maybe you're never going to change ISP 
>>> or
>>> move to another area. Well that's fine for them but it doesn't really
>>> apply precisely to me. I've moved several times in the last ten years
>>> and changed ISPs three times so that prefix would not have been
>>> stable.
>>> 
>>> So suppose this premise:
>>> 
>>> I write and/or use software for remotely monitoring and controlling
>>> devices (doesn't matter what they are, IoT, computers, printers,
>>> anything) and that software, when it starts up, is going to connect
>>> out to each device it needs to handle. So there's probably a
>>> configuration file that contains all the IP addresses.
>>> 
>>> Now, under IPv4 they likely would have all been behind NAT and
>>> therefore all have private address range IPs which would be stable no
>>> matter what happened to the NAT device's WAN. But if everyone is now
>>> IPv6 and getting their prefix from the router a change on the WAN
>>> affects everyone downstream.
>>> 
>>> Suddenly my software has an out-of-date configuration because all the
>>> devices changed out from underneath it.
>>> 
>>> If one is supposed to do things "The IPv6 Right Way(tm)"/"NAT is bad
>>> mmm-kay?" using the issued prefixes and such, how do I keep my
>>> internal network stable so my software can safely work through WAN
>>> changes?
>>> 
>>> _______________________________________________
>>> Ale mailing list
>>> Ale at ale.org
>>> https://mail.ale.org/mailman/listinfo/ale
>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>> http://mail.ale.org/mailman/listinfo
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


More information about the Ale mailing list