4 ms·
Ideally it'll be standard that your DHCP will assign you both an internet IP from your ISP-provided prefix (dynamic or static), and private IP from a ULA prefix
by uyzstvqs 7mo ago
Ideally it'll be standard that your DHCP will assign you both an internet IP from your ISP-provided prefix (dynamic or static), and private IP from a ULA prefix, which can be made static through address reservation.
- jcalvinowens 7mo agoDon't use DCHPv6 at home. I tried: you will hate your life, lots of stuff doesn't support it. Android specifically has zero support for it, google says it never will. Use SLAAC. It just works.
- yjftsjthsd-h 7mo agoHow do you handle internal DNS? I'd really like `curl http://mylaptop.internal http://mylaptop.internal` (or so) to work; that's easy with DHCP.
- kstrauser 7mo agoEvery device on my LAN handles mDNS, or at least the ones I SSH to do.
- hbogert 7mo agoNothing is stopping your router which does RA to also work in tandem with an internal dns server that can do hostnames for you mapped to slaac addresses.
- yjftsjthsd-h 7mo agoI'm not sure I follow? AIUI, RA lets you tell hosts about a DNS server, and an internal DNS server could have AAAA records pointing at SLAAC addresses, but how would it know what hostnames go to those addresses?
- hbogert 7mo agoOof you are right. It seems openwrt does something smart that only works for dual stacked hosts.
- jcalvinowens 7mo agoYou can specify the DNS server in the router advertisements. This is how you do it in radvd.conf: interface enp2s0f1 { AdvSendAdvert on; AdvManagedFlag off; AdvOtherConfigFlag off; IgnoreIfMissing on; prefix ::/64 { AdvOnLink on; AdvAutonomous on; }; RDNSS fddd:deca:fbad:1::10 { AdvRDNSSLifetime infinity; }; DNSSL internal.domain { AdvDNSSLLifetime infinity; }; }; I haven't yet found a way to specify a local NTP server though, which is a drag. So everything not manually configured (like the voip phone) talks to the local NTP over ipv4.
- yjftsjthsd-h 7mo agoSure. And how does that internal DNS server know about your devices? I connect laptop1 and laptop2 to my network. With DHCP, they each told eg. dnsmasq their name when they connected so laptop1.mydomain.internal and laptop2.mydomain.internal both resolve to the IPs that were handed out to each device. With RDNSS+DNSSL I can tell them that they should look up records on my internal domain and against my internal DNS server, but I can't see a good way for that DNS server to know that they exist or what their hostnames are.
- jcalvinowens 7mo agoOh I see. You're supposed to use mdns, but I haven't actually done that yet, it's sort of the last thing on my list. Mine is all static. I run a bind9 forwarder for DNS, and KEA for dhcp4. I have a little list of machines/macs/addresses as the source of truth, and a pair of python scripts that generates kea-dhcp4.conf and a bind9 zone file from that table. When I enabled IPv6, I just put all the SLACC addresses in that table, and made the python script generate AAAA records too. But this is honestly really stupid, I need to actually use mdns... I thought about writing a little systemd oneshot that used rfc2136 dyndns updates for home. But it feels like reinventing the wheel a bit...
- yjftsjthsd-h 7mo agoPerhaps I should give mDNS another look, then. Feels like a regression, but if it works. > When I enabled IPv6, I just put all the SLACC addresses in that table, and made the python script generate AAAA records too. Er, isn't that just manual static assignment, then? Not SLAAC? Don't get me wrong, static addresses do make DNS easy...
- simoncion 7mo agoI'm pretty sure that you can use both. RAs even have bits to indicate if one is supposed to autoconfigure, [0] hit up a DHCPv6 server for some or all configuration, [1] or both. radvd refers to them as AdvAutonomous and AdvOtherConfigFlag/AdvManagedFlag, respectively. [0] <https://datatracker.ietf.org/doc/html/rfc4861#section-4.6.2 https://datatracker.ietf.org/doc/html/rfc4861#section-4.6.2> [1] <https://datatracker.ietf.org/doc/html/rfc4861#section-4.2 https://datatracker.ietf.org/doc/html/rfc4861#section-4.2>
- retatop 7mo agoThis is exactly what I do. Almost everything has a nice DHCPv6 address so that I can actually remember the ULA + the suffix, but then for the two devices on my network that don't do DHCPv6 they get a SLAAC. One oddity though is that it means most devices on my network have both a SLAAC and a DHCP-provided one, since I wasn't able to be able to get it to prioritize a DHCP. Combine that with them having both ULA addresses and public addresses and some stuff on my network have way more addresses than you'd expect
- jcalvinowens 7mo agoYou can use both, but I've never found a good reason to at home. The DHCPv6 option for specifying an NTP server might be a good reason to... but even Linux machines ignored it when I tried. Maybe in five years :)
- simoncion 7mo ago> The DHCPv6 option for specifying an NTP server might be a good reason to... but even Linux machines ignored it when I tried. Odd. option dhcp6.name-servers <ADDR>; option dhcp6.sntp-servers <ADDR>; work to get my Linux systems an IPv6 DNS and NTP server (respectively) when I'm using ISC DHCPd and 'dhcpcd'. Perhaps your DHCPd and/or your DHCPc were either misconfigured or badly broken? It is a little weird to be using the 'sntp' option, but on the systems I have access to, the address passed back to the client is treated exactly the same as the DHCPv4 NTP information. ~Thirteen years ago, one of the ISC DHCP bigwigs seemed to be of the opinion that the DHCPv6 NTP Server Option was "badly broken" [0]. Perhaps that's why the 'sntp' option is used instead. [0] <https://lists.isc.org/pipermail/dhcp-users/2013-June/016882.html https://lists.isc.org/pipermail/dhcp-users/2013-June/016882....>